diff options
-rw-r--r-- | meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb index 2e5680d775..291a83aaad 100644 --- a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb +++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb | |||
@@ -18,7 +18,9 @@ SRC_URI += "file://run-ptest \ | |||
18 | # we will append other kernel selftest in the future | 18 | # we will append other kernel selftest in the future |
19 | # bpf was added in 4.10 with: https://github.com/torvalds/linux/commit/5aa5bd14c5f8660c64ceedf14a549781be47e53d | 19 | # bpf was added in 4.10 with: https://github.com/torvalds/linux/commit/5aa5bd14c5f8660c64ceedf14a549781be47e53d |
20 | # if you have older kernel than that you need to remove it from PACKAGECONFIG | 20 | # if you have older kernel than that you need to remove it from PACKAGECONFIG |
21 | PACKAGECONFIG ??= "firmware bpf" | 21 | PACKAGECONFIG ??= "firmware" |
22 | # bpf needs working clang compiler anyway | ||
23 | PACKAGECONFIG:append:toolchain-clang:x86-64 = " bpf" | ||
22 | PACKAGECONFIG:remove:x86 = "bpf" | 24 | PACKAGECONFIG:remove:x86 = "bpf" |
23 | PACKAGECONFIG:remove:arm = "bpf vm" | 25 | PACKAGECONFIG:remove:arm = "bpf vm" |
24 | # host ptrace.h is used to compile BPF target but mips ptrace.h is needed | 26 | # host ptrace.h is used to compile BPF target but mips ptrace.h is needed |
@@ -54,17 +56,15 @@ EXTRA_OEMAKE = '\ | |||
54 | CC="${CC}" \ | 56 | CC="${CC}" \ |
55 | AR="${AR}" \ | 57 | AR="${AR}" \ |
56 | LD="${LD}" \ | 58 | LD="${LD}" \ |
57 | LLVM=1 \ | ||
58 | CONFIG_CC_IS_GCC= \ | ||
59 | CONFIG_CC_IS_CLANG=y \ | ||
60 | CONFIG_CC_IMPLICIT_FALLTHROUGH= \ | ||
61 | CLANG="clang -fno-stack-protector -target ${TARGET_ARCH} ${TOOLCHAIN_OPTIONS} -isystem ${S} -D__WORDSIZE=\'64\' -Wno-error=unused-command-line-argument" \ | 59 | CLANG="clang -fno-stack-protector -target ${TARGET_ARCH} ${TOOLCHAIN_OPTIONS} -isystem ${S} -D__WORDSIZE=\'64\' -Wno-error=unused-command-line-argument" \ |
62 | HOSTCC="clang -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ ${BUILD_CFLAGS} ${BUILD_LDFLAGS} -Wno-error=unused-command-line-argument" \ | ||
63 | HOSTLD="clang ${BUILD_LDFLAGS} -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" \ | ||
64 | DESTDIR="${D}" \ | 60 | DESTDIR="${D}" \ |
65 | MACHINE="${ARCH}" \ | ||
66 | V=1 \ | 61 | V=1 \ |
67 | ' | 62 | ' |
63 | EXTRA_OEMAKE:append:toolchain-clang = "\ | ||
64 | LLVM=1 CONFIG_CC_IS_GCC= CONFIG_CC_IS_CLANG=y CONFIG_CC_IMPLICIT_FALLTHROUGH= \ | ||
65 | HOSTCC="clang -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++ ${BUILD_CFLAGS} ${BUILD_LDFLAGS} -Wno-error=unused-command-line-argument" \ | ||
66 | HOSTLD="clang ${BUILD_LDFLAGS} -unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" \ | ||
67 | " | ||
68 | 68 | ||
69 | KERNEL_SELFTEST_SRC ?= "Makefile \ | 69 | KERNEL_SELFTEST_SRC ?= "Makefile \ |
70 | include \ | 70 | include \ |