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, fix ALL_C*FLAGS use in HOST entries


On Wed, Mar 21, 2001 at 02:29:19PM -0500, DJ Delorie wrote:
> 
> > If you look at the HOST_CFLAGS and HOST_CPPFLAGS, both include
> > ALL_C*FLAGS, however ALL_C*FLAGS is not defined until later. This just
> > moves the definition to the correct spot to pick up those variables.
> 
> This shouldn't be needed, because makefile macros are expanded when
> they're used, not when they're defined.  Are you actually seeing a
> problem with the current Makefile?
> 
You are correct. I really shouldn't try to figure out the gcc build
system so late at night.

However, I do believe I found the cause of my problem.

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.

Sorry for previous, I should have spent more time on it.

Is attaching this here correct? Or should I let this thread die and
submit a new patch?

Gordon Sadler



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]