From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- ...inside-the-target-sysroot-for-compiler-ru.patch | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 external/meta-clang/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch (limited to 'external/meta-clang/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch') diff --git a/external/meta-clang/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/external/meta-clang/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch new file mode 100644 index 00000000..9316157d --- /dev/null +++ b/external/meta-clang/recipes-devtools/clang/clang/0012-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -0,0 +1,40 @@ +From 805b4ce637faedee91bb92fdae273b01bd5aa363 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 16 Mar 2017 19:06:26 -0700 +Subject: [PATCH] clang: Look inside the target sysroot for compiler runtime + +In OE compiler-rt and libc++ are built and staged into target +sysroot and not into resourcedir which is relative to clang +driver installation where the libraries are not instlled + +Specific to cross compiling the way yocto/OE works + +Signed-off-by: Khem Raj +--- + clang/lib/Driver/ToolChain.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp +index cab97b1a601..059a5e62c40 100644 +--- a/clang/lib/Driver/ToolChain.cpp ++++ b/clang/lib/Driver/ToolChain.cpp +@@ -14,6 +14,7 @@ + #include "ToolChains/Flang.h" + #include "clang/Basic/ObjCRuntime.h" + #include "clang/Basic/Sanitizers.h" ++#include "clang/Basic/Version.h" + #include "clang/Config/config.h" + #include "clang/Driver/Action.h" + #include "clang/Driver/Driver.h" +@@ -379,7 +380,10 @@ StringRef ToolChain::getOSLibName() const { + } + + std::string ToolChain::getCompilerRTPath() const { +- SmallString<128> Path(getDriver().ResourceDir); ++ SmallString<128> Path(getDriver().SysRoot); ++ StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX); ++ llvm::sys::path::append(Path, "/usr/", Twine("lib") + ClangLibdirSuffix, "clang", ++ CLANG_VERSION_STRING); + if (Triple.isOSUnknown()) { + llvm::sys::path::append(Path, "lib"); + } else { -- cgit 1.2.3-korg