Sorry, forgot to attach the patch.

On Sun, Apr 24, 2011 at 5:15 PM, Thomas Jablin <[email protected]> 
wrote:
> Hi,
> Presently, clang does not correctly detect the gcc triple for Ubuntu
> 11.04 (Natty). Please find enclosed a short patch to ToolChains.cpp
> that allows clang to work correctly on Ubuntu 11.04. Ubuntu 11.04 will
> be released on April 28. Thanks.
> Tom
>
Index: lib/Driver/ToolChains.cpp
===================================================================
--- lib/Driver/ToolChains.cpp	(revision 129874)
+++ lib/Driver/ToolChains.cpp	(working copy)
@@ -1294,6 +1294,9 @@
     else if (!llvm::sys::fs::exists("/usr/lib/gcc/x86_64-manbo-linux-gnu",
              Exists) && Exists)
       GccTriple = "x86_64-manbo-linux-gnu";
+    else if (!llvm::sys::fs::exists("/usr/lib/x86_64-linux-gnu/gcc",
+             Exists) && Exists)
+      GccTriple = "x86_64-linux-gnu";
   } else if (Arch == llvm::Triple::x86) {
     if (!llvm::sys::fs::exists("/usr/lib/gcc/i686-linux-gnu", Exists) && Exists)
       GccTriple = "i686-linux-gnu";
@@ -1379,7 +1382,7 @@
   if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb)
     ExtraOpts.push_back("-X");
 
-  if (IsFedora(Distro) || Distro == UbuntuMaverick)
+  if (IsFedora(Distro) || Distro == UbuntuMaverick || Distro == UbuntuNatty)
     ExtraOpts.push_back("--hash-style=gnu");
 
   if (IsDebian(Distro) || Distro == UbuntuLucid || Distro == UbuntuJaunty ||
@@ -1391,7 +1394,7 @@
 
   if (Distro == DebianSqueeze || IsOpenSuse(Distro) ||
       IsFedora(Distro) || Distro == UbuntuLucid || Distro == UbuntuMaverick ||
-      Distro == UbuntuKarmic)
+      Distro == UbuntuKarmic || Distro == UbuntuNatty)
     ExtraOpts.push_back("--build-id");
 
   if (Distro == ArchLinux)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to