Take in account the triplet 'powerpc-linux-gnuspe' for PowerPC SPE. Done for the...
authorSylvestre Ledru <sylvestre@debian.org>
Fri, 15 Mar 2013 16:22:43 +0000 (16:22 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Fri, 15 Mar 2013 16:22:43 +0000 (16:22 +0000)
llvm-svn: 177161

clang/lib/Driver/ToolChains.cpp

index 035af21..665d615 100644 (file)
@@ -1149,6 +1149,7 @@ Generic_GCC::GCCInstallationDetector::GCCInstallationDetector(
   static const char *const PPCTriples[] = {
     "powerpc-linux-gnu",
     "powerpc-unknown-linux-gnu",
+    "powerpc-linux-gnuspe",
     "powerpc-suse-linux",
     "powerpc-montavista-linuxspe"
   };
@@ -2255,6 +2256,8 @@ static std::string getMultiarchTriple(const llvm::Triple TargetTriple,
       return "mipsel-linux-gnu";
     return TargetTriple.str();
   case llvm::Triple::ppc:
+    if (llvm::sys::fs::exists(SysRoot + "/lib/powerpc-linux-gnuspe"))
+      return "powerpc-linux-gnuspe";
     if (llvm::sys::fs::exists(SysRoot + "/lib/powerpc-linux-gnu"))
       return "powerpc-linux-gnu";
     return TargetTriple.str();