[cfe-commits] r160060 - /cfe/trunk/lib/Driver/ToolChains.cpp

Chad Rosier mcrosier at apple.com
Wed Jul 11 12:08:21 PDT 2012

Author: mcrosier
Date: Wed Jul 11 14:08:21 2012
New Revision: 160060

URL: http://llvm.org/viewvc/llvm-project?rev=160060&view=rev
[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 at arm.com>.


Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=160060&r1=160059&r2=160060&view=diff
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Jul 11 14:08:21 2012
@@ -1905,6 +1905,11 @@
     // 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";

More information about the cfe-commits mailing list