Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools: Fix pthread flag for Makefile of trace-agent used by virtio-trace

pthread flag should not be -lpthread but -pthread using gcc. The -lpthread
links the external multithread library. On the other hand, the -pthread manages
both the gcc's preprocessor and linker to be able to compile with pthread.

Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

authored by

Yoshihiro YUNOMAE and committed by
Rusty Russell
5b8fa822 108fc825

+3 -4
+3 -4
tools/virtio/virtio-trace/Makefile
··· 1 1 CC = gcc 2 - CFLAGS = -O2 -Wall 3 - LFLAG = -lpthread 2 + CFLAGS = -O2 -Wall -pthread 4 3 5 4 all: trace-agent 6 5 7 6 .c.o: 8 - $(CC) $(CFLAGS) $(LFLAG) -c $^ -o $@ 7 + $(CC) $(CFLAGS) -c $^ -o $@ 9 8 10 9 trace-agent: trace-agent.o trace-agent-ctl.o trace-agent-rw.o 11 - $(CC) $(CFLAGS) $(LFLAG) -o $@ $^ 10 + $(CC) $(CFLAGS) -o $@ $^ 12 11 13 12 clean: 14 13 rm -f *.o trace-agent