Skip to contentSkip to conversation

compiler-rt: Use clang for native compile as well

PATCH In review Khem Raj 3 participants 6 messages Jul 11, 2025 – Jul 21, 2025

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 compiler-rt: Use clang for native compile as well

---
 meta/recipes-devtools/clang/compiler-rt_git.bb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-devtools/clang/compiler-rt_git.bb +4 -3
index 342a7b0e95e..4da85f29378 100644
@@ -35,9 +35,9 @@ DEPENDS:remove:class-native = "libcxx-native compiler-rt-native"
 UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
 COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
 LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
-UNWINDLIB:class-native = ""
-COMPILER_RT:class-native = ""
-LIBCPLUSPLUS:class-native = ""
+UNWINDLIB:class-native = "--unwindlib=libgcc"
+COMPILER_RT:class-native = "-rtlib=libgcc"
+LIBCPLUSPLUS:class-native = "-stdlib=libstdc++"
 UNWINDLIB:class-target = "--unwindlib=libgcc"
 COMPILER_RT:class-target = "-rtlib=libgcc"
 LIBCPLUSPLUS:class-target = "-stdlib=libstdc++"
@@ -57,6 +57,7 @@ LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
 CXXFLAGS += "${LIBCPLUSPLUS}"
 
 TOOLCHAIN = "clang"
+TOOLCHAIN_NATIVE = "clang"
 
 def get_compiler_rt_arch(bb, d):
     if bb.utils.contains('TUNE_FEATURES', 'armv5 thumb dsp', True, False, d):
author
#1 lore raw

PATCH 2/2 compiler-rt: Fix install location for native builds

Currently, clang when used for native builds and uses --rtlib=compiler-rt does not find the LLVM runtime because its installed in different directory than where compiler expects it to be. As a result, build fails for packages using clang in both capacity ( native and cross ) e.g. qtwebengine

Make the build work across native sanitizers as well.

---
 .../clang/compiler-rt-sanitizers_git.bb       | 15 +++++---
 .../recipes-devtools/clang/compiler-rt_git.bb | 38 +++++++++++--------
 2 files changed, 32 insertions(+), 21 deletions(-)
meta/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +10 -5
index 087a7663023..198942ec359 100644
@@ -55,8 +55,11 @@ CXXFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE"
 OECMAKE_TARGET_COMPILE = "compiler-rt"
 OECMAKE_TARGET_INSTALL = "install-compiler-rt install-compiler-rt-headers"
 OECMAKE_SOURCEPATH = "${S}/llvm"
+
+INSTALL_VER ?= "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}"
+INSTALL_VER:class-native = "${@oe.utils.trim_version("${PV}", 1)}"
+
 EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-                  -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
                   -DCOMPILER_RT_STANDALONE_BUILD=ON \
                   -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON \
                   -DCOMPILER_RT_BUILD_BUILTINS=OFF \
@@ -71,11 +74,13 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
                   -DLLVM_ENABLE_RUNTIMES='compiler-rt' \
                   -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
                   -DLLVM_APPEND_VC_REV=OFF \
+                  -DCOMPILER_RT_INSTALL_PATH=${nonarch_libdir}/clang/${INSTALL_VER} \
                   -S ${S}/runtimes \
 "
 
 EXTRA_OECMAKE:append:class-native = "\
                -DCOMPILER_RT_USE_BUILTINS_LIBRARY=OFF \
+               -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \
 "
 
 EXTRA_OECMAKE:append:class-target = "\
@@ -85,6 +90,7 @@ EXTRA_OECMAKE:append:class-target = "\
                -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
                -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
                -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+               -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
 "
 
 EXTRA_OECMAKE:append:class-nativesdk = "\
@@ -95,24 +101,23 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
                -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \
                -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
                -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
+               -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
 "
 
 EXTRA_OECMAKE:append:libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON "
 
 do_install:append () {
-    mkdir -p ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib
-    mv ${D}${nonarch_libdir}/linux ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib
     # Already shipped with compile-rt Orc support
     rm -rf ${D}${nonarch_libdir}/clang/${MAJOR_VER}/lib/linux/liborc_rt-*.a
     rm -rf ${D}${nonarch_libdir}/clang/${MAJOR_VER}/include/orc/
 }
 
 FILES_SOLIBSDEV = ""
