]> granicus.if.org Git - clang/commitdiff
Toolchain support for Ubuntu Oneiric. Patch by Michael Wild!
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 5 Jun 2011 16:08:59 +0000 (16:08 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 5 Jun 2011 16:08:59 +0000 (16:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132669 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp

index 14ca5532632f0d7d69a60049be1a4bf9b942a561..ca613e3d6c849d71fdfc39d25e7e871c5850f81c 100644 (file)
@@ -1201,6 +1201,7 @@ enum LinuxDistro {
   UbuntuLucid,
   UbuntuMaverick,
   UbuntuNatty,
+  UbuntuOneiric,
   UnknownDistro
 };
 
@@ -1224,7 +1225,7 @@ static bool IsUbuntu(enum LinuxDistro Distro) {
   return Distro == UbuntuHardy  || Distro == UbuntuIntrepid ||
          Distro == UbuntuLucid  || Distro == UbuntuMaverick ||
          Distro == UbuntuJaunty || Distro == UbuntuKarmic ||
-         Distro == UbuntuNatty;
+         Distro == UbuntuNatty  || Distro == UbuntuOneiric;
 }
 
 static bool IsDebianBased(enum LinuxDistro Distro) {
@@ -1269,6 +1270,8 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
         return UbuntuMaverick;
       else if (Lines[i] == "DISTRIB_CODENAME=natty")
         return UbuntuNatty;
+      else if (Lines[i] == "DISTRIB_CODENAME=oneiric")
+        return UbuntuOneiric;
     }
     return UnknownDistro;
   }
@@ -1497,7 +1500,7 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple)
     ExtraOpts.push_back("-X");
 
   if (IsRedhat(Distro) || IsOpenSuse(Distro) || Distro == UbuntuMaverick ||
-      Distro == UbuntuNatty)
+      Distro == UbuntuNatty || Distro == UbuntuOneiric)
     ExtraOpts.push_back("--hash-style=gnu");
 
   if (IsDebian(Distro) || IsOpenSuse(Distro) || Distro == UbuntuLucid ||
@@ -1512,7 +1515,7 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple)
       (IsRedhat(Distro) && Distro != RHEL4 && Distro != RHEL5) ||
       Distro == UbuntuLucid ||
       Distro == UbuntuMaverick || Distro == UbuntuKarmic ||
-      Distro == UbuntuNatty)
+      Distro == UbuntuNatty || Distro == UbuntuOneiric)
     ExtraOpts.push_back("--build-id");
 
   if (IsOpenSuse(Distro))