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

Douglas Gregor dgregor at apple.com
Mon Mar 14 08:39:50 PDT 2011


Author: dgregor
Date: Mon Mar 14 10:39:50 2011
New Revision: 127583

URL: http://llvm.org/viewvc/llvm-project?rev=127583&view=rev
Log:
Support Ubuntu hardy and intrepid, from Thomas Gamper!

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=127583&r1=127582&r2=127583&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Mon Mar 14 10:39:50 2011
@@ -1280,6 +1280,8 @@
   Fedora13,
   Fedora14,
   OpenSuse11_3,
+  UbuntuHardy,
+  UbuntuIntrepid,
   UbuntuJaunty,
   UbuntuKarmic,
   UbuntuLucid,
@@ -1300,7 +1302,8 @@
 }
 
 static bool IsUbuntu(enum LinuxDistro Distro) {
-  return Distro == UbuntuLucid || Distro == UbuntuMaverick || 
+  return Distro == UbuntuHardy  || Distro == UbuntuIntrepid ||
+         Distro == UbuntuLucid  || Distro == UbuntuMaverick || 
          Distro == UbuntuJaunty || Distro == UbuntuKarmic;
 }
 
@@ -1329,6 +1332,10 @@
     llvm::SmallVector<llvm::StringRef, 8> Lines;
     Data.split(Lines, "\n");
     for (unsigned int i = 0, s = Lines.size(); i < s; ++ i) {
+      if (Lines[i] == "DISTRIB_CODENAME=hardy")
+        return UbuntuHardy;
+      if (Lines[i] == "DISTRIB_CODENAME=intrepid")
+        return UbuntuIntrepid;      
       if (Lines[i] == "DISTRIB_CODENAME=maverick")
         return UbuntuMaverick;
       else if (Lines[i] == "DISTRIB_CODENAME=lucid")
@@ -1444,7 +1451,8 @@
 
   const char* GccVersions[] = {"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"};
+                               "4.3", "4.2.4", "4.2.3", "4.2.2", "4.2.1",
+                               "4.2"};
   std::string Base = "";
   for (unsigned i = 0; i < sizeof(GccVersions)/sizeof(char*); ++i) {
     std::string Suffix = GccTriple + "/" + GccVersions[i];





More information about the cfe-commits mailing list