diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:11 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:11 +0000 | 
| commit | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (patch) | |
| tree | 27425930fc0c91650a7f3527fcac8e0f92907b90 /lib/Driver/ToolChains/Linux.cpp | |
| parent | 486754660bb926339aefcf012a3f848592babb8b (diff) | |
Notes
Diffstat (limited to 'lib/Driver/ToolChains/Linux.cpp')
| -rw-r--r-- | lib/Driver/ToolChains/Linux.cpp | 9 | 
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);  | 
