aboutsummaryrefslogtreecommitdiffstats
path: root/samples/bpf
diff options
context:
space:
mode:
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>2016-04-04 13:01:33 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-06 16:01:28 -0400
commit128d1514be3583c3cfd56d66d7cdfba413b867ae (patch)
tree0e46bb74bb02a0a79549e6e9741dd4f8189bd4fb /samples/bpf
parent77e63534d679e281bf200dd9ee2a422bd4865a2b (diff)
samples/bpf: Use llc in PATH, rather than a hardcoded value
While at it, remove the generation of .s files and fix some typos in the related comment. Cc: Alexei Starovoitov <ast@fb.com> Cc: David S. Miller <davem@davemloft.net> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf')
-rw-r--r--samples/bpf/Makefile12
1 files changed, 3 insertions, 9 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 502c9fc8db85..b820cc96a3bc 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -76,16 +76,10 @@ HOSTLOADLIBES_offwaketime += -lelf
76HOSTLOADLIBES_spintest += -lelf 76HOSTLOADLIBES_spintest += -lelf
77HOSTLOADLIBES_map_perf_test += -lelf -lrt 77HOSTLOADLIBES_map_perf_test += -lelf -lrt
78 78
79# point this to your LLVM backend with bpf support 79# asm/sysreg.h - inline assembly used by it is incompatible with llvm.
80LLC=$(srctree)/tools/bpf/llvm/bld/Debug+Asserts/bin/llc 80# But, there is no easy way to fix it, so just exclude it since it is
81
82# asm/sysreg.h inline assmbly used by it is incompatible with llvm.
83# But, ehere is not easy way to fix it, so just exclude it since it is
84# useless for BPF samples. 81# useless for BPF samples.
85$(obj)/%.o: $(src)/%.c 82$(obj)/%.o: $(src)/%.c
86 clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ 83 clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \
87 -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ 84 -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \
88 -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@ 85 -O2 -emit-llvm -c $< -o -| llc -march=bpf -filetype=obj -o $@
89 clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \
90 -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \
91 -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=asm -o $@.s