From 0ad6be9324bc16716ecd0b7fbbcbfd1e4aa5fc2c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 11 Sep 2022 22:13:43 -0700 Subject: compiler-rt-sanitizers: Fix arm builds With clang-15, it exposed an error building, where it is trying to link with libgcc even when llvm unwninder is available in distro. Therefore use DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON, other options are to match the recipe with compiler-rt recipe. Fix missing option -DCOMPILER_RT_ENABLE_STATIC_UNWINDER when building with static libcxx Signed-off-by: Khem Raj --- recipes-devtools/clang/compiler-rt-sanitizers_git.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index 67cf5a3..0444839 100644 --- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -21,7 +21,7 @@ DEPENDS:append:class-nativesdk = " clang-native clang-crosssdk-${SDK_ARCH} nativ PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" -PACKAGECONFIG[static-libcxx] = "-DSANITIZER_USE_STATIC_CXX_ABI=ON -DSANITIZER_USE_STATIC_LLVM_UNWINDER=ON,," +PACKAGECONFIG[static-libcxx] = "-DSANITIZER_USE_STATIC_CXX_ABI=ON -DSANITIZER_USE_STATIC_LLVM_UNWINDER=ON -DCOMPILER_RT_ENABLE_STATIC_UNWINDER=ON,," HF = "" HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" @@ -33,7 +33,9 @@ OECMAKE_SOURCEPATH = "${S}/llvm" EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \ -DCOMPILER_RT_STANDALONE_BUILD=OFF \ - -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=${HOST_ARCH}${HF}${HOST_VENDOR}-${HOST_OS} \ + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \ + -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON \ + -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH}${HF}${HOST_VENDOR}-${HOST_OS} \ -DCOMPILER_RT_BUILD_BUILTINS=OFF \ -DSANITIZER_CXX_ABI_LIBNAME=${@bb.utils.contains("RUNTIME", "llvm", "libc++", "libstdc++", d)} \ -DCOMPILER_RT_BUILD_XRAY=ON \ -- cgit v1.2.3-54-g00ecf