From c684482df781c15e444220aceba4b9fd2a3f2629 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 25 Jul 2006 08:39:57 +0000 Subject: [PATCH] Sync from GCC 2006-07-04 Eric Botcazou PR bootstrap/18058 * configure.in: Add -fkeep-inline-functions to CFLAGS for stage 1 if the bootstrap compiler is a GCC version that supports it. * configure: Regenerate. config: 2006-07-21 David Daney PR libgcj/28426 * gxx-include-dir.m4: Use target_alias in path for cross build. --- ChangeLog | 10 ++++++++++ config/ChangeLog | 5 +++++ config/gxx-include-dir.m4 | 8 +++++++- configure | 31 +++++++++++++++++++++++++++++++ configure.in | 15 +++++++++++++++ 5 files changed, 68 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d86ec0aac..c50936063 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-07-25 Paolo Bonzini + + Sync from GCC: + 2006-07-04 Eric Botcazou + + PR bootstrap/18058 + * configure.in: Add -fkeep-inline-functions to CFLAGS for stage 1 + if the bootstrap compiler is a GCC version that supports it. + * configure: Regenerate. + 2006-07-22 Daniel Jacobowitz * configure.in: Allow mingw32 and cygwin targets to build cross-gdb. diff --git a/config/ChangeLog b/config/ChangeLog index 55ea2e292..bf0c5d6df 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -9,6 +9,11 @@ PR target/26792 * unwind_ipinfo.m4: New. + 2006-07-21 David Daney + + PR libgcj/28426 + * gxx-include-dir.m4: Use target_alias in path for cross build. + 2006-07-18 Paolo Bonzini * acx.m4: Support --with-build-libsubdir and AC_SUBST diff --git a/config/gxx-include-dir.m4 b/config/gxx-include-dir.m4 index 0e6e4ffc3..4f54d427f 100644 --- a/config/gxx-include-dir.m4 +++ b/config/gxx-include-dir.m4 @@ -17,7 +17,13 @@ case "${with_gxx_include_dir}" in yes) gxx_include_dir='$(libsubdir)/include/c++' ;; *) libstdcxx_incdir='c++/$(gcc_version)' - gxx_include_dir='$(prefix)/include/$(libstdcxx_incdir)' ;; + gxx_include_dir='include/$(libstdcxx_incdir)' + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + gxx_include_dir='${prefix}/${target_alias}/'"$gxx_include_dir" + else + gxx_include_dir='${prefix}/'"$gxx_include_dir" + fi;; esac ;; *) gxx_include_dir=${with_gxx_include_dir} ;; esac diff --git a/configure b/configure index 0f948368f..22cdb87e4 100755 --- a/configure +++ b/configure @@ -7263,6 +7263,37 @@ case $build in ;; esac +# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. +if test "$GCC" = yes; then + saved_CFLAGS="$CFLAGS" + + # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it. + CFLAGS="$CFLAGS -fkeep-inline-functions" + echo $ac_n "checking whether -fkeep-inline-functions is supported""... $ac_c" 1>&6 +echo "configure:7274: checking whether -fkeep-inline-functions is supported" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; stage1_cflags="$stage1_cflags -fkeep-inline-functions" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + CFLAGS="$saved_CFLAGS" +fi + + # Enable -Werror in bootstrap stage2 and later. # Change the default to "no" on release branches. diff --git a/configure.in b/configure.in index 48b3a334a..0c8335186 100644 --- a/configure.in +++ b/configure.in @@ -2397,6 +2397,21 @@ case $build in stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" ;; esac + +# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. +if test "$GCC" = yes; then + saved_CFLAGS="$CFLAGS" + + # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it. + CFLAGS="$CFLAGS -fkeep-inline-functions" + AC_MSG_CHECKING([whether -fkeep-inline-functions is supported]) + AC_TRY_COMPILE(,, + [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"], + [AC_MSG_RESULT([no])]) + + CFLAGS="$saved_CFLAGS" +fi + AC_SUBST(stage1_cflags) # Enable -Werror in bootstrap stage2 and later.