From: Yoshihiro YUNOMAE Date: Tue, 4 Sep 2012 00:53:39 +0000 (+0900) Subject: tools: Fix pthread flag for Makefile of trace-agent used by virtio-trace X-Git-Tag: v3.7-rc1~98^2~17 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=5b8fa822b71fa91b17c9fb38bcca31e771f7650d;p=linux.git 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 Signed-off-by: Rusty Russell --- diff --git a/tools/virtio/virtio-trace/Makefile b/tools/virtio/virtio-trace/Makefile index ef3adfce594c..0d2381633475 100644 --- a/tools/virtio/virtio-trace/Makefile +++ b/tools/virtio/virtio-trace/Makefile @@ -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