mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-05 02:50:46 +00:00
kernel-selftest: Disable bpf tests on mips
5.4 kernel exposes a problem, where its using host includes to compile BPF tests and it fails for mips because ptrace.h is quite different so it can not find the needed pt_struct definitions during cross compile % clang -fno-stack-protector -I. -I./include/uapi -I../../../include/uapi -I/mnt/b/yoe/build/tmp/work/qemumips-yoe-linux/kernel-selft est/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/bpf/../usr/include -D__TARGET_ARCH_mips -g -idirafter /mnt/b/yoe/build/tmp/wor k/qemumips-yoe-linux/kernel-selftest/1.0-r0/recipe-sysroot-native/usr/lib/clang/10.0.0/include -Wno-compare-distinct-pointer-types -O2 -target bpf -emit-llvm \ -c progs/loop1.c progs/loop1.c:21:9: error: no member named 'regs' in 'struct pt_regs' m = PT_REGS_RC(ctx); ^~~~~~~~~~~~~~~ ./bpf_helpers.h:466:29: note: expanded from macro 'PT_REGS_RC' ~~ ^ 1 error generated. Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -21,6 +21,10 @@ SRC_URI += "file://run-ptest \
|
||||
PACKAGECONFIG ??= "bpf vm"
|
||||
PACKAGECONFIG_remove_x86 = "bpf"
|
||||
PACKAGECONFIG_remove_arm = "bpf"
|
||||
# host ptrace.h is used to compile BPF target but mips ptrace.h is needed
|
||||
# progs/loop1.c:21:9: error: incomplete definition of type 'struct user_pt_regs'
|
||||
# m = PT_REGS_RC(ctx);
|
||||
PACKAGECONFIG_remove_qemumips = "bpf"
|
||||
|
||||
PACKAGECONFIG[bpf] = ",,elfutils libcap libcap-ng rsync-native,"
|
||||
PACKAGECONFIG[vm] = ",,libcap,libgcc bash"
|
||||
@@ -40,7 +44,7 @@ EXTRA_OEMAKE = '\
|
||||
CROSS_COMPILE=${TARGET_PREFIX} \
|
||||
ARCH=${ARCH} \
|
||||
CC="${CC}" \
|
||||
CLANG="clang -fno-stack-protector" \
|
||||
CLANG="clang -fno-stack-protector -arch ${ARCH} ${TOOLCHAIN_OPTIONS}" \
|
||||
AR="${AR}" \
|
||||
LD="${LD}" \
|
||||
DESTDIR="${D}" \
|
||||
|
||||
Reference in New Issue
Block a user