Hi Chandler,<div><br></div><div>I had submitted a patch a while back for this that didn't get picked up, in order to compile anything c++ related I also needed to include the attached portion.</div><div><br></div><div>
Note: I've only actually tried this on a 32-bit machine, but the 64bit path was what I saw in the arch package when I checked online.</div><div><br></div><div>Also, I didn't need the Lib = "lib" chunk; although it doesn't seem to break anything for me. Maybe that's needed for the 64bit?</div>
<div><br></div><div>Thanks,<br>Jon<br><br><div class="gmail_quote">On Fri, Feb 25, 2011 at 12:44 AM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I don't use ArchLinux, but this seems fairly reasonable to me. If any ArchLinux users pipe up to request a different approach I'm all ears, but for now I've committed your patch in r126476 (modulo sorting the enum). Please let me know if that works? I'd be interested to know that Clang is working mostly out-of-the-box on ArchLinux.<div>

<br></div><div>Thanks,</div><div>-Chandler<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Thu, Feb 24, 2011 at 4:39 PM, Kevin Winchester <span dir="ltr"><<a href="mailto:kjwinchester@gmail.com" target="_blank">kjwinchester@gmail.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">Hi,<br>
<br>
I need to apply the patch below in order for clang to work properly on<br>
Arch Linux, due to errors finding crt*.o.  I am not sure if this is<br>
the best way to fix the issue, but it seems to work for me.  I've<br>
attached the patch as a file as well, since I know that GMail tends to<br>
mangle them.<br>
<br>
--<br>
Kevin Winchester<br>
<br>
---<br>
<br>
Index: lib/Driver/ToolChains.cpp<br>
===================================================================<br>
--- lib/Driver/ToolChains.cpp   (revision 126451)<br>
+++ lib/Driver/ToolChains.cpp   (working copy)<br>
@@ -1281,6 +1281,7 @@<br>
   UbuntuKarmic,<br>
   UbuntuLucid,<br>
   UbuntuMaverick,<br>
+  ArchLinux,<br>
   UnknownDistro<br>
 };<br>
<br>
@@ -1367,6 +1368,9 @@<br>
   if (!llvm::sys::fs::exists("/etc/exherbo-release", Exists) && Exists)<br>
     return Exherbo;<br>
<br>
+  if (!llvm::sys::fs::exists("/etc/arch-release", Exists) && Exists)<br>
+    return ArchLinux;<br>
+<br>
   return UnknownDistro;<br>
 }<br>
<br>
@@ -1436,7 +1440,7 @@<br>
       GccTriple = "i586-suse-linux";<br>
   }<br>
<br>
-  const char* GccVersions[] = {"4.5.1", "4.5", "4.4.5", "4.4.4",<br>
"4.4.3", "4.4",<br>
+  const char* GccVersions[] = {"4.5.2", "4.5.1", "4.5", "4.4.5",<br>
"4.4.4", "4.4.3", "4.4",<br>
                                "4.3.4", "4.3.3", "4.3.2", "4.3"};<br>
   std::string Base = "";<br>
   for (unsigned i = 0; i < sizeof(GccVersions)/sizeof(char*); ++i) {<br>
@@ -1498,6 +1502,9 @@<br>
       Distro == UbuntuKarmic)<br>
     ExtraOpts.push_back("--build-id");<br>
<br>
+  if (Distro == ArchLinux)<br>
+    Lib = "lib";<br>
+<br>
   Paths.push_back(Base + Suffix);<br>
   if (HasMultilib(Arch, Distro)) {<br>
     if (IsOpenSuse(Distro) && Is32Bits)<br>
<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Jon Mulder<div>C 847.899.3664</div><div>E <a href="mailto:mulderje@muohio.edu" target="_blank">mulderje@muohio.edu</a></div><br>
</div>