From: Khem Raj Date: Thu, 7 Aug 2025 00:44:24 +0000 (-0700) Subject: libcxx: Create packageconfig for cross unwinder support X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=88e1214e01c48b174aa9516c60e15a0dfb69e10f;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git libcxx: Create packageconfig for cross unwinder support cross-unwinding can pass exception across runtimes e.g. Multi-language applications ( nodejs native modules, python C extensions ) However, cross-unwinding is not default in libcxx for sometime [1] it requires special handling at runtime by apps who use it Switch recipe defaults to upstream defaults, which is to turn it off This means native unwinding ( with in same runtime ) is build by default which is the most common case. This also fixes libcxx/libunwind build errors when enabling TC_CXX_RUNTIME = "llvm" on aarch64 particularly [1] https://github.com/llvm/llvm-project/commit/85624c5de3e831ffa01fdc2d159e3d69c30de08d Signed-off-by: Khem Raj Signed-off-by: Mathieu Dubois-Briand --- diff --git a/meta/recipes-devtools/clang/libcxx_git.bb b/meta/recipes-devtools/clang/libcxx_git.bb index d6bacc33d6..b0ee3925f4 100644 --- a/meta/recipes-devtools/clang/libcxx_git.bb +++ b/meta/recipes-devtools/clang/libcxx_git.bb @@ -20,6 +20,7 @@ PACKAGECONFIG[exceptions] = "-DLIBCXXABI_ENABLE_EXCEPTIONS=ON -DLIBCXX_ENABLE_EX PACKAGECONFIG[no-atomics] = "-D_LIBCXXABI_HAS_ATOMIC_BUILTINS=OFF -DCMAKE_SHARED_LINKER_FLAGS='-latomic',," PACKAGECONFIG[compiler-rt] = "-DLIBCXX_USE_COMPILER_RT=ON -DLIBCXXABI_USE_COMPILER_RT=ON -DLIBUNWIND_USE_COMPILER_RT=ON,,compiler-rt" PACKAGECONFIG[unwind-shared] = "-DLIBUNWIND_ENABLE_SHARED=ON,-DLIBUNWIND_ENABLE_SHARED=OFF,," +PACKAGECONFIG[unwind-cross] = "-DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON,-DLIBUNWIND_ENABLE_CROSS_UNWINDING=OFF,," DEPENDS:append:class-target = " virtual/cross-c++ ${MLPREFIX}clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${MLPREFIX}compilerlibs" DEPENDS:append:class-nativesdk = " virtual/cross-c++ clang-crosssdk-${SDK_SYS} nativesdk-compiler-rt" @@ -64,7 +65,6 @@ EXTRA_OECMAKE += "\ -DCMAKE_CROSSCOMPILING=ON \ -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ -DLLVM_ENABLE_RTTI=ON \ - -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON \ -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \ -DLIBCXXABI_INCLUDE_TESTS=OFF \ -DLIBCXXABI_ENABLE_SHARED=ON \