From 7d7d00bac5926ef5a554d247de8a860a4464a6a0 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Sun, 21 Sep 2014 23:38:05 +0000 Subject: [PATCH] configure.ac (target_header_dir): Move block defining this to before the block setting inhibit_libc. * configure.ac (target_header_dir): Move block defining this to before the block setting inhibit_libc. (inhibit_libc): When considering $with_headers, just check it it's explicitly "no". If not, also check if $target_header_dir/stdio.h is present. If not, set inhibit_libc=true. * configure: Regenerate. From-SVN: r215439 --- gcc/ChangeLog | 10 ++++++++ gcc/configure | 66 ++++++++++++++++++++++++++++++++++-------------- gcc/configure.ac | 34 ++++++++++++------------- 3 files changed, 74 insertions(+), 36 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b1a975516ad..649b7e44088 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2014-09-22 Hans-Peter Nilsson + + * configure.ac (target_header_dir): Move block defining + this to before the block setting inhibit_libc. + (inhibit_libc): When considering $with_headers, just + check it it's explicitly "no". If not, also check if + $target_header_dir/stdio.h is present. If not, set + inhibit_libc=true. + * configure: Regenerate. + 2014-09-21 Patrick Oppenlander * config/rs6000/t-spe (MULTILIB_EXCEPTIONS): Allow isel without SPE. diff --git a/gcc/configure b/gcc/configure index fc78f427c26..32e8094e366 100755 --- a/gcc/configure +++ b/gcc/configure @@ -6607,7 +6607,35 @@ fi if test $enable_werror_always = yes; then : strict_warn="$strict_warn${strict_warn:+ }-Werror" fi + if test "xmanual" != xmanual; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is GCC >=manual" >&5 +$as_echo_n "checking whether $CC is GCC >=manual... " >&6; } +if test "${acx_cv_prog_cc_gcc_manual_or_newer+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + set fnord `echo manual | tr '.' ' '` + shift + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ \ + < $1 * 10000 + $2 * 100 + $3 +#error insufficient +#endif +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + acx_cv_prog_cc_gcc_manual_or_newer=yes +else + acx_cv_prog_cc_gcc_manual_or_newer=no +fi +rm -f conftest.err conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_gcc_manual_or_newer" >&5 +$as_echo "$acx_cv_prog_cc_gcc_manual_or_newer" >&6; } + if test $acx_cv_prog_cc_gcc_manual_or_newer = yes; then : + strict_warn="$strict_warn${strict_warn:+ }-Werror" +fi +fi # The above macros do nothing if the compiler is not GCC. However, the @@ -11869,6 +11897,22 @@ elif test "x$TARGET_SYSTEM_ROOT" != x; then SYSTEM_HEADER_DIR=$build_system_header_dir 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="${test_exec_prefix}/${target_noncanonical}/sys-include" + elif test "x$with_build_sysroot" != "x"; then + target_header_dir="${with_build_sysroot}${native_system_header_dir}" + elif test "x$with_sysroot" = xyes; then + target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}" + else + target_header_dir="${with_sysroot}${native_system_header_dir}" + fi +else + target_header_dir=${native_system_header_dir} +fi + # If this is a cross-compiler that does not # have its own set of headers then define # inhibit_libc @@ -11880,7 +11924,7 @@ fi : ${inhibit_libc=false} if { { test x$host != x$target && test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; } && - { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then + { test "x$with_headers" = xno || test ! -f "$target_header_dir/stdio.h"; } ; then inhibit_libc=true fi @@ -18033,7 +18077,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18036 "configure" +#line 18080 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18139,7 +18183,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18142 "configure" +#line 18186 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -26627,22 +26671,6 @@ _ACEOF 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="${test_exec_prefix}/${target_noncanonical}/sys-include" - elif test "x$with_build_sysroot" != "x"; then - target_header_dir="${with_build_sysroot}${native_system_header_dir}" - elif test "x$with_sysroot" = xyes; then - target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}" - else - target_header_dir="${with_sysroot}${native_system_header_dir}" - fi -else - target_header_dir=${native_system_header_dir} -fi - # Determine the version of glibc, if any, used on the target. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target glibc version" >&5 $as_echo_n "checking for target glibc version... " >&6; } diff --git a/gcc/configure.ac b/gcc/configure.ac index c7f0e6a122f..eb480de6bd1 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1924,6 +1924,22 @@ elif test "x$TARGET_SYSTEM_ROOT" != x; then SYSTEM_HEADER_DIR=$build_system_header_dir 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="${test_exec_prefix}/${target_noncanonical}/sys-include" + elif test "x$with_build_sysroot" != "x"; then + target_header_dir="${with_build_sysroot}${native_system_header_dir}" + elif test "x$with_sysroot" = xyes; then + target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}" + else + target_header_dir="${with_sysroot}${native_system_header_dir}" + fi +else + target_header_dir=${native_system_header_dir} +fi + # If this is a cross-compiler that does not # have its own set of headers then define # inhibit_libc @@ -1935,7 +1951,7 @@ fi : ${inhibit_libc=false} if { { test x$host != x$target && test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; } && - { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then + { test "x$with_headers" = xno || test ! -f "$target_header_dir/stdio.h"; } ; then inhibit_libc=true fi AC_SUBST(inhibit_libc) @@ -4443,22 +4459,6 @@ if test x$with_sysroot = x && test x$host = x$target \ [Define to PREFIX/include if cpp should also search that directory.]) 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="${test_exec_prefix}/${target_noncanonical}/sys-include" - elif test "x$with_build_sysroot" != "x"; then - target_header_dir="${with_build_sysroot}${native_system_header_dir}" - elif test "x$with_sysroot" = xyes; then - target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}" - else - target_header_dir="${with_sysroot}${native_system_header_dir}" - fi -else - target_header_dir=${native_system_header_dir} -fi - # Determine the version of glibc, if any, used on the target. AC_MSG_CHECKING([for target glibc version]) AC_ARG_WITH([glibc-version], -- 2.30.2