samples/bpf: fix in-source build of samples with clang
Subsystems (3)
PATCH 1/1 samples/bpf: fix in-source build of samples with clang
From: Brenden Blanco <[email protected]>
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 <[email protected]>
Signed-off-by Alexei Starovoitov <[email protected]>
---
It's a minor fix and not strictly necessary for stable.
samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
samples/bpf/Makefile +1 -1
@@ -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 $@
Signature · 1 line
1.7.9.5
From: Alexei Starovoitov <[email protected]>
Date: Mon, 11 May 2015 21:25:51 -0700
Quoted 9 lines
From: Brenden Blanco <[email protected]>
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 <[email protected]>Signed-off-by Alexei Starovoitov <[email protected]>
Applied.