ChangeLog:

* configure.ac (with-build-config): Document.  Handle without.
Handle missing argument.
* configure: Rebuilt.
config/ChangeLog:
* bootstrap-debug-big.mk (STAGE2_CFLAGS): Drop -gtoggle.
* bootstrap-debug-lean.mk: Update comments.
(STAGE2_CFLAGS): Likewise.
(do-compare): Don't override.
ChangeLog:
* configure.ac (with-build-config): Document.  Handle without.
Handle missing argument.
* configure: Rebuilt.
This commit is contained in:
Alexandre Oliva 2009-09-07 00:44:08 +00:00
parent 99790663b8
commit 5566205831
12 changed files with 183 additions and 9 deletions

View File

@ -1,3 +1,22 @@
2009-09-04 Alexandre Oliva <aoliva@redhat.com>
* configure.ac (with-build-config): Document. Handle without.
Handle missing argument.
* configure: Rebuilt.
2009-09-03 Alexandre Oliva <aoliva@redhat.com>
* 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.
2009-09-01 Alexandre Oliva <aoliva@redhat.com>
* Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug.
* Makefile.in: Rebuilt.
2009-09-02 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl (AWK): Fix typo.

View File

@ -771,7 +771,7 @@ EXTRA_GCC_FLAGS = \
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
@if gcc
BUILD_CONFIG =
BUILD_CONFIG = @BUILD_CONFIG@
ifneq ($(BUILD_CONFIG),)
include $(foreach CONFIG, $(BUILD_CONFIG), $(srcdir)/config/$(CONFIG).mk)
endif

View File

@ -619,7 +619,7 @@ EXTRA_GCC_FLAGS = \
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
@if gcc
BUILD_CONFIG =
BUILD_CONFIG = @BUILD_CONFIG@
ifneq ($(BUILD_CONFIG),)
include $(foreach CONFIG, $(BUILD_CONFIG), $(srcdir)/config/$(CONFIG).mk)
endif

View File

@ -1,3 +1,19 @@
2009-09-03 Alexandre Oliva <aoliva@redhat.com>
* bootstrap-debug-big.mk (STAGE2_CFLAGS): Drop -gtoggle.
* bootstrap-debug-lean.mk: Update comments.
(STAGE2_CFLAGS): Likewise.
(do-compare): Don't override.
2009-09-01 Alexandre Oliva <aoliva@redhat.com>
* bootstrap-debug.mk: Add comments.
* bootstrap-debug-big.mk: New.
* bootstrap-debug-lean.mk: New.
* bootstrap-debug-ckovw.mk: Add comments.
* bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0
for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle.
2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* override.m4 (_GCC_AUTOCONF_VERSION): Bump to 2.64.

View File

@ -0,0 +1,8 @@
# This BUILD_CONFIG option is a bit like bootstrap-debug-lean, but it
# trades space for speed: instead of recompiling programs during
# stage3, it generates dumps during stage2 and stage3, saving them all
# until the final compare.
STAGE2_CFLAGS += -fdump-final-insns
STAGE3_CFLAGS += -fdump-final-insns
do-compare = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2

View File

@ -0,0 +1,16 @@
# This BUILD_CONFIG option is to be used along with
# bootstrap-debug-lean and bootstrap-debug-lib in a full bootstrap, to
# check that all host and target files are built with -fcompare-debug.
# These arrange for a simple warning to be issued if -fcompare-debug
# is not given.
# BOOT_CFLAGS += -fcompare-debug="-w%n-fcompare-debug not overridden"
# TFLAGS += -fcompare-debug="-w%n-fcompare-debug not overridden"
# GCC_COMPARE_DEBUG="-w%n-fcompare-debug not overridden";
FORCE_COMPARE_DEBUG = \
GCC_COMPARE_DEBUG=$${GCC_COMPARE_DEBUG--fcompare-debug-not-overridden}; \
export GCC_COMPARE_DEBUG;
POSTSTAGE1_HOST_EXPORTS += $(FORCE_COMPARE_DEBUG)
BASE_TARGET_EXPORTS += $(FORCE_COMPARE_DEBUG)

