summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-10-31 09:06:40 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-10-31 09:06:40 +0000
commit4c042fe66703eb6dd61e7af51a58e007cc84d486 (patch)
treef25f4a0274f44cf2bc4e18d021303bca025952ba /clang/lib/Driver/ToolChains.cpp
parent68ed0ae51c6e57904cbacf2970200cb2cf0b2005 (diff)
downloadbcm5719-llvm-4c042fe66703eb6dd61e7af51a58e007cc84d486.tar.gz
bcm5719-llvm-4c042fe66703eb6dd61e7af51a58e007cc84d486.zip
Simplify the set of directories we look for on multiarch systems.
I don't have any Debian system with one of these currently, and it seems unlikely for one to show up suddenly. We can add more patterns here if they become necessary. llvm-svn: 143346
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
-rw-r--r--clang/lib/Driver/ToolChains.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index 0f6828644db..d6c0a2ef0e7 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -1756,21 +1756,15 @@ static std::string getMultiarchTriple(const llvm::Triple TargetTriple,
// We use the existence of '/lib/<triple>' as a directory to detect some
// common linux triples that don't quite match the Clang triple for both
- // 32-bit and 64-bit targets. This works around annoying discrepancies on
- // Debian-based systems.
+ // 32-bit and 64-bit targets. Multiarch fixes its install triples to these
+ // regardless of what the actual target triple is.
case llvm::Triple::x86:
- if (llvm::sys::fs::exists(SysRoot + "/lib/i686-linux-gnu"))
- return "i686-linux-gnu";
if (llvm::sys::fs::exists(SysRoot + "/lib/i386-linux-gnu"))
return "i386-linux-gnu";
return TargetTriple.str();
case llvm::Triple::x86_64:
if (llvm::sys::fs::exists(SysRoot + "/lib/x86_64-linux-gnu"))
return "x86_64-linux-gnu";
- if (llvm::sys::fs::exists(SysRoot + "/lib/x86_64-pc-linux-gnu"))
- return "x86_64-pc-linux-gnu";
- if (llvm::sys::fs::exists(SysRoot + "/lib/x86_64-unknown-linux-gnu"))
- return "x86_64-unknown-linux-gnu";
return TargetTriple.str();
}
}
OpenPOWER on IntegriCloud