In 4.1 (and maybe even 4.0), we used to build with checking enable in stage1 to check some bugs but now with the toplevel bootstrap, this no longer happens.
In 4.2 and above: gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I/src/gcc/eh/gcc/gcc -I/src/gcc/eh/gcc/gcc/. -I/src/gcc/eh/gcc/gcc/../include -I/src/gcc/eh/gcc/gcc/../libcpp/include -I/src/gcc/eh/gcc/gcc/../libdecnumber -I../libdecnumber /src/gcc/eh/gcc/gcc/tree-ssa.c -o tree-ssa.o In 4.1: gcc -c -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H -I. -I. -I/home/pinskia/src/gcc/gcc-4.1/gcc/gcc -I/home/pinskia/src/gcc/gcc-4.1/gcc/gcc/. -I/home/pinskia/src/gcc/gcc-4.1/gcc/gcc/../include -I/home/pinskia/src/gcc/gcc-4.1/gcc/gcc/../libcpp/include /home/pinskia/src/gcc/gcc-4.1/gcc/gcc/tree-ssa.c -o tree-ssa.o
I think there are two ways of fixing this is do --enable-checking=yes for stage1 gcc configuring or the way 4.1 does it via CFLAGS.
I am going to fix it via the configure option, for the mainline I am going to recommend to also add rtl checking for stage1.
Like this? Index: /Users/bonzinip/cvs/gcc/Makefile.def =================================================================== --- /Users/bonzinip/cvs/gcc/Makefile.def (revision 116745) +++ /Users/bonzinip/cvs/gcc/Makefile.def (working copy) @@ -480,7 +480,7 @@ dependencies = { module=all-target-winsu // Toplevel bootstrap bootstrap_stage = { id=1 ; - stage_configure_flags='--disable-intermodule \ + stage_configure_flags='--disable-intermodule --enable-checking \ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ; stage_make_flags='CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)"' ; }; bootstrap_stage = {
(In reply to comment #4) > Like this? Actually thinking about it some more, that will cause stage1 not to be build with the more checking if the user wanted it to be, ie --enable-checking=yes,rtl,gcac when configuring.
ok, mine then.
Subject: Bug 29544 Author: bonzini Date: Tue Dec 19 11:01:36 2006 New Revision: 120048 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120048 Log: 2006-12-19 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/29544 * Makefile.def (flags_to_pass): Add STAGE1_CHECKING. (bootstrap_stage): Add STAGE1_CHECKING to stage1 configure flags, move here comment from Makefile.tpl. * Makefile.tpl: Move some definitions higher in the file. (STAGE1_CHECKING): New. * configure.in: Add --enable-stage1-checking. * configure: Regenerate. * Makefile.in: Regenerate. gcc: 2006-12-19 Paolo Bonzini <bonzini@gnu.org> * gcc/Makefile.in (STAGE1_CHECKING): Rename to... (STAGE1_CHECKING_CFLAGS): ... this. Modified: trunk/ChangeLog trunk/Makefile.def trunk/Makefile.in trunk/Makefile.tpl trunk/configure trunk/configure.in trunk/gcc/ChangeLog trunk/gcc/Makefile.in
Subject: Bug 29544 Author: bonzini Date: Fri Dec 29 17:47:06 2006 New Revision: 120272 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120272 Log: 2006-12-29 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/29544 * Makefile.def (flags_to_pass): Add STAGE1_CHECKING. (bootstrap_stage): Add STAGE1_CHECKING to stage1 configure flags, move here comment from Makefile.tpl. * Makefile.tpl: Move some definitions higher in the file. (STAGE1_CHECKING): New. * configure.in: Add --enable-stage1-checking. Disable --enable-werror on release branches. gcc: 2006-12-29 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/29544 * gcc/Makefile.in (STAGE1_CHECKING): Rename to... (STAGE1_CHECKING_CFLAGS): ... this. Modified: branches/gcc-4_2-branch/ChangeLog branches/gcc-4_2-branch/Makefile.def branches/gcc-4_2-branch/Makefile.in branches/gcc-4_2-branch/Makefile.tpl branches/gcc-4_2-branch/configure branches/gcc-4_2-branch/configure.in branches/gcc-4_2-branch/gcc/ChangeLog branches/gcc-4_2-branch/gcc/Makefile.in
committed