From owner-svn-src-all@FreeBSD.ORG Fri Feb 10 05:05:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DD3D1065686; Fri, 10 Feb 2012 05:05:42 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C88F8FC0A; Fri, 10 Feb 2012 05:05:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1A55gxG054660; Fri, 10 Feb 2012 05:05:42 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1A55grV054658; Fri, 10 Feb 2012 05:05:42 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201202100505.q1A55grV054658@svn.freebsd.org> From: Tim Kientzle Date: Fri, 10 Feb 2012 05:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231336 - head/contrib/gcc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 05:05:42 -0000 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))