aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Driver/ToolChains/Linux.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:11 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:11 +0000
commitc7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (patch)
tree27425930fc0c91650a7f3527fcac8e0f92907b90 /lib/Driver/ToolChains/Linux.cpp
parent486754660bb926339aefcf012a3f848592babb8b (diff)
downloadsrc-c7e70c433efc6953dc3888b9fbf9f3512d7da2b0.tar.gz
src-c7e70c433efc6953dc3888b9fbf9f3512d7da2b0.zip
Vendor import of clang trunk r338536:vendor/clang/clang-trunk-r338536
Notes
Notes: svn path=/vendor/clang/dist/; revision=337139 svn path=/vendor/clang/clang-trunk-r338536/; revision=337140; tag=vendor/clang/clang-trunk-r338536
Diffstat (limited to 'lib/Driver/ToolChains/Linux.cpp')
-rw-r--r--lib/Driver/ToolChains/Linux.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
index d27f994d32ab..f8f36239180c 100644
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
@@ -376,7 +376,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
}
addPathIfExists(D, SysRoot + "/usr/lib/" + MultiarchTriple, Paths);
- addPathIfExists(D, SysRoot + "/usr/lib/../" + OSLibDir, Paths);
+ // 64-bit OpenEmbedded sysroots may not have a /usr/lib dir. So they cannot
+ // find /usr/lib64 as it is referenced as /usr/lib/../lib64. So we handle
+ // this here.
+ if (Triple.getVendor() == llvm::Triple::OpenEmbedded &&
+ Triple.isArch64Bit())
+ addPathIfExists(D, SysRoot + "/usr/" + OSLibDir, Paths);
+ else
+ addPathIfExists(D, SysRoot + "/usr/lib/../" + OSLibDir, Paths);
if (IsRISCV) {
StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple);
addPathIfExists(D, SysRoot + "/" + OSLibDir + "/" + ABIName, Paths);