From e0934282902c565a98ddf255c7d224d568e7161e Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 26 Jul 2015 13:08:14 -0400 Subject: 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. --- gcc/configure | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gcc/configure') 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 -- cgit v1.2.3