mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-05 09:05:53 +01:00
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 <[email protected]> Cc: David S. Miller <[email protected]> Cc: Daniel Borkmann <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Michael Ellerman <[email protected]> Signed-off-by: Naveen N. Rao <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
77e63534d6
commit
128d1514be
1 file changed
+3
-9
@@ -76,16 +76,10 @@ HOSTLOADLIBES_offwaketime += -lelf
|
||||
HOSTLOADLIBES_spintest += -lelf
|
||||
HOSTLOADLIBES_map_perf_test += -lelf -lrt
|
||||
|
||||
# point this to your LLVM backend with bpf support
|
||||
LLC=$(srctree)/tools/bpf/llvm/bld/Debug+Asserts/bin/llc
|
||||
|
||||
# asm/sysreg.h inline assmbly used by it is incompatible with llvm.
|
||||
# But, ehere is not easy way to fix it, so just exclude it since it is
|
||||
# asm/sysreg.h - inline assembly used by it is incompatible with llvm.
|
||||
# But, there is no easy way to fix it, so just exclude it since it is
|
||||
# useless for BPF samples.
|
||||
$(obj)/%.o: $(src)/%.c
|
||||
clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \
|
||||
-D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \
|
||||
-O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@
|
||||
clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \
|
||||
-D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \
|
||||
-O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=asm -o $@.s
|
||||
-O2 -emit-llvm -c $< -o -| llc -march=bpf -filetype=obj -o $@
|
||||
Reference in new issue
Block a user