Hi! On Thu, 26 Apr 2018 10:08:09 +0200 (CEST), Richard Biener <rguent...@suse.de> wrote: > --- Makefile.tpl (revision 259638) > +++ Makefile.tpl (working copy) > @@ -452,11 +452,21 @@ STAGE1_CONFIGURE_FLAGS = --disable-inter > --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \ > --disable-build-format-warnings > > +# When using the slow stage1 compiler disable IL verification and forcefully > +# enable it when using the stage2 compiler instead. As we later compare > +# stage2 and stage3 we are merely avoid doing redundant work, plus we apply > +# checking when building all target libraries for release builds.
Good idea to delay checking until late build stages! > +STAGE1_TFLAGS += -fno-checking > +STAGE2_CFLAGS += -fno-checking > +STAGE2_TFLAGS += -fno-checking > +STAGE3_CFLAGS += -fchecking > +STAGE3_TFLAGS += -fchecking This however means that when a user configured with "extra" checking enabled (for example, "--enable-checking=yes,extra", meaning a default of "-fchecking=2"), stage 3 now is not actually build anymore with "extra" checking enabled (configured default, or explicit "-fchecking=2"), but instead only with "normal checking" ("-fchecking" being equivalent to "-fchecking=1", as the above was changed to in the trunk r259755 change). That's probably to be considered surprising, unexpected. Given that, as documented, "extra" checking may affect code generation, we have three options: a) disable "extra" checking here (status quo), or b) disable the "-fno-checking optimization" if "extra" checking has been requested, or c) rework "extra" checking to not affect code generation. c) would seem best, but probably there's a reason for its current behavior, given that it has only recently been introduced. Also, the later trunk r259755 change had the following: * dwarf2out.c (gen_producer_string): Ignore -fchecking[=]. --- gcc/dwarf2out.c (revision 259754) +++ gcc/dwarf2out.c (working copy) @@ -24234,6 +24234,8 @@ gen_producer_string (void) case OPT_fmacro_prefix_map_: case OPT_ffile_prefix_map_: case OPT_fcompare_debug: + case OPT_fchecking: + case OPT_fchecking_: /* Ignore these. */ continue; default: ..., and I wonder whether "-fchecking=2" should actually continue to be included in the producer string as far as it affects code generation, and only "-fchecking=1" and "-fno-checking" be filtered out? Grüße Thomas