From 719faf1ca0c2227a150fb139b73873e893f411db Mon Sep 17 00:00:00 2001 From: aoliva Date: Thu, 3 Sep 2009 05:55:57 +0000 Subject: ChangeLog: * configure.ac (--with-build-config): New. Set BUILD_CONFIG. Default to bootstrap-debug only if compare-debug works. * configure: Rebuilt. * Makefile.tpl: Make BUILD_CONFIG configure-configurable. * Makefile.in: Rebuilt. contrib/ChangeLog: * bootstrap-debug-big.mk (STAGE2_CFLAGS): Drop -gtoggle. * bootstrap-debug-lean.mk: Update comments. (STAGE2_CFLAGS): Likewise. (do-compare): Don't override. gcc/ChangeLog: * doc/invoke.texi (BUILD_CONFIG): Document --with-build-config. (bootstrap-debug): Explain conditions in which it becomes default. (bootstrap-debug-big): Rather than duplicate bootstrap-debug, make it add to it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151367 138bc75d-0d04-0410-961f-82ee72b054a4 --- configure.ac | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 48fa58019ed..caff7e5af13 100644 --- a/configure.ac +++ b/configure.ac @@ -2459,13 +2459,40 @@ case "$have_compiler:$host:$target:$enable_bootstrap" in esac # Adjust the toplevel makefile according to whether bootstrap was selected. -case "$enable_bootstrap" in +case $enable_bootstrap in yes) - bootstrap_suffix=bootstrap ;; + bootstrap_suffix=bootstrap + BUILD_CONFIG=bootstrap-debug + ;; no) - bootstrap_suffix=no-bootstrap ;; + bootstrap_suffix=no-bootstrap + BUILD_CONFIG= + ;; esac +AC_MSG_CHECKING(for default BUILD_CONFIG) +if test "x${with_build_config}" != x; then + BUILD_CONFIG=$with_build_config +else + case $BUILD_CONFIG in + bootstrap-debug) + if echo "int f (void) { return 0; }" > conftest.c && + ${CC} -c conftest.c && + mv conftest.o conftest.o.g0 && + ${CC} -c -g conftest.c && + mv conftest.o conftest.o.g && + ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g; then + : + else + BUILD_CONFIG= + fi + rm -f conftest.c conftest.o conftest.o.g0 conftest.o.g + ;; + esac +fi +AC_MSG_RESULT($BUILD_CONFIG) +AC_SUBST(BUILD_CONFIG) + for module in ${build_configdirs} ; do if test -z "${no_recursion}" \ && test -f ${build_subdir}/${module}/Makefile; then -- cgit v1.2.1