Skip to content

Commit a4a325c

Browse files
HoyeonRheeKernel Patches Daemon
authored andcommitted
selftests/bpf: propagate LLVM toolchain to runqslower build
The selftests/bpf invokes a nested make when building runqslower, but LLVM toolchain version (clang/llvm-strip) is not propagated. As a result, runqslower is built with system default clang, not respecting specified LLVM version. # LLVM=-21 make -C tools/testing/selftests/bpf ... make feature_display=0 -C /bpf/tools/bpf/runqslower \ OUTPUT=/bpf/tools/testing/selftests/bpf/tools/build/runqslower/ \ BPFOBJ_OUTPUT=/bpf/tools/testing/selftests/bpf/tools/build/libbpf/ \ BPFOBJ=/bpf/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.a \ BPF_INCLUDE=/bpf/tools/testing/selftests/bpf/tools/include \ BPFTOOL_OUTPUT=/bpf/tools/testing/selftests/bpf/tools/build/bpftool/ \ VMLINUX_BTF=/sys/kernel/btf/vmlinux BPF_TARGET_ENDIAN=--target=bpfel \ EXTRA_CFLAGS='-g -O0 ' EXTRA_LDFLAGS=' ' && \ cp /bpf/tools/testing/selftests/bpf/tools/build/runqslower/runqslower \ /bpf/tools/testing/selftests/bpf/runqslower clang -g -O2 --target=bpfel -I/bpf/tools/testing/selftests/bpf/tools/build/runqslower/ \ -I/bpf/tools/testing/selftests/bpf/tools/include -I/bpf/tools/include/uapi \ -c runqslower.bpf.c -o /bpf/tools/testing/selftests/bpf/tools/build/runqslower/runqslower.bpf.o && \ llvm-strip -g /bpf/tools/testing/selftests/bpf/tools/build/runqslower//runqslower.bpf.o /bin/sh: 1: clang: not found Explicitly propagate CLANG and LLVM_STRIP to the runqslower sub-make so that the LLVM toolchain selection from lib.mk is preserved. Signed-off-by: Hoyeon Lee <[email protected]>
1 parent 12514f5 commit a4a325c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tools/testing/selftests/bpf/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ endif
306306

307307
$(OUTPUT)/runqslower: $(BPFOBJ) | $(DEFAULT_BPFTOOL) $(RUNQSLOWER_OUTPUT)
308308
$(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower \
309+
CLANG=$(CLANG) LLVM_STRIP=$(LLVM_STRIP) \
309310
OUTPUT=$(RUNQSLOWER_OUTPUT) VMLINUX_BTF=$(VMLINUX_BTF) \
310311
BPFTOOL_OUTPUT=$(HOST_BUILD_DIR)/bpftool/ \
311312
BPFOBJ_OUTPUT=$(BUILD_DIR)/libbpf/ \

tools/testing/selftests/lib.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ LLVM_SUFFIX := $(LLVM)
88
endif
99

1010
CLANG := $(LLVM_PREFIX)clang$(LLVM_SUFFIX)
11+
LLVM_STRIP := $(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX)
1112

1213
CLANG_TARGET_FLAGS_arm := arm-linux-gnueabi
1314
CLANG_TARGET_FLAGS_arm64 := aarch64-linux-gnu

0 commit comments

Comments
 (0)