1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- From ef6d2733699177e973abced7e6045b95b39caf76 Mon Sep 17 00:00:00 2001
- From: Jun Yuan Tan <junyuan.tan@starfivetech.com>
- Date: Tue, 9 Nov 2021 10:10:37 +0800
- Subject: [PATCH 09/34] clang: Prepend trailing '/' to sysroot
- This is needed to handle a case where clang
- isntall and target sysroot are perilously same
- e.g.
- sysroot = /mnt/clang/recipe-sysroot
- clang install = /mnt/clang/recipe-sysroot-native
- in this case it will mistakenly assume that
- clang is installed under the same sysroot dir
- and it will try to add relative ../lib paths
- to linker steps which would then be wrong
- since they will become relative to clang
- installation and not sysroot
- Rebased to LLVM 14.0.0 by Jun Yuan Tan
- Signed-off-by: Khem Raj <raj.khem@gmail.com>
- Signed-off-by: Jun Yuan Tan <junyuan.tan@starfivetech.com>
- ---
- clang/lib/Driver/ToolChains/Linux.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
- index b7165be9a7a6..9fe4e5230045 100644
- --- a/clang/lib/Driver/ToolChains/Linux.cpp
- +++ b/clang/lib/Driver/ToolChains/Linux.cpp
- @@ -181,7 +181,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- Multilibs = GCCInstallation.getMultilibs();
- SelectedMultilib = GCCInstallation.getMultilib();
- llvm::Triple::ArchType Arch = Triple.getArch();
- - std::string SysRoot = computeSysRoot();
- + std::string SysRoot = computeSysRoot() + "/";
- ToolChain::path_list &PPaths = getProgramPaths();
-
- Generic_GCC::PushPPaths(PPaths);
- --
- 2.33.1
|