diff options
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.patch | 38 |
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 @@ | |||
1 | From 29b016e8af2283abd9dbbe5c229727c3facb8b4c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 16 Mar 2017 09:02:13 -0700 | ||
4 | Subject: [PATCH] clang: Prepend trailing '/' to sysroot | ||
5 | |||
6 | This is needed to handle a case where clang | ||
7 | isntall and target sysroot are perilously same | ||
8 | |||
9 | e.g. | ||
10 | |||
11 | sysroot = /mnt/clang/recipe-sysroot | ||
12 | clang install = /mnt/clang/recipe-sysroot-native | ||
13 | |||
14 | in this case it will mistakenly assume that | ||
15 | clang is installed under the same sysroot dir | ||
16 | and it will try to add relative ../lib paths | ||
17 | to linker steps which would then be wrong | ||
18 | since they will become relative to clang | ||
19 | installation and not sysroot | ||
20 | |||
21 | Signed-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 | |||
26 | diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp | ||
27 | index 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 | ||