[cfe-commits] Fix search path for clang on latest DragonFly releases

John Marino draco at marino.st
Fri Nov 23 10:41:26 PST 2012


I submitted these patches to http://llvm.org/bugs/show_bug.cgi?id=14417 
yesterday, and was directed to resubmit them on this mailing list.

This is what I posted on the bug report:
=====================================================================
DragonFly is unique in that it has two base compilers.  For a few years, 
those compilers were gcc 4.1 and gcc 4.4.  At first gcc 4.1 was the 
primary compiler, and now gcc 4.4 is the primary compiler.

For the latest release, gcc 4.7 was brought into base and gcc 4.1 
removed.  At this point, clang stopped working on DragonFly because it 
had gcc41 in its internal search path.

The clang driver looks for crt* stuff in /usr/lib/gcc41, which no longer
exists.  The standard c++ library is also located there.

The attached patch changes the driver to first look in /usr/lib/gcc47 
and then fallback to /usr/lib/gcc44.  The fallback should guarantee that 
the latest clangs run on several past releases of DragonFly BSD as well 
as the latest version.

The patches were generated against clang release 3.1.
=====================================================================

The patch is attached.  It would be great if it made it into branch 3.2 
as well.

Regards,
John

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix_clang_on_dragonfly.patch.txt
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121123/fdf02cbe/attachment.txt>


More information about the cfe-commits mailing list