Skip to contentSkip to conversation

kernel-selftest: only emit warning on clang if bpf is built

PATCH New Scott Branden 1 participant 1 message Apr 1, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-selftest: only emit warning on clang if bpf is built

Only emit warning on clang if bpf is actually in PACKAGECONFIG.

---
 meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb +3 -0
index 299c1f28e..cb4ac0458 100644
@@ -59,10 +59,13 @@ KERNEL_SELFTEST_SRC ?= "Makefile \
 "
 
 do_compile() {
+    if [ ${@bb.utils.contains('PACKAGECONFIG', 'bpf', 'True', 'False', d)} = 'True' ]; then
     if [ ${@bb.utils.contains('DEPENDS', 'clang-native', 'True', 'False', d)} = 'False' ]; then
         bbwarn "clang >= 6.0 with bpf support is needed with kernel 4.18+ so
 either install it and add it to HOSTTOOLS, or add clang-native from meta-clang to dependency"
     fi
+    fi
+
     for i in ${TEST_LIST}
     do
         oe_runmake -C ${S}/tools/testing/selftests/${i}
Signature · 1 line
2.17.1