This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR57792 fixincludes doesn't honor the use of --with-sysroot during bootstrap
- From: Bruce Korb <bkorb at gnu dot org>
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 04 Jul 2013 10:41:45 -0700
- Subject: Re: PR57792 fixincludes doesn't honor the use of --with-sysroot during bootstrap
- References: <20130704164015 dot GA15640 at bromo dot med dot uc dot edu>
On 07/04/13 09:40, Jack Howarth wrote:
Currently I am forced to manually patch fixincludes/fixinc.in to have the DIR passed to
--with-sysroot honored during the bootstrap. Thanks in advance for any help in getting
this oversight in fixincludes fixed for gcc 4.9.
Jack
I saw the bug report. I find autotools sufficiently flexible that they
are neigh on opaque. I *think* you'll need:
AC_ARG_WITH([sysroot],
[the system include directory -- default: /usr/include],
[ AC_DEFINE_UNQUOTED([SYSTEM_INC_DIR], "$withval",
[system include directory])
[if test -d "$withval" ; then SYSTEM_INC_DIR=$withval
else AC_MSG_ERROR([provided value is not a directory: $withval]) ; fi]],
[SYSTEM_INC_DIR=/usr/include])
and then replace the INPUTLIST definition with:
test $# -eq 0 && INPUTLIST="@SYSTEM_INC_DIR@" || INPUTLIST="$*"
using "$@" is confusing and won't actually work:
$ set a b c\ d;echo $#;f="$@";set -- $f; echo $#
3
4
Anyway, I *think* that works, but like I said, it's pretty opaque to me.