This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/57792] fixincludes doesn't honor the use of --with-sysroot during bootstrap
- From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 04 Jul 2013 17:27:47 +0000
- Subject: [Bug target/57792] fixincludes doesn't honor the use of --with-sysroot during bootstrap
- Auto-submitted: auto-generated
- References: <bug-57792-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57792
--- Comment #3 from Jack Howarth <howarth at nitro dot med.uc.edu> ---
(In reply to Bruce Korb from comment #2)
> Paolo did the config stuff, with Kaveh's help.
> However, Jack Howarth may be in a better position to
> make a patch since I do not have an Apple development
> system.
I would think that we want some permutation of the following code from
gcc/configure.ac added to fixincludes/configure.acâ
AC_ARG_WITH(sysroot,
[AS_HELP_STRING([[--with-sysroot[=DIR]]],
[search for usr/lib, usr/include, et al, within DIR])],
[
case ${with_sysroot} in
yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
*) TARGET_SYSTEM_ROOT=$with_sysroot ;;
esac
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
case ${TARGET_SYSTEM_ROOT} in
"${test_prefix}"|"${test_prefix}/"*|\
"${test_exec_prefix}"|"${test_exec_prefix}/"*|\
'${prefix}'|'${prefix}/'*|\
'${exec_prefix}'|'${exec_prefix}/'*)
t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
TARGET_SYSTEM_ROOT_DEFINE="$t"
;;
esac
], [
TARGET_SYSTEM_ROOT=
TARGET_SYSTEM_ROOT_DEFINE=
CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
])
AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
AC_SUBST(CROSS_SYSTEM_HEADER_DIR)
as well as associated changes to fixincludes/Makefile.in and
fixincludes/fixinc.in to have TARGET_SYSTEM_ROOT passed to and used by the
generated fixincludes/fixin shell script. I would be happy to test any proposed
fix along those lines (but I am unclear on how complex the additions to
fixincludes/configure.ac need to be to handle cross compiles, etc).