diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-05-14 17:17:32 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-06-08 11:37:54 -0700 |
commit | 76e37fafa29e9b2097eb823537b17d6cc638c1d5 (patch) | |
tree | 3456996103d56b15645179eebb0b52d2bce58445 /recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch | |
parent | 94cceaf952b72b6b02a117ef35fed3928e7dd7b3 (diff) | |
download | meta-clang-76e37fafa29e9b2097eb823537b17d6cc638c1d5.tar.gz |
clang: Upgrade to trunk/13.0 future series
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch')
-rw-r--r-- | recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch b/recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch deleted file mode 100644 index ea28de0..0000000 --- a/recipes-devtools/clang/clang/0008-clang-driver-Check-sysroot-for-ldso-path.patch +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | From 15008103e23b5e1cd65bcc32746aa41579583dc5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dan McGregor <dan.mcgregor@usask.ca> | ||
3 | Date: Wed, 26 Apr 2017 20:29:41 -0600 | ||
4 | Subject: [PATCH] clang: driver: Check sysroot for ldso path | ||
5 | |||
6 | OE does not necessarily follow the default path for the dynamic linker, | ||
7 | therefore adjust it for OE. Check for the default path, and if it isn't | ||
8 | there, check /lib. | ||
9 | |||
10 | Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | clang/lib/Driver/ToolChains/Linux.cpp | 16 ++++++++++++++++ | ||
14 | 1 file changed, 16 insertions(+) | ||
15 | |||
16 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp | ||
17 | index 9663a7390ada..06b92cc0bf5b 100644 | ||
18 | --- a/clang/lib/Driver/ToolChains/Linux.cpp | ||
19 | +++ b/clang/lib/Driver/ToolChains/Linux.cpp | ||
20 | @@ -507,11 +507,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | ||
21 | LibDir = "lib64"; | ||
22 | Loader = | ||
23 | (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1"; | ||
24 | + if (!getVFS().exists(getDriver().SysRoot + "/" + LibDir + "/" + Loader) && | ||
25 | + getVFS().exists(getDriver().SysRoot + "/lib/" + Loader)) { | ||
26 | + LibDir = "lib"; | ||
27 | + } | ||
28 | break; | ||
29 | case llvm::Triple::ppc64le: | ||
30 | LibDir = "lib64"; | ||
31 | Loader = | ||
32 | (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2"; | ||
33 | + if (!getVFS().exists(getDriver().SysRoot + "/" + LibDir + "/" + Loader) && | ||
34 | + getVFS().exists(getDriver().SysRoot + "/lib/" + Loader)) { | ||
35 | + LibDir = "lib"; | ||
36 | + } | ||
37 | break; | ||
38 | case llvm::Triple::riscv32: { | ||
39 | StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple); | ||
40 | @@ -533,6 +541,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | ||
41 | case llvm::Triple::sparcv9: | ||
42 | LibDir = "lib64"; | ||
43 | Loader = "ld-linux.so.2"; | ||
44 | + if (!getVFS().exists(getDriver().SysRoot + "/" + LibDir + "/" + Loader) && | ||
45 | + getVFS().exists(getDriver().SysRoot + "/lib/" + Loader)) { | ||
46 | + LibDir = "lib"; | ||
47 | + } | ||
48 | break; | ||
49 | case llvm::Triple::systemz: | ||
50 | LibDir = "lib"; | ||
51 | @@ -547,6 +559,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { | ||
52 | |||
53 | LibDir = X32 ? "libx32" : "lib64"; | ||
54 | Loader = X32 ? "ld-linux-x32.so.2" : "ld-linux-x86-64.so.2"; | ||
55 | + if (!getVFS().exists(getDriver().SysRoot + "/" + LibDir + "/" + Loader) && | ||
56 | + getVFS().exists(getDriver().SysRoot + "/lib/" + Loader)) { | ||
57 | + LibDir = "lib"; | ||
58 | + } | ||
59 | break; | ||
60 | } | ||
61 | case llvm::Triple::ve: | ||