[cfe-commits] [Patch] Add libexec to toolchain search path on FreeBSD

Ed Schouten ed at 80386.nl
Sun Jun 13 11:44:39 PDT 2010

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");

 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100613/39a29945/attachment.sig>

More information about the cfe-commits mailing list