diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-10-22 14:58:56 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-10-22 14:58:56 +0900 |
commit | 4204309872da5cb401cbb2729d9e2d4869a87f42 (patch) | |
tree | c7415e8600205e40ff7e91e8e5f4c411f30329f2 /external/meta-clang/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch | |
parent | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (diff) |
agl-basesystem 0.1sandbox/ToshikazuOhiwa/master
Diffstat (limited to 'external/meta-clang/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch')
-rw-r--r-- | external/meta-clang/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/external/meta-clang/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/external/meta-clang/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch new file mode 100644 index 00000000..8425f8d8 --- /dev/null +++ b/external/meta-clang/recipes-devtools/clang/clang/0005-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch @@ -0,0 +1,44 @@ +From e02d9f3e1c724a4161709952a3ef59f81432fc06 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 16 Mar 2017 19:06:26 -0700 +Subject: [PATCH 5/8] 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 <raj.khem@gmail.com> +--- + lib/Driver/ToolChain.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp +index cf3db34688..dae3178380 100644 +--- a/lib/Driver/ToolChain.cpp ++++ b/lib/Driver/ToolChain.cpp +@@ -13,6 +13,7 @@ + #include "ToolChains/Clang.h" + #include "clang/Basic/ObjCRuntime.h" + #include "clang/Basic/Sanitizers.h" ++#include "clang/Basic/Version.h" + #include "clang/Basic/VirtualFileSystem.h" + #include "clang/Config/config.h" + #include "clang/Driver/Action.h" +@@ -343,7 +344,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 { +-- +2.18.0 + |