On Thu, 26 Apr 2018, Richard Biener wrote: > On Thu, 26 Apr 2018, Bernhard Reutner-Fischer wrote: > > > On 25 April 2018 16:11:23 CEST, Richard Biener <rguent...@suse.de> wrote: > > >On Wed, 25 Apr 2018, Jakub Jelinek wrote: > > > > > >> On Wed, Apr 25, 2018 at 03:52:28PM +0200, Richard Biener wrote: > > >> > Forcefully setting STAGE3_[CT]FLAGS doesn't have any effect on > > >> > a checking enabled build but it will disrupt profiledbootstrap > > >> > on a release build by training with -fchecking. Suggestions > > >> > welcome - not sure whether adjusting STAGE3_[CT]FLAGS after > > >> > setting STAGEtrain_[CT]FLAGS will have the desired effect of > > >> > leaving the latter alone. > > >> > > >> You could perhaps replace > > >> STAGEtrain_CFLAGS = $(STAGE3_CFLAGS) > > >> STAGEtrain_TFLAGS = $(STAGE3_TFLAGS) > > >> with > > >> STAGEtrain_CFLAGS = $(filter-out -fchecking,$(STAGE3_CFLAGS)) > > >> STAGEtrain_TFLAGS = $(filter-out -fchecking,$(STAGE3_TFLAGS)) > > >> ? > > > > > >Good idea - I'll check if that works. > > > > Is filter-out guaranteed to be supported on anything other than GNU make? > > We use it elsewhere already.
Ok, so the following passed bootstrap & profiledbootstrap (and I checked we only get -fno-checking at the appropriate places and not -fchecking) on trunk, a bootstrap with all languages and release checking is running (just to see whether no-checking but -fchecking during stage3 uncovers any latent issue). OK for trunk? Thanks, Richard. 2018-04-26 Richard Biener <rguent...@suse.de> * Makefile.tpl (STAGE1_TFLAGS): Add -fno-checking. (STAGE2_CFLAGS): Likewise. (STAGE2_TFLAGS): Likewise. (STAGE3_CFLAGS): Add -fchecking. (STAGE3_TFLAGS): Likewise. (STAGEtrain_CFLAGS): Filter out -fchecking. (STAGEtrain_TFLAGS): Likewise. * Makefile.in: Re-generate. Index: Makefile.tpl =================================================================== --- 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. +STAGE1_TFLAGS += -fno-checking +STAGE2_CFLAGS += -fno-checking +STAGE2_TFLAGS += -fno-checking +STAGE3_CFLAGS += -fchecking +STAGE3_TFLAGS += -fchecking + STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate STAGEprofile_TFLAGS = $(STAGE2_TFLAGS) -STAGEtrain_CFLAGS = $(STAGE3_CFLAGS) -STAGEtrain_TFLAGS = $(STAGE3_TFLAGS) +STAGEtrain_CFLAGS = $(filter-out -fchecking,$(STAGE3_CFLAGS)) +STAGEtrain_TFLAGS = $(filter-out -fchecking,$(STAGE3_TFLAGS)) STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS) Index: Makefile.in =================================================================== --- Makefile.in (revision 259638) +++ Makefile.in (working copy) @@ -529,11 +529,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. +STAGE1_TFLAGS += -fno-checking +STAGE2_CFLAGS += -fno-checking +STAGE2_TFLAGS += -fno-checking +STAGE3_CFLAGS += -fchecking +STAGE3_TFLAGS += -fchecking + STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate STAGEprofile_TFLAGS = $(STAGE2_TFLAGS) -STAGEtrain_CFLAGS = $(STAGE3_CFLAGS) -STAGEtrain_TFLAGS = $(STAGE3_TFLAGS) +STAGEtrain_CFLAGS = $(filter-out -fchecking,$(STAGE3_CFLAGS)) +STAGEtrain_TFLAGS = $(filter-out -fchecking,$(STAGE3_TFLAGS)) STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS)