From dc1fced67f67223682ebcc821ae537c05e7b059a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 11:33:28 -0700 Subject: compiler-rt: Use gcc runtime to bootstrap while compiler-rt may not use any of these libraries, but the cmake environment pokes for working compiler, linker and other tools, this ensures that it can build when RUNTIME = "llvm" and also RUNTIME = "gnu" Signed-off-by: Khem Raj (cherry picked from commit 7f431875e4edc2a11a9881714e4845efeee54f77) Conflicts: - recipes-devtools/clang/compiler-rt_git.bb: Commit 93552c79eed5daa44a24bf4b7a063a2ade739e97 had already backported parts of this commit. --- recipes-devtools/clang/compiler-rt_git.bb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index b61ede0..49566e7 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb @@ -8,22 +8,26 @@ SECTION = "base" require clang.inc require common-source.inc -inherit cmake pkgconfig python3native +inherit cmake cmake-native pkgconfig python3native LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee54e877a" LIBCPLUSPLUS = "" COMPILER_RT = "" + TUNE_CCARGS_remove = "-no-integrated-as" INHIBIT_DEFAULT_DEPS = "1" -DEPENDS += "ninja-native" -DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" +DEPENDS += "ninja-native libgcc" +DEPENDS_append_class-target = " clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc gcc-runtime" DEPENDS_append_class-nativesdk = " clang-native" DEPENDS_append_class-native = " clang-native" +CXXFLAGS += "-stdlib=libstdc++" +LDFLAGS += "-unwindlib=libgcc -rtlib=libgcc -stdlib=libstdc++" + PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" -- cgit v1.2.3-54-g00ecf