svn commit: r231336 - head/contrib/gcc

Tim Kientzle kientzle at
Fri Feb 10 05:05:42 UTC 2012

Author: kientzle
Date: Fri Feb 10 05:05:42 2012
New Revision: 231336

  Implement -print-file-name=include (which is undocumented
  but used by some Linux boot loaders).  This option prints
  out the directory holding the include files needed by
  a freestanding program.  The default implementation of
  this doesn't work on FreeBSD because of the different
  include file layout.  But it's easy to implement:
  just return /usr/include (or the cross-compiling equivalent).
  Reviewed by:	kan
  MFC after:	1 week


Modified: head/contrib/gcc/gcc.c
--- head/contrib/gcc/gcc.c	Fri Feb 10 04:11:04 2012	(r231335)
+++ head/contrib/gcc/gcc.c	Fri Feb 10 05:05:42 2012	(r231336)
@@ -2696,6 +2696,17 @@ find_a_file (const struct path_prefix *p
     return xstrdup (DEFAULT_LINKER);
+  if (! strcmp(name, "include"))
+    {
+      return xstrdup(CROSS_INCLUDE_DIR);
+      return xstrdup(STANDARD_INCLUDE_DIR);
+    }
   /* Determine the filename to execute (special case for absolute paths).  */
   if (IS_ABSOLUTE_PATH (name))

More information about the svn-src-all mailing list