[oe-commits] [meta-openembedded] 01/08: kernel-selftest: Disable bpf tests on mips
git at git.openembedded.org
git at git.openembedded.org
Sun Feb 2 16:09:09 UTC 2020
This is an automated email from the git hooks/post-receive script.
khem pushed a commit to branch master-next
in repository meta-openembedded.
commit 6e936c45d498825aacbac3d8945f7727cfa68061
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Fri Jan 31 18:23:17 2020 -0800
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 at gmail.com>
---
meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
index 02c56be..299c1f2 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 \
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}" \
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list