aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-07-11 19:08:21 +0000
committerChad Rosier <mcrosier@apple.com>2012-07-11 19:08:21 +0000
commit0337efdba2b9477c2655cbb176d59c492a823aa4 (patch)
tree7bfadfa25823b4340275e7052ad87f20a71c70c4
parent8d71918ec9899b07a649ba3a3de2fb6a2e07ec4a (diff)
[driver] Fix so that clang can find correct path prefix for libc object files
from GNU binutils supporting multi-arch folder for ARM target. Patch by Jiangning Liu <jiangning.liu@arm.com>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160060 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Driver/ToolChains.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 93df747c3f..b858c3e428 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -1905,6 +1905,11 @@ static std::string getMultiarchTriple(const llvm::Triple TargetTriple,
// common linux triples that don't quite match the Clang triple for both
// 32-bit and 64-bit targets. Multiarch fixes its install triples to these
// regardless of what the actual target triple is.
+ case llvm::Triple::arm:
+ case llvm::Triple::thumb:
+ if (llvm::sys::fs::exists(SysRoot + "/lib/arm-linux-gnueabi"))
+ return "arm-linux-gnueabi";
+ return TargetTriple.str();
case llvm::Triple::x86:
if (llvm::sys::fs::exists(SysRoot + "/lib/i386-linux-gnu"))
return "i386-linux-gnu";