summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-01-20 09:13:11 -0800
committerKhem Raj <raj.khem@gmail.com>2020-02-21 08:25:54 -0800
commit64aa45cebb8d1dea90bf81e84a802f0ef103db14 (patch)
tree46e07b57042e7fdead8f57e10740e2659976aefa /recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch
parent20c73898bfc2d5111d29ac8cb39021e031f68cae (diff)
downloadmeta-clang-64aa45cebb8d1dea90bf81e84a802f0ef103db14.tar.gz
clang: Upgrade clang to 10.x release (RC2)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch')
-rw-r--r--recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch b/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch
new file mode 100644
index 0000000..6074a98
--- /dev/null
+++ b/recipes-devtools/clang/clang/0011-clang-Prepend-trailing-to-sysroot.patch
@@ -0,0 +1,38 @@
1From 29b016e8af2283abd9dbbe5c229727c3facb8b4c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 16 Mar 2017 09:02:13 -0700
4Subject: [PATCH] clang: Prepend trailing '/' to sysroot
5
6This is needed to handle a case where clang
7isntall and target sysroot are perilously same
8
9e.g.
10
11sysroot = /mnt/clang/recipe-sysroot
12clang install = /mnt/clang/recipe-sysroot-native
13
14in this case it will mistakenly assume that
15clang is installed under the same sysroot dir
16and it will try to add relative ../lib paths
17to linker steps which would then be wrong
18since they will become relative to clang
19installation and not sysroot
20
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22---
23 clang/lib/Driver/ToolChains/Linux.cpp | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
27index 02e3d676567..d95da11e351 100644
28--- a/clang/lib/Driver/ToolChains/Linux.cpp
29+++ b/clang/lib/Driver/ToolChains/Linux.cpp
30@@ -223,7 +223,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
31 Multilibs = GCCInstallation.getMultilibs();
32 SelectedMultilib = GCCInstallation.getMultilib();
33 llvm::Triple::ArchType Arch = Triple.getArch();
34- std::string SysRoot = computeSysRoot();
35+ std::string SysRoot = computeSysRoot() + "/";
36
37 // Cross-compiling binutils and GCC installations (vanilla and openSUSE at
38 // least) put various tools in a triple-prefixed directory off of the parent