Skip to contentSkip to conversation

kernel-selftest: Warn conditionally about clang-native dependency

PATCH New Khem Raj 1 participant 1 message Aug 28, 2019

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 kernel-selftest: Warn conditionally about clang-native dependency

When meta-clang is in mix then it does the right thing already so no need to warn in that case

---
 meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb +4 -3
index 7370f9fb41..dce33c16c5 100644
@@ -63,9 +63,10 @@ python __anonymous () {
 }
 
 do_compile() {
-    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"
+    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
     for i in ${TEST_LIST}
     do
         oe_runmake -C ${S}/tools/testing/selftests/${i}
Signature · 1 line
2.23.0