diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-09-27 21:20:49 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-09-08 09:08:54 -0700 |
commit | aae6ebe90f531b6a194a2e00e78f4a5cc699f8aa (patch) | |
tree | b0820d8390495fdad4ec8c6fc24d15ecc236571b | |
parent | c10bbf7cf0999ea6e07c9cfb0093957cef4250df (diff) | |
download | meta-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.bbclass | 1 | ||||
-rw-r--r-- | recipes-devtools/clang/clang_git.bb | 2 |
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 | ||
111 | BASE_DEFAULT_DEPS:toolchain-clang:class-target = "${@clang_base_deps(d)}" | 111 | BASE_DEFAULT_DEPS:toolchain-clang:class-target = "${@clang_base_deps(d)}" |
112 | BASE_DEFAULT_DEPS:append:class-native:toolchain-clang:runtime-llvm = " libcxx-native compiler-rt-native" | 112 | BASE_DEFAULT_DEPS:append:class-native:toolchain-clang:runtime-llvm = " libcxx-native compiler-rt-native" |
113 | BASE_DEFAULT_DEPS:append:class-nativesdk:toolchain-clang:runtime-llvm = " clang-native nativesdk-libcxx nativesdk-compiler-rt" | ||
113 | 114 | ||
114 | cmake_do_generate_toolchain_file:append:toolchain-clang () { | 115 | cmake_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" | |||
305 | TOOLCHAIN = "clang" | 305 | TOOLCHAIN = "clang" |
306 | TOOLCHAIN:class-native = "gcc" | 306 | TOOLCHAIN:class-native = "gcc" |
307 | TOOLCHAIN:class-nativesdk = "clang" | 307 | TOOLCHAIN:class-nativesdk = "clang" |
308 | COMPILER_RT:class-nativesdk:toolchain-clang:runtime-llvm = "-rtlib=libgcc --unwindlib=libgcc" | ||
309 | LIBCPLUSPLUS:class-nativesdk:toolchain-clang:runtime-llvm = "-stdlib=libstdc++" | ||
308 | 310 | ||
309 | SYSROOT_DIRS:append:class-target = " ${nonarch_libdir}" | 311 | SYSROOT_DIRS:append:class-target = " ${nonarch_libdir}" |
310 | 312 | ||