View File

@ -0,0 +1,11 @@
# This BUILD_CONFIG option is a bit like bootstrap-debug, but rather
# than comparing stripped object files, it compares compiler internal
# state during stage3. Both can be used simultaneously.
# This makes it slower than bootstrap-debug alone, for there's
# additional dumping and recompilation during stage3.
# bootstrap-debug-big can avoid the recompilation, if plenty of disk
# space is available.
STAGE2_CFLAGS += -fcompare-debug=
STAGE3_CFLAGS += -fcompare-debug

View File

@ -0,0 +1,12 @@
# This BUILD_CONFIG option tests that target libraries built during
# stage3 would have generated the same executable code if they were
# compiled with -g0.
# It uses -g0 rather than -gtoggle because -g is default on target
# library builds, and toggling it where it's supposed to be disabled
# breaks e.g. crtstuff on ppc.
STAGE1_TFLAGS += -g0 -fcompare-debug=
STAGE2_TFLAGS += -fcompare-debug=
STAGE3_TFLAGS += -fcompare-debug=-g0
do-compare = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2

View File

@ -1,2 +1,12 @@
STAGE2_CFLAGS += -g0
# This BUILD_CONFIG option builds checks that toggling debug
# information generation doesn't affect the generated object code.
# It is very lightweight: in addition to not performing any additional
# compilation (unlike bootstrap-debug-lean), it actually speeds up
# stage2, for no debug information is generated when compiling with
# the unoptimized stage1.
# For more thorough testing, see bootstrap-debug-lean.mk
STAGE2_CFLAGS += -gtoggle
do-compare = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2

2
config/bootstrap-time.mk Normal file
View File

@ -0,0 +1,2 @@
BOOT_CFLAGS += -time=$(shell pwd)/time.log
TFLAGS += -time=$(shell pwd)/time.log

50
configure vendored
View File

@ -631,6 +631,7 @@ build_tooldir
tooldir
GCC_SHLIB_SUBDIR
RPATH_ENVVAR
BUILD_CONFIG
CXXFLAGS_FOR_TARGET
CFLAGS_FOR_TARGET
DEBUG_PREFIX_CFLAGS_FOR_TARGET
@ -768,6 +769,7 @@ enable_objc_gc
with_build_sysroot
with_debug_prefix_map
enable_bootstrap
with_build_config
enable_serial_configure
with_build_time_tools
enable_maintainer_mode
@ -1497,6 +1499,8 @@ Optional Packages:
use sysroot as the system root during the build
--with-debug-prefix-map='A=B C=D ...'
map A to B, C to D ... in debug information
--with-build-config='NAME NAME2...'
Use config/NAME.mk build configuration
--with-build-time-tools=PATH
use given path to find target tools during the build
@ -6569,13 +6573,53 @@ $as_echo "$as_me: WARNING: trying to bootstrap a cross compiler" >&2;}
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default BUILD_CONFIG" >&5
$as_echo_n "checking for default BUILD_CONFIG... " >&6; }
# Check whether --with-build-config was given.
if test "${with_build_config+set}" = set; then :
withval=$with_build_config; case $with_build_config in
yes) with_build_config= ;;
no) with_build_config= BUILD_CONFIG= ;;
esac
fi
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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CONFIG" >&5
$as_echo "$BUILD_CONFIG" >&6; }
for module in ${build_configdirs} ; do
if test -z "${no_recursion}" \
&& test -f ${build_subdir}/${module}/Makefile; then

View File

@ -2459,13 +2459,49 @@ 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)
AC_ARG_WITH([build-config],
[--with-build-config='NAME NAME2...'
Use config/NAME.mk build configuration],
[case $with_build_config in
yes) with_build_config= ;;
no) with_build_config= BUILD_CONFIG= ;;
esac])
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