diff options
author | Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com> | 2012-09-03 20:53:39 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-09-28 01:35:13 -0400 |
commit | 5b8fa822b71fa91b17c9fb38bcca31e771f7650d (patch) | |
tree | f059d09027ae0e132b2c9b811f214d63b8bdd1e7 /tools/virtio | |
parent | 108fc82596e3b66b819df9d28c1ebbc9ab5de14c (diff) |
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>
Diffstat (limited to 'tools/virtio')
-rw-r--r-- | tools/virtio/virtio-trace/Makefile | 7 |
1 files changed, 3 insertions, 4 deletions
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 @@ | |||
1 | CC = gcc | 1 | CC = gcc |
2 | CFLAGS = -O2 -Wall | 2 | CFLAGS = -O2 -Wall -pthread |
3 | LFLAG = -lpthread | ||
4 | 3 | ||
5 | all: trace-agent | 4 | all: trace-agent |
6 | 5 | ||
7 | .c.o: | 6 | .c.o: |
8 | $(CC) $(CFLAGS) $(LFLAG) -c $^ -o $@ | 7 | $(CC) $(CFLAGS) -c $^ -o $@ |
9 | 8 | ||
10 | trace-agent: trace-agent.o trace-agent-ctl.o trace-agent-rw.o | 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 | clean: | 12 | clean: |
14 | rm -f *.o trace-agent | 13 | rm -f *.o trace-agent |