-FILES:${PN} += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER} \
+FILES:${PN} += "${nonarch_libdir}/clang/${INSTALL_VER} \
 				${nonarch_libdir}/clang/${MAJOR_VER}/lib/linux/lib*${SOLIBSDEV} \
                 ${nonarch_libdir}/clang/${MAJOR_VER}/*.txt \
                 ${nonarch_libdir}/clang/${MAJOR_VER}/share/*.txt"
-FILES:${PN}-staticdev += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a"
+FILES:${PN}-staticdev += "${nonarch_libdir}/clang/${INSTALL_VER}/lib/linux/*.a"
 FILES:${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}/lib/linux/*.syms \
                     ${nonarch_libdir}/clang/${MAJOR_VER}/include \
                     ${nonarch_libdir}/clang/${MAJOR_VER}/lib/linux/clang_rt.crt*.o \
meta/recipes-devtools/clang/compiler-rt_git.bb +22 -16
index 4da85f29378..c88000d33b0 100644
@@ -71,8 +71,11 @@ def get_compiler_rt_arch(bb, d):
 OECMAKE_TARGET_COMPILE = "compiler-rt"
 OECMAKE_TARGET_INSTALL = "install-compiler-rt install-compiler-rt-headers"
 OECMAKE_SOURCEPATH = "${S}/llvm"
+
+INSTALL_VER ?= "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}"
+INSTALL_VER:class-native = "${@oe.utils.trim_version("${PV}", 1)}"
+
 EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-                  -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
                   -DCOMPILER_RT_STANDALONE_BUILD=ON \
                   -DCOMPILER_RT_INCLUDE_TESTS=OFF \
                   -DCOMPILER_RT_BUILD_XRAY=OFF \
@@ -83,9 +86,12 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
                   -DLLVM_ENABLE_RUNTIMES='compiler-rt' \
                   -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
                   -DLLVM_APPEND_VC_REV=OFF \
+                  -DCOMPILER_RT_INSTALL_PATH=${nonarch_libdir}/clang/${INSTALL_VER} \
                   -S ${S}/runtimes \
 "
-
+EXTRA_OECMAKE:append:class-native = "\
+               -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \
+"
 EXTRA_OECMAKE:append:class-target = "\
                -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \
                -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \
@@ -93,6 +99,7 @@ EXTRA_OECMAKE:append:class-target = "\
                -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
                -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
                -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+               -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
 "
 
 EXTRA_OECMAKE:append:class-nativesdk = "\
@@ -103,29 +110,28 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
                -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \
                -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
                -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
+               -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
 "
 
 do_install:append () {
-    mkdir -p ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib
-    mv ${D}${nonarch_libdir}/linux ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib
     if [ "${HF}" = "hf" ]; then
-        mv -f ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.builtins-arm.a \
-              ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.builtins-armhf.a
-        mv -f ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/liborc_rt-arm.a \
-              ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/liborc_rt-armhf.a
+        mv -f ${D}${nonarch_libdir}/clang/${INSTALL_VER}/lib/linux/libclang_rt.builtins-arm.a \
+              ${D}${nonarch_libdir}/clang/${INSTALL_VER}/lib/linux/libclang_rt.builtins-armhf.a
+        mv -f ${D}${nonarch_libdir}/clang/${INSTALL_VER}/lib/linux/liborc_rt-arm.a \
+              ${D}${nonarch_libdir}/clang/${INSTALL_VER}/lib/linux/liborc_rt-armhf.a
     fi
 }
 
 FILES_SOLIBSDEV = ""
 
-FILES:${PN} += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \
-                ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/*.txt \
-                ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/share/*.txt"
-FILES:${PN}-staticdev += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a"
-FILES:${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \
-                    ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/include \
-                    ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o \
-                    ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.asan-preinit*.a"
+FILES:${PN} += "${nonarch_libdir}/clang/${INSTALL_VER}/lib/linux/lib*${SOLIBSDEV} \
+                ${nonarch_libdir}/clang/${INSTALL_VER}/*.txt \
+                ${nonarch_libdir}/clang/${INSTALL_VER}/share/*.txt"
+FILES:${PN}-staticdev += "${nonarch_libdir}/clang/${INSTALL_VER}/lib/linux/*.a"
+FILES:${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${INSTALL_VER}/lib/linux/*.syms \
+                    ${nonarch_libdir}/clang/${INSTALL_VER}/include \
+                    ${nonarch_libdir}/clang/${INSTALL_VER}/lib/linux/clang_rt.crt*.o \
+                    ${nonarch_libdir}/clang/${INSTALL_VER}/lib/linux/libclang_rt.asan-preinit*.a"
 
 INSANE_SKIP:${PN} = "dev-so libdir"
 INSANE_SKIP:${PN}-dbg = "libdir"
#2 lore raw

Patchtest results for [PATCH 1/2] compiler-rt: Use clang for native compile as well

In reply to Khem Raj

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/1-2-compiler-rt-Use-clang-for-native-compile-as-well.patch

FAIL: test commit message presence: Please include a commit message on your patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)

PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!

#3 lore raw
In reply to Khem Raj

Hi Khem,

I got compiler-rt-native do_configure error Ubuntu 22.04.5 with this patch:

/ala-lpggp71/lyang1/poky/build-u/tmp/hosttools/ld: cannot find -lstdc++: No
such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see
invocation)
ninja: build stopped: subcommand failed.

I have tried:
1) Add libcxx-native back to compiler-rt-native's DEPENDS, there would be dependency loops.

2) Install libc++1 on the host, it doesn't work, get the same error.

// Robert

Quoted 41 lines · Khem Raj via lists.openembedded.org
---
  meta/recipes-devtools/clang/compiler-rt_git.bb | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-devtools/clang/compiler-rt_git.bb +4 -4
index 342a7b0e95e..4da85f29378 100644
@@ -35,9 +35,9 @@ DEPENDS:remove:class-native = "libcxx-native compiler-rt-native"
  UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
  COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
  LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
-UNWINDLIB:class-native = ""
-COMPILER_RT:class-native = ""
-LIBCPLUSPLUS:class-native = ""
+UNWINDLIB:class-native = "--unwindlib=libgcc"
+COMPILER_RT:class-native = "-rtlib=libgcc"
+LIBCPLUSPLUS:class-native = "-stdlib=libstdc++"
  UNWINDLIB:class-target = "--unwindlib=libgcc"
  COMPILER_RT:class-target = "-rtlib=libgcc"
  LIBCPLUSPLUS:class-target = "-stdlib=libstdc++"
@@ -57,6 +57,7 @@ LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
  CXXFLAGS += "${LIBCPLUSPLUS}"
 
  TOOLCHAIN = "clang"
+TOOLCHAIN_NATIVE = "clang"
 
  def get_compiler_rt_arch(bb, d):
      if bb.utils.contains('TUNE_FEATURES', 'armv5 thumb dsp', True, False, d):
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#220135): https://lists.openembedded.org/g/openembedded-core/message/220135
Mute This Topic: https://lists.openembedded.org/mt/114096532/7304958
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#4 lore raw
Quoted 12 lines · Robert Yang

Hi Khem,

I got compiler-rt-native do_configure error Ubuntu 22.04.5 with this patch:

/ala-lpggp71/lyang1/poky/build-u/tmp/hosttools/ld: cannot find -lstdc++: No
such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see
invocation)
ninja: build stopped: subcommand failed.

Quoted 5 lines

I have tried:
1) Add libcxx-native back to compiler-rt-native's DEPENDS, there would be dependency loops.

2) Install libc++1 on the host, it doesn't work, get the same error.

you need to install libstdc++-devel that matches to newest gcc version installed on the host.

Quoted 45 lines

// Robert

Quoted 41 lines · Khem Raj via lists.openembedded.org
---
  meta/recipes-devtools/clang/compiler-rt_git.bb | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-devtools/clang/compiler-rt_git.bb +4 -4
index 342a7b0e95e..4da85f29378 100644
@@ -35,9 +35,9 @@ DEPENDS:remove:class-native = "libcxx-native compiler-rt-native"
  UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
  COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
  LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
-UNWINDLIB:class-native = ""
-COMPILER_RT:class-native = ""
-LIBCPLUSPLUS:class-native = ""
+UNWINDLIB:class-native = "--unwindlib=libgcc"
+COMPILER_RT:class-native = "-rtlib=libgcc"
+LIBCPLUSPLUS:class-native = "-stdlib=libstdc++"
  UNWINDLIB:class-target = "--unwindlib=libgcc"
  COMPILER_RT:class-target = "-rtlib=libgcc"
  LIBCPLUSPLUS:class-target = "-stdlib=libstdc++"
@@ -57,6 +57,7 @@ LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
  CXXFLAGS += "${LIBCPLUSPLUS}"
 
  TOOLCHAIN = "clang"
+TOOLCHAIN_NATIVE = "clang"
 
  def get_compiler_rt_arch(bb, d):
      if bb.utils.contains('TUNE_FEATURES', 'armv5 thumb dsp', True, False, d):
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#220135): https://lists.openembedded.org/g/openembedded-core/message/220135
Mute This Topic: https://lists.openembedded.org/mt/114096532/7304958
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#5 lore raw
Quoted 13 lines · Khem Raj
Quoted 12 lines · Robert Yang

Hi Khem,

I got compiler-rt-native do_configure error Ubuntu 22.04.5 with this patch:

/ala-lpggp71/lyang1/poky/build-u/tmp/hosttools/ld: cannot find -lstdc++: No
such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see
invocation)
ninja: build stopped: subcommand failed.

Quoted 8 lines
Quoted 5 lines

I have tried:
1) Add libcxx-native back to compiler-rt-native's DEPENDS, there would be dependency loops.

2) Install libc++1 on the host, it doesn't work, get the same error.

you need to install libstdc++-devel that matches to newest gcc version installed on the host.

Thank you very much, it works after install libstdc++-12-dev on my host.

// Robert

Quoted 46 lines
Quoted 46 lines

// Robert

Quoted 41 lines · Khem Raj via lists.openembedded.org
---
   meta/recipes-devtools/clang/compiler-rt_git.bb | 7 ++++---
   1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-devtools/clang/compiler-rt_git.bb +4 -4
index 342a7b0e95e..4da85f29378 100644
@@ -35,9 +35,9 @@ DEPENDS:remove:class-native = "libcxx-native compiler-rt-native"
   UNWINDLIB:class-nativesdk = "--unwindlib=libgcc"
   COMPILER_RT:class-nativesdk = "-rtlib=libgcc"
   LIBCPLUSPLUS:class-nativesdk = "-stdlib=libstdc++"
-UNWINDLIB:class-native = ""
-COMPILER_RT:class-native = ""
-LIBCPLUSPLUS:class-native = ""
+UNWINDLIB:class-native = "--unwindlib=libgcc"
+COMPILER_RT:class-native = "-rtlib=libgcc"
+LIBCPLUSPLUS:class-native = "-stdlib=libstdc++"
   UNWINDLIB:class-target = "--unwindlib=libgcc"
   COMPILER_RT:class-target = "-rtlib=libgcc"
   LIBCPLUSPLUS:class-target = "-stdlib=libstdc++"
@@ -57,6 +57,7 @@ LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
   CXXFLAGS += "${LIBCPLUSPLUS}"
 
   TOOLCHAIN = "clang"
+TOOLCHAIN_NATIVE = "clang"
 
   def get_compiler_rt_arch(bb, d):
       if bb.utils.contains('TUNE_FEATURES', 'armv5 thumb dsp', True, False, d):
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#220135): https://lists.openembedded.org/g/openembedded-core/message/220135
Mute This Topic: https://lists.openembedded.org/mt/114096532/7304958
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-