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: [PATCH] gcc/Makefile.in gcc-3_0-branch, pass CFLAGS to stage1_build


On Monday 26 March 2001 18:35, Richard Earnshaw wrote:
> > > During stage1, we should be able to override CFLAGS from the
> > > commandline. The comments in the Makefile.in say this explicitly.
> > > But, they are not being passed to stage1 build. I was reading some
> >
> > build
> >
> > > logs when I noticed stage1 being built with some odd flags,
> > > investigation led me to wrongly conclude the previous patch. Now, I
> >
> > am
> >
> > > fairly certain of the attached patch being correct.
> >
> > It looks correct to me, but I wonder if there are additional flags
> > (the stage2 list is quite long) that stage1 should have.
> >  AFAICT from comments around stag1_build, it is not really important
> > to pass stage1 lots of flags as the bootstrap may be done with a
> > native compiler. However, by the time stage2_build is called,
> > xgcc_stage1 is available with support for all of gcc's flags.
> >
> > > Is attaching this here correct? Or should I let this thread die and
> > > submit a new patch?
> >
> > It at least needs a valid ChangeLog entry, but this mailing list is
> > the correct place for it.
> >
> > > -   $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
> > >
> > > +   $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
> >
> >  \
> >
> > > +           CFLAGS="$(CFLAGS)"
> >
> >  Ok here goes. I'll attach patch again, include ChangeLog entry and
> > change subject/thread to match.
>
> Hmm, this topic was discussed over two years ago (I brought it up).  It
> was rejected then because of the risk that the installed compiler might
> not be able to build a usable stage1 compiler.  Sadly, this is exactly
> what is happening now on arm-netbsd when we try to bootstrap with the
> system compiler (egcs-1.2 derived).
>
> See the following mails for a discussion on the subject:
>
> http://gcc.gnu.org/ml/gcc-patches/1998-11/msg00172.html
>
> http://gcc.gnu.org/ml/gcc-patches/1998-11/msg00185.html
>
> http://gcc.gnu.org/ml/gcc-patches/1998-11/msg00189.html
>
> http://gcc.gnu.org/ml/gcc-patches/1998-11/msg00207.html
>
>
> Can we back out the following please?  There's no technical need for it,
> and the only effect is that it shaves a small amount of time of the stage2
> build.
>
> + 2001-03-22  Gordon Sadler  <gbsadler1@lcisp.com>
> +
> +       * Makefile.in (stage1_build): Pass CFLAGS to stage1_build.
> +

I second the backout request, I have no problems, but I agree with Richards 
arguments. People can always pass STAGE1_CFLAGS to get different flags for 
stage1 (which is useful sometimes).
My understanding is:
 - passing CFLAGS to the build sets the flags for stage2+ and target libraries
 - with BOOT_CFLAGS you can override the flags used for stage2+
 - pass STAGE1_CFLAGS to override flags for stage1 in a native build

Hmm, I just notice the toplevel Makefile doesn't handle STAGE1_CFLAGS, that 
may be the real bug here. Hmm2, reminds me to check if passing  
MAKEINFO/MAKEINFOFLAGS to toplevel works correctly in current sources...

Franz.


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