]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tools: Fix pthread flag for Makefile of trace-agent used by virtio-trace
authorYoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Tue, 4 Sep 2012 00:53:39 +0000 (09:53 +0900)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Sep 2012 00:33:30 +0000 (10:33 +1000)
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>
tools/virtio/virtio-trace/Makefile

index ef3adfce594ccbf151344500da0c69918dbe25ce..0d2381633475a2faca9412a3d1dbce673d4dd32b 100644 (file)
@@ -1,14 +1,13 @@
 CC = gcc
-CFLAGS = -O2 -Wall
-LFLAG = -lpthread
+CFLAGS = -O2 -Wall -pthread
 
 all: trace-agent
 
 .c.o:
-       $(CC) $(CFLAGS) $(LFLAG) -c $^ -o $@
+       $(CC) $(CFLAGS) -c $^ -o $@
 
 trace-agent: trace-agent.o trace-agent-ctl.o trace-agent-rw.o
-       $(CC) $(CFLAGS) $(LFLAG) -o $@ $^
+       $(CC) $(CFLAGS) -o $@ $^
 
 clean:
        rm -f *.o trace-agent