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

David Chisnall csdavec at swan.ac.uk
Thu May 19 06:26:33 PDT 2011


Author: theraven
Date: Thu May 19 08:26:33 2011
New Revision: 131637

URL: http://llvm.org/viewvc/llvm-project?rev=131637&view=rev
Log:
- Fixes openSUSE detection for 11.4 and upcoming 12.1
- Adds gcc 4.6 to gcc list so that linking will work on openSUSE 12.1

Patch by İsmail Dönmez!


Modified:
    cfe/trunk/lib/Driver/ToolChains.cpp

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=131637&r1=131636&r2=131637&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Thu May 19 08:26:33 2011
@@ -1179,6 +1179,8 @@
   Fedora15,
   FedoraRawhide,
   OpenSuse11_3,
+  OpenSuse11_4,
+  OpenSuse12_1,
   UbuntuHardy,
   UbuntuIntrepid,
   UbuntuJaunty,
@@ -1195,7 +1197,8 @@
 }
 
 static bool IsOpenSuse(enum LinuxDistro Distro) {
-  return Distro == OpenSuse11_3;
+  return Distro == OpenSuse11_3 || Distro == OpenSuse11_4 ||
+         Distro == OpenSuse12_1;
 }
 
 static bool IsDebian(enum LinuxDistro Distro) {
@@ -1281,6 +1284,10 @@
     llvm::StringRef Data = File.get()->getBuffer();
     if (Data.startswith("openSUSE 11.3"))
       return OpenSuse11_3;
+    else if (Data.startswith("openSUSE 11.4"))
+      return OpenSuse11_4;
+    else if (Data.startswith("openSUSE 12.1"))
+      return OpenSuse12_1;
     return UnknownDistro;
   }
 
@@ -1376,7 +1383,7 @@
       GccTriple = "powerpc64-unknown-linux-gnu";
   }
 
-  const char* GccVersions[] = {"4.6.0",
+  const char* GccVersions[] = {"4.6.0", "4.6",
                                "4.5.2", "4.5.1", "4.5",
                                "4.4.5", "4.4.4", "4.4.3", "4.4",
                                "4.3.4", "4.3.3", "4.3.2", "4.3",





More information about the cfe-commits mailing list