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

Douglas Gregor dgregor at apple.com
Mon Mar 14 13:18:04 PDT 2011


Bill, please pull this into the 2.9 branch. 

	Thanks!
	- Doug

On Mar 14, 2011, at 8:39 AM, Douglas Gregor wrote:

> 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];
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits





More information about the cfe-commits mailing list