Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2008-02-20 17:26:59 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2008-02-20 17:26:59 +0300
commit6532abb624384b9c0429928e5a9f88a8d77009cf (patch)
tree46b4e409c1a406a39f1f571ae0d8e01e569e119d /configure.ac
parent9feffba7d9efa09d0a0b3a7293f52418253d0d99 (diff)
2008-02-20 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/32009 PR bootstrap/32161 * configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Compute here. * configure: Regenerate. * Makefile.def: Define stage_libcflags for all bootstrap stages. * Makefile.tpl (BOOT_LIBCFLAGS, STAGE2_LIBCFLAGS, STAGE3_LIBCFLAGS, STAGE4_LIBCFLAGS): New. (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Subst from autoconf, without $(SYSROOT_CFLAGS_FOR_TARGET) and $(DEBUG_PREFIX_CFLAGS_FOR_TARGET). (BASE_TARGET_EXPORTS): Append them here to C{,XX}FLAGS. (EXTRA_TARGET_FLAGS): Append them here to {LIB,}C{,XX}FLAGS. (configure-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags for target modules. Don't export LIBCFLAGS. (all-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags; pass $(BASE_FLAGS_TO_PASS) where [+args+] was passed, and [+args+] after the overridden CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. (invocations of `all'): Replace $(TARGET_FLAGS_TO_PASS) with $(EXTRA_TARGET_FLAGS), $(FLAGS_TO_PASS) with $(EXTRA_HOST_FLAGS). * Makefile.in: Regenerate. config: 2008-02-20 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/32009 * mh-ppc-darwin (BOOT_CFLAGS): Reenable.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 32 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 315fa3bd8..e81fcdbfe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1667,6 +1667,38 @@ AC_ARG_WITH([debug-prefix-map],
[DEBUG_PREFIX_CFLAGS_FOR_TARGET=])
AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
+# We want to ensure that TARGET libraries (which we know are built with
+# gcc) are built with "-O2 -g", so include those options when setting
+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
+if test "x$CFLAGS_FOR_TARGET" = x; then
+ CFLAGS_FOR_TARGET=$CFLAGS
+ case " $CFLAGS " in
+ *" -O2 "*) ;;
+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
+ esac
+ case " $CFLAGS " in
+ *" -g "* | *" -g3 "*) ;;
+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
+ esac
+fi
+AC_SUBST(CFLAGS_FOR_TARGET)
+
+if test "x$CXXFLAGS_FOR_TARGET" = x; then
+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
+ case " $CXXFLAGS " in
+ *" -O2 "*) ;;
+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
+ esac
+ case " $CXXFLAGS " in
+ *" -g "* | *" -g3 "*) ;;
+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
+ esac
+fi
+AC_SUBST(CXXFLAGS_FOR_TARGET)
+
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then