summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-09-27 21:20:49 -0700
committerKhem Raj <raj.khem@gmail.com>2023-09-08 09:08:54 -0700
commitaae6ebe90f531b6a194a2e00e78f4a5cc699f8aa (patch)
treeb0820d8390495fdad4ec8c6fc24d15ecc236571b
parentc10bbf7cf0999ea6e07c9cfb0093957cef4250df (diff)
downloadmeta-clang-aae6ebe90f531b6a194a2e00e78f4a5cc699f8aa.tar.gz
nativesdk-clang: Fix build when using RUNTIME = llvm
We can not use nativesdk variants of libcxx and compiler-rt yet when compiling nativesdk-clang because, it will need this compiler to build them, so solve this catch-22, since we do not use the runtime built during compiler builds, use libgcc/libstdc++ to pass cmake tests during configure, this should be fine as it will be not needed for final builds where nativesdk-clang will be used, it can still default to llvm runtime on SDK host Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 826f7287ffb8ae87bd843ecfe4a21a661bb03294)
-rw-r--r--classes/clang.bbclass1
-rw-r--r--recipes-devtools/clang/clang_git.bb2
2 files changed, 3 insertions, 0 deletions
diff --git a/classes/clang.bbclass b/classes/clang.bbclass
index b9d045c..d2340aa 100644
--- a/classes/clang.bbclass
+++ b/classes/clang.bbclass
@@ -110,6 +110,7 @@ def clang_base_deps(d):
110 110
111BASE_DEFAULT_DEPS:toolchain-clang:class-target = "${@clang_base_deps(d)}" 111BASE_DEFAULT_DEPS:toolchain-clang:class-target = "${@clang_base_deps(d)}"
112BASE_DEFAULT_DEPS:append:class-native:toolchain-clang:runtime-llvm = " libcxx-native compiler-rt-native" 112BASE_DEFAULT_DEPS:append:class-native:toolchain-clang:runtime-llvm = " libcxx-native compiler-rt-native"
113BASE_DEFAULT_DEPS:append:class-nativesdk:toolchain-clang:runtime-llvm = " clang-native nativesdk-libcxx nativesdk-compiler-rt"
113 114
114cmake_do_generate_toolchain_file:append:toolchain-clang () { 115cmake_do_generate_toolchain_file:append:toolchain-clang () {
115 cat >> ${WORKDIR}/toolchain.cmake <<EOF 116 cat >> ${WORKDIR}/toolchain.cmake <<EOF
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb
index d0f7c48..fcb9885 100644
--- a/recipes-devtools/clang/clang_git.bb
+++ b/recipes-devtools/clang/clang_git.bb
@@ -305,6 +305,8 @@ SSTATE_SCAN_FILES:remove = "*-config"
305TOOLCHAIN = "clang" 305TOOLCHAIN = "clang"
306TOOLCHAIN:class-native = "gcc" 306TOOLCHAIN:class-native = "gcc"
307TOOLCHAIN:class-nativesdk = "clang" 307TOOLCHAIN:class-nativesdk = "clang"
308COMPILER_RT:class-nativesdk:toolchain-clang:runtime-llvm = "-rtlib=libgcc --unwindlib=libgcc"
309LIBCPLUSPLUS:class-nativesdk:toolchain-clang:runtime-llvm = "-stdlib=libstdc++"
308 310
309SYSROOT_DIRS:append:class-target = " ${nonarch_libdir}" 311SYSROOT_DIRS:append:class-target = " ${nonarch_libdir}"
310 312