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

Chandler Carruth chandlerc at gmail.com
Thu Feb 24 22:39:53 PST 2011


Author: chandlerc
Date: Fri Feb 25 00:39:53 2011
New Revision: 126476

URL: http://llvm.org/viewvc/llvm-project?rev=126476&view=rev
Log:
Add support for ArchLinux, patch by Kevin Winchester.

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=126476&r1=126475&r2=126476&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Feb 25 00:39:53 2011
@@ -1271,6 +1271,7 @@
 /// Linux toolchain (very bare-bones at the moment).
 
 enum LinuxDistro {
+  ArchLinux,
   DebianLenny,
   DebianSqueeze,
   Exherbo,
@@ -1367,6 +1368,9 @@
   if (!llvm::sys::fs::exists("/etc/exherbo-release", Exists) && Exists)
     return Exherbo;
 
+  if (!llvm::sys::fs::exists("/etc/arch-release", Exists) && Exists)
+    return ArchLinux;
+
   return UnknownDistro;
 }
 
@@ -1436,8 +1440,9 @@
       GccTriple = "i586-suse-linux";
   }
 
-  const char* GccVersions[] = {"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"};
+  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"};
   std::string Base = "";
   for (unsigned i = 0; i < sizeof(GccVersions)/sizeof(char*); ++i) {
     std::string Suffix = GccTriple + "/" + GccVersions[i];
@@ -1498,6 +1503,9 @@
       Distro == UbuntuKarmic)
     ExtraOpts.push_back("--build-id");
 
+  if (Distro == ArchLinux)
+    Lib = "lib";
+
   Paths.push_back(Base + Suffix);
   if (HasMultilib(Arch, Distro)) {
     if (IsOpenSuse(Distro) && Is32Bits)





More information about the cfe-commits mailing list