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]

[PATCH] gcc/Makefile.in gcc-3_0-branch, pass CFLAGS to stage1_build


On Thu, Mar 22, 2001 at 02:24:55PM -0500, DJ Delorie 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.


2001-03-22  Gordon Sadler  <gbsadler1@lcisp.com>

        * gcc/Makefile.in (stage1_build): pass CFLAGS to stage1_build



Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.602.2.7
diff -p -u -r1.602.2.7 Makefile.in
--- Makefile.in	2001/03/21 19:45:04	1.602.2.7
+++ Makefile.in	2001/03/22 04:26:08
@@ -2899,7 +2899,8 @@ STAGE2_FLAGS_TO_PASS = \
 # we can guarantee will build with the native compiler, and also it is the
 # only thing useful for building stage2.
 stage1_build:
-	$(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
+	$(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \
+		CFLAGS="$(CFLAGS)"
 	touch stage1_build
 	echo stage1_build > stage_last
 

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