mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
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: a80857822b
("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>
This commit is contained in:
parent
1ecc7b7a59
commit
b88c06e36d
@ -44,7 +44,7 @@ HOSTLOADLIBES_tracex4 += -lelf -lrt
|
||||
# point this to your LLVM backend with bpf support
|
||||
LLC=$(srctree)/tools/bpf/llvm/bld/Debug+Asserts/bin/llc
|
||||
|
||||
%.o: %.c
|
||||
$(obj)/%.o: $(src)/%.c
|
||||
clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \
|
||||
-D__KERNEL__ -Wno-unused-value -Wno-pointer-sign \
|
||||
-O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@
|
||||
|
Loading…
Reference in New Issue
Block a user