Hi all,

I'm trying to polish building FreeBSD with Clang and it seems we use the
following construct in one of our Makefiles:

`${CC} --print-prog-name=cc1obj` -print-objc-runtime-info

When CC=clang, it can't find the pathname of the cc1obj binary. For now,
I think it's a good idea if we just add /usr/libexec to the search path
as well. Patch given below:

Index: lib/Driver/ToolChains.cpp
===================================================================
--- lib/Driver/ToolChains.cpp   (revision 209125)
+++ lib/Driver/ToolChains.cpp   (working copy)
@@ -859,6 +859,8 @@
 
 FreeBSD::FreeBSD(const HostInfo &Host, const llvm::Triple& Triple, bool Lib32)
   : Generic_GCC(Host, Triple) {
+  getProgramPaths().push_back(getDriver().Dir + "/../libexec");
+  getProgramPaths().push_back("/usr/libexec");
   if (Lib32) {
     getFilePaths().push_back(getDriver().Dir + "/../lib32");
     getFilePaths().push_back("/usr/lib32");

-- 
 Ed Schouten <[email protected]>
 WWW: http://80386.nl/

Attachment: pgpq6pBRiLufg.pgp
Description: PGP signature

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to