diff options
author | midipix <writeonce@midipix.org> | 2015-07-26 13:08:14 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2015-07-26 13:08:14 -0400 |
commit | e0934282902c565a98ddf255c7d224d568e7161e (patch) | |
tree | 59310a68b536e5487b9ad7d83de833c07ca7788b | |
parent | 7a5252e170f6e2c6c1d483fe7f2ba56e98b1f8a2 (diff) | |
download | cbb-gcc-4.6.4-e0934282902c565a98ddf255c7d224d568e7161e.tar.bz2 cbb-gcc-4.6.4-e0934282902c565a98ddf255c7d224d568e7161e.tar.xz |
improved sysroot configurability for gcc, distinguishing between
host/target sysroot and build sysroot.
signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information.
-rwxr-xr-x | gcc/configure | 12 | ||||
-rw-r--r-- | gcc/configure.ac | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/gcc/configure b/gcc/configure index 11ff560b9..646c0c10b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -6891,7 +6891,7 @@ else fi if test x${enable_multiarch} = xauto; then - if test x$host != x$target && test "x$with_sysroot" = x; then + if test x$host != x$target && test "x$with_sysroot" = x && test "x$with_build_sysroot" = x; then ma_msg_suffix=", disabled auto check (cross build configured without --with-sysroot)" enable_multiarch=no fi @@ -11376,7 +11376,7 @@ then *) ;; esac -elif test "x$TARGET_SYSTEM_ROOT" != x; then +elif test "x$TARGET_SYSTEM_ROOT" != x || test "x$with_build_sysroot" != x; then SYSTEM_HEADER_DIR=$build_system_header_dir fi @@ -11389,7 +11389,7 @@ fi # This prevents libgcc2 from containing any code which requires libc # support. : ${inhibit_libc=false} -if { { test x$host != x$target && test "x$with_sysroot" = x ; } || +if { { test x$host != x$target && test "x$with_sysroot" = x && test "x$with_build_sysroot" = x ; } || test x$with_newlib = xyes ; } && { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then inhibit_libc=true @@ -25742,7 +25742,7 @@ $as_echo "#define HAVE_LD_SYSROOT 1" >>confdefs.h fi -if test x$with_sysroot = x && test x$host = x$target \ +if test x$with_sysroot = x && test x$with_build_sysroot = x && test x$host = x$target \ && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \ && test "$prefix" != "NONE"; then @@ -25755,10 +25755,10 @@ fi if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then if test "x$with_headers" != x; then target_header_dir=$with_headers - elif test "x$with_sysroot" = x; then - target_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" elif test "x$with_build_sysroot" != "x"; then target_header_dir="${with_build_sysroot}/usr/include" + elif test "x$with_sysroot" = x; then + target_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" elif test "x$with_sysroot" = xyes; then target_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" else diff --git a/gcc/configure.ac b/gcc/configure.ac index 07a0c7837..ce64b1028 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -615,7 +615,7 @@ yes|no|auto) enable_multiarch=$enableval;; *) AC_MSG_ERROR(bad value ${enableval} given for --enable-multiarch option) ;; esac], [enable_multiarch=auto]) if test x${enable_multiarch} = xauto; then - if test x$host != x$target && test "x$with_sysroot" = x; then + if test x$host != x$target && test "x$with_sysroot" = x && test "x$with_build_sysroot" = x; then ma_msg_suffix=", disabled auto check (cross build configured without --with-sysroot)" enable_multiarch=no fi @@ -1771,7 +1771,7 @@ then *) ;; esac -elif test "x$TARGET_SYSTEM_ROOT" != x; then +elif test "x$TARGET_SYSTEM_ROOT" != x || test "x$with_build_sysroot" != x; then SYSTEM_HEADER_DIR=$build_system_header_dir fi @@ -1784,7 +1784,7 @@ fi # This prevents libgcc2 from containing any code which requires libc # support. : ${inhibit_libc=false} -if { { test x$host != x$target && test "x$with_sysroot" = x ; } || +if { { test x$host != x$target && test "x$with_sysroot" = x && test "x$with_build_sysroot" = x ; } || test x$with_newlib = xyes ; } && { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then inhibit_libc=true @@ -4336,7 +4336,7 @@ if test x"$gcc_cv_ld_sysroot" = xyes; then [Define if your linker supports --sysroot.]) fi -if test x$with_sysroot = x && test x$host = x$target \ +if test x$with_sysroot = x && test x$with_build_sysroot = x && test x$host = x$target \ && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \ && test "$prefix" != "NONE"; then AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include", @@ -4346,10 +4346,10 @@ fi if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then if test "x$with_headers" != x; then target_header_dir=$with_headers - elif test "x$with_sysroot" = x; then - target_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" elif test "x$with_build_sysroot" != "x"; then target_header_dir="${with_build_sysroot}/usr/include" + elif test "x$with_sysroot" = x; then + target_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" elif test "x$with_sysroot" = xyes; then target_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" else |