diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-01-31 18:23:17 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-02-02 08:07:59 -0800 |
commit | 6e936c45d498825aacbac3d8945f7727cfa68061 (patch) | |
tree | 78217d0bfcdde59139cb53d274983fd8ee4f5502 /meta-oe/recipes-kernel/kernel-selftest | |
parent | 3049c65203af81c667cc1f5706088cdd3bd39864 (diff) | |
download | meta-openembedded-6e936c45d498825aacbac3d8945f7727cfa68061.tar.gz |
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>
Diffstat (limited to 'meta-oe/recipes-kernel/kernel-selftest')
-rw-r--r-- | meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb index 02c56bee60..299c1f28e5 100644 --- a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb +++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb | |||
@@ -21,6 +21,10 @@ SRC_URI += "file://run-ptest \ | |||
21 | PACKAGECONFIG ??= "bpf vm" | 21 | PACKAGECONFIG ??= "bpf vm" |
22 | PACKAGECONFIG_remove_x86 = "bpf" | 22 | PACKAGECONFIG_remove_x86 = "bpf" |
23 | PACKAGECONFIG_remove_arm = "bpf" | 23 | PACKAGECONFIG_remove_arm = "bpf" |
24 | # host ptrace.h is used to compile BPF target but mips ptrace.h is needed | ||
25 | # progs/loop1.c:21:9: error: incomplete definition of type 'struct user_pt_regs' | ||
26 | # m = PT_REGS_RC(ctx); | ||
27 | PACKAGECONFIG_remove_qemumips = "bpf" | ||
24 | 28 | ||
25 | PACKAGECONFIG[bpf] = ",,elfutils libcap libcap-ng rsync-native," | 29 | PACKAGECONFIG[bpf] = ",,elfutils libcap libcap-ng rsync-native," |
26 | PACKAGECONFIG[vm] = ",,libcap,libgcc bash" | 30 | PACKAGECONFIG[vm] = ",,libcap,libgcc bash" |
@@ -40,7 +44,7 @@ EXTRA_OEMAKE = '\ | |||
40 | CROSS_COMPILE=${TARGET_PREFIX} \ | 44 | CROSS_COMPILE=${TARGET_PREFIX} \ |
41 | ARCH=${ARCH} \ | 45 | ARCH=${ARCH} \ |
42 | CC="${CC}" \ | 46 | CC="${CC}" \ |
43 | CLANG="clang -fno-stack-protector" \ | 47 | CLANG="clang -fno-stack-protector -arch ${ARCH} ${TOOLCHAIN_OPTIONS}" \ |
44 | AR="${AR}" \ | 48 | AR="${AR}" \ |
45 | LD="${LD}" \ | 49 | LD="${LD}" \ |
46 | DESTDIR="${D}" \ | 50 | DESTDIR="${D}" \ |