diff options
author | Brenden Blanco <bblanco@plumgrid.com> | 2015-05-12 00:25:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-12 23:15:25 -0400 |
commit | b88c06e36dcb9b4ae285f7821f62d68dc34b25d3 (patch) | |
tree | dba8640049e05108c29c67b629745c9691a816e9 /samples/bpf | |
parent | 1ecc7b7a5998eb8fc4e9f79979638e77436b0b0b (diff) |
samples/bpf: fix in-source build of samples with clang
in-source build of 'make samples/bpf/' was incorrectly
using default compiler instead of invoking clang/llvm.
out-of-source build was ok.
Fixes: a80857822b0c ("samples: bpf: trivial eBPF program in C")
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf')
-rw-r--r-- | samples/bpf/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 76e3458a5419..8fdbd73429dd 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile | |||
@@ -44,7 +44,7 @@ HOSTLOADLIBES_tracex4 += -lelf -lrt | |||
44 | # point this to your LLVM backend with bpf support | 44 | # point this to your LLVM backend with bpf support |
45 | LLC=$(srctree)/tools/bpf/llvm/bld/Debug+Asserts/bin/llc | 45 | LLC=$(srctree)/tools/bpf/llvm/bld/Debug+Asserts/bin/llc |
46 | 46 | ||
47 | %.o: %.c | 47 | $(obj)/%.o: $(src)/%.c |
48 | clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ | 48 | clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ |
49 | -D__KERNEL__ -Wno-unused-value -Wno-pointer-sign \ | 49 | -D__KERNEL__ -Wno-unused-value -Wno-pointer-sign \ |
50 | -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@ | 50 | -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@ |