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: Include WARN_CFLAGS in CFLAGS passed for building fixinc.sh


> I noticed that Greg McGary's recent patch didn't include WARN_CFLAGS
> in the CFLAGS passed to mkfixinc.sh.  I think these should be passed
> as well.

This patch hasn't been reviewed yet.  Although passing WARN_CFLAGS to
mkfixinc.sh isn't very important at this time, I think there should be
consistency in the passing the flags to the various sub-makes.

I revamped the CFLAGS handling so that different flags could be used for
the initial compilations which might be done with a native compiler.  The
Makefile variables WARN1_CFLAGS and WARN2_CFLAGS are set by configure.
Currently, they are used for warning options and a compiler dependent
option on the vax.  Potentially, this method could be used to supply
compiler options on many other platforms.

I also noticed yesterday that the method of handling WARN_CFLAGS didn't
get updated for bootstrap4.  Thus, I have updated the original patch.
I have tested the patch with a complete bootstrap through to stage4
under i686 linux.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2000-09-21  J. David Anglin  <dave@hiauly1.hia.nrc.ca>

	* Makefile.in (fixinc.sh): Include WARN_CFLAGS in exported CFLAGS.
	(stage_f): Pass WARN_CFLAGS separately as in stage_c and stage_e.

--- Makefile.in.orig	Tue Sep 19 13:01:29 2000
+++ Makefile.in	Thu Sep 21 15:01:25 2000
@@ -1964,7 +1964,7 @@
 	$(FIXINCSRCDIR)/server.c $(FIXINCSRCDIR)/gnu-regex.h \
 	$(FIXINCSRCDIR)/server.h $(FIXINCSRCDIR)/inclhack.def specs.ready
 	MAKE="$(MAKE)"; srcdir=`cd $(srcdir)/fixinc; pwd` ; \
-	CC="$(CC)"; CFLAGS="$(CFLAGS)"; LDFLAGS="$(LDFLAGS)"; \
+	CC="$(CC)"; CFLAGS="$(CFLAGS) $(WARN_CFLAGS)"; LDFLAGS="$(LDFLAGS)"; \
 	export MAKE srcdir CC CFLAGS LDFLAGS; \
 	cd ./fixinc; $(SHELL) $${srcdir}/mkfixinc.sh $(target)
 
@@ -2792,7 +2792,7 @@
 
 # For bootstrap4:
 stage_f: stage_e
-	+$(MAKE) CC="stage3/xgcc$(exeext) -B$(build_tooldir)/bin/ -Bstage3/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)"
+	+$(MAKE) CC="stage3/xgcc$(exeext) -B$(build_tooldir)/bin/ -Bstage3/" CFLAGS="$(BOOT_CFLAGS)" WARN_CFLAGS="$(WARN2_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)"
 	touch stage_f
 
 # Additional steps for *-lean targets:

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