On Sun, 29 Apr 2018, Richard Biener wrote: > On April 29, 2018 1:06:47 AM GMT+02:00, David Edelsohn <dje....@gmail.com> > wrote: > >Hi, Richi > > > >I had been using two source trees to speed the bisection and didn't > >realize > >that one defaulted to DWARF debugging and the other defaulted to XCOFF > >debugging, which confused the bisection result. The -f[no-]checking > >patch > >is the culprit. > > My theory is that all non-bootstrap-debug bootstrap configs are currently > broken. > > I'll deal with this tomorrow.
So it looks like it is a very simple mistake fixed by properly ignoring -fchecking[=] in gen_producer_string (). I'm including the use of -fchecking=1 instead of -fchecking given that -fchecking=2 we may default to is documented to eventually affect code-generation. Bootstrap / bootstrap-O3 running on x86_64-unknown-linux-gnu. Richard. 2018-04-30 Richard Biener <rguent...@suse.de> * Makefile.tpl (STAGE3_CFLAGS): Use -fchecking=1. (STAGE3_TFLAGS): Likewise. (STAGEtrain_CFLAGS): Filter out -fchecking=1. (STAGEtrain_TFLAGS): Likewise. * Makefile.in: Regenerate. * dwarf2out.c (gen_producer_string): Ignore -fchecking[=]. Index: Makefile.tpl =================================================================== --- Makefile.tpl (revision 259754) +++ Makefile.tpl (working copy) @@ -459,14 +459,14 @@ STAGE1_CONFIGURE_FLAGS = --disable-inter STAGE1_TFLAGS += -fno-checking STAGE2_CFLAGS += -fno-checking STAGE2_TFLAGS += -fno-checking -STAGE3_CFLAGS += -fchecking -STAGE3_TFLAGS += -fchecking +STAGE3_CFLAGS += -fchecking=1 +STAGE3_TFLAGS += -fchecking=1 STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate STAGEprofile_TFLAGS = $(STAGE2_TFLAGS) -STAGEtrain_CFLAGS = $(filter-out -fchecking,$(STAGE3_CFLAGS)) -STAGEtrain_TFLAGS = $(filter-out -fchecking,$(STAGE3_TFLAGS)) +STAGEtrain_CFLAGS = $(filter-out -fchecking=1,$(STAGE3_CFLAGS)) +STAGEtrain_TFLAGS = $(filter-out -fchecking=1,$(STAGE3_TFLAGS)) STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS) Index: Makefile.in =================================================================== --- Makefile.in (revision 259754) +++ Makefile.in (working copy) @@ -536,14 +536,14 @@ STAGE1_CONFIGURE_FLAGS = --disable-inter STAGE1_TFLAGS += -fno-checking STAGE2_CFLAGS += -fno-checking STAGE2_TFLAGS += -fno-checking -STAGE3_CFLAGS += -fchecking -STAGE3_TFLAGS += -fchecking +STAGE3_CFLAGS += -fchecking=1 +STAGE3_TFLAGS += -fchecking=1 STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate STAGEprofile_TFLAGS = $(STAGE2_TFLAGS) -STAGEtrain_CFLAGS = $(filter-out -fchecking,$(STAGE3_CFLAGS)) -STAGEtrain_TFLAGS = $(filter-out -fchecking,$(STAGE3_TFLAGS)) +STAGEtrain_CFLAGS = $(filter-out -fchecking=1,$(STAGE3_CFLAGS)) +STAGEtrain_TFLAGS = $(filter-out -fchecking=1,$(STAGE3_TFLAGS)) STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS) Index: gcc/dwarf2out.c =================================================================== --- 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: