Date: Fri, 10 Feb 2012 05:05:42 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r231336 - head/contrib/gcc Message-ID: <201202100505.q1A55grV054658@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kientzle Date: Fri Feb 10 05:05:42 2012 New Revision: 231336 URL: http://svn.freebsd.org/changeset/base/231336 Log: 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 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); #endif +#ifdef FREEBSD_NATIVE + if (! strcmp(name, "include")) + { +#ifdef CROSS_INCLUDE_DIR + return xstrdup(CROSS_INCLUDE_DIR); +#else + return xstrdup(STANDARD_INCLUDE_DIR); +#endif + } +#endif + /* Determine the filename to execute (special case for absolute paths). */ if (IS_ABSOLUTE_PATH (name))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202100505.q1A55grV054658>