This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: CFLAGS used during stage1 bootstrap


  In message <199811121105.LAA12302@sun52.NIS.cambridge>you write:
  > But if I run "make bootstrap" from the top level, then the stage1 make 
  > only gets to use CC=CONFIG_CC while CFLAGS gets forced to -g.
  > 
  > Since the stage1 make is only used to build the stage2 compiler, which is 
  > then only used to build the stage3 compiler (and the last two are 
  > compared), how does this increase the level of confidence that I haven't 
  > been bitten by a bug in the installed (CONFIG_CC) compiler?  If I have, 
  > then the compare (or the stage2/3 make) will fail; if I haven't then it's 
  > taken twice as long as was necessary to build the stage2 compiler because 
  > the stage1 compiler isn't optimized (if CONFIG_CC is gcc, then typically, 
  > the stage1 compiler is about half as fast as the stage2 compiler).
If your host cc is buggy, then it's more likely to generate bogus code for
the stage2 compiler, which in turn may (or may not) cause differences in the
stage3 compiler.

In fact, I suspect some of the non-reproducible bootstrapping problems some
folks are reporting are related to this kind of a problem.

  > PS.  There was a time when gcc -O was LESS buggy than gcc -O0 simply 
  > because it gets more testing, I don't know if this is still true.
Generally true. However, from snapshot to snapshot I'd probably trust -O0
because we're not tweaking the base code generator as much as we do the
optimizers.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]