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]
Other format: [Raw text]

[toplevel PATCH] Cleanups


This patch performs some small almost obvious cleanups.

Ok for mainline and src?

Paolo
2004-06-01  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.def (bootstrap_stage): Remove
	POSTSTAGE1_FLAGS_TO_PASS from extra_make_flags of
	post-stage1 stages.
	* Makefile.tpl (RECURSE_FLAGS_TO_PASS): New variable,
	use it throughout.
	(all-stageN-gcc): Do not pass here flags specific
	to successive stages, pass POSTSTAGE1_FLAGS_TO_PASS
	instead.
	(POSTSTAGE1_FLAGS_TO_PASS): Pass CC and CC_FOR_BUILD here.
	* Makefile.in: Regenerate.

Index: Makefile.def
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.def,v
retrieving revision 1.25
diff -u -r1.25 Makefile.def
--- Makefile.def	1 Jun 2004 07:43:22 -0000	1.25
+++ Makefile.def	1 Jun 2004 07:58:40 -0000
@@ -224,19 +224,19 @@
 	id=2 ; prev=1 ; next=3 ;
 	bootstrap_target=bootstrap2 ;
 	extra_configure_flags="@stage2_werror_flag@" ;
-	extra_make_flags="$(POSTSTAGE1_FLAGS_TO_PASS)" ; };
+	extra_make_flags="" ; };
 bootstrap_stage = {
 	id=3 ; prev=2 ; next=4 ;
 	compare_target=compare ;
 	bootstrap_target=bootstrap ;
 	cleanstrap_target=cleanstrap ;
 	extra_configure_flags="@stage2_werror_flag@" ;
-	extra_make_flags="$(POSTSTAGE1_FLAGS_TO_PASS)" ; };
+	extra_make_flags="" ; };
 bootstrap_stage = {
 	id=4 ; prev=3 ;
 	compare_target=compare3 ;
 	bootstrap_target=bootstrap4 ;
 	extra_configure_flags="@stage2_werror_flag@" ;
-	extra_make_flags="$(POSTSTAGE1_FLAGS_TO_PASS)" ; };
+	extra_make_flags="" ; };
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.101
diff -u -r1.101 Makefile.tpl
--- Makefile.tpl	1 Jun 2004 07:43:24 -0000	1.101
+++ Makefile.tpl	1 Jun 2004 07:58:41 -0000
@@ -494,6 +494,8 @@
 	CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
 	RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
 
+RECURSE_FLAGS_TO_PASS = $(FLAGS_TO_PASS) $(RECURSE_FLAGS)
+
 # Flags to pass down to most sub-makes, in which we're building with
 # the host environment.
 EXTRA_HOST_FLAGS = \
@@ -1258,7 +1260,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
 	$(SET_LIB_PATH) \
 	echo "Building runtime libraries"; \
-	$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+	$(MAKE) $(RECURSE_FLAGS_TO_PASS) all
 
 profiledbootstrap: all-bootstrap configure-gcc
 	@r=`${PWD_COMMAND}`; export r; \
@@ -1271,7 +1273,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
 	$(SET_LIB_PATH) \
 	echo "Building runtime libraries and training compiler"; \
-	$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+	$(MAKE) $(RECURSE_FLAGS_TO_PASS) all
 	@r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(SET_LIB_PATH) \
@@ -1291,8 +1293,7 @@
 	s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
 	$(SET_LIB_PATH) \
 	echo "Building runtime libraries"; \
-	$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
-		LANGUAGES="c c++" all
+	$(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
 @endif gcc-no-bootstrap
 
 .PHONY: check-gcc maybe-check-gcc
@@ -1440,12 +1441,14 @@
 # Real targets act phony if they depend on phony targets; this hack
 # prevents gratuitous rebuilding of stage 1.
 prebootstrap:
-	$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all-bootstrap
+	$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-bootstrap
 	$(STAMP) prebootstrap
 
 # Flags to pass to stage2 and later makes.
 BOOT_CFLAGS= -g -O2
 POSTSTAGE1_FLAGS_TO_PASS = \
+	CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
+	STAGE_PREFIX=$$r/stage[+prev+]-gcc/ \
 	CFLAGS="$(BOOT_CFLAGS)" \
 	ADAC="\$$(CC)"
 
@@ -1481,13 +1484,12 @@
 	@if [ -f all-stage[+id+]-gcc ] ; then \
 	  echo Remaking stage [+id+] ; \
 	  rm -f all-stage[+id+]-gcc ; \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
-	    all-stage[+id+]-gcc [+ IF next +] && \
+	  $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]-gcc [+ IF next +]&& \
 	  if [ -f configure-stage[+next+]-gcc ] ; then \
 	    $(STAMP) configure-stage[+next+]-gcc ; \
 	  fi [+ ENDIF next +]; \
 	else \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all-stage[+id+]-gcc ; \
+	  $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]-gcc ; \
 	fi
 
 configure-stage[+id+]-gcc: [+ IF prev +] all-stage[+prev+]-gcc [+
@@ -1529,8 +1531,7 @@
 	$(GCC_HOST_EXPORTS) [+ ENDIF prev +] \
 	cd gcc && \
 	$(MAKE) $(GCC_FLAGS_TO_PASS) [+ IF prev +] \
-		CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
-		STAGE_PREFIX=$$r/stage[+prev+]-gcc/ [+ ENDIF prev +] \
+		$(POSTSTAGE1_FLAGS_TO_PASS) [+ ENDIF prev +] \
 		[+extra_make_flags+] && $(STAMP) ../all-stage[+id+]-gcc
 
 [+ IF compare-target +]
@@ -1560,7 +1561,7 @@
 [+ IF bootstrap-target +]
 .PHONY: [+bootstrap-target+]
 [+bootstrap-target+]:
-	$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) stage[+id+]-bubble [+
+	$(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble [+
 	  IF compare-target +] [+compare-target+] [+
 	  ENDIF compare-target +] \
 	  stage[+id+]-start all stage[+id+]-end 
@@ -1576,7 +1577,7 @@
 restage[+id+]: [+ IF next +] distclean-stage[+next+] [+ ENDIF next +]
 	rm -rf all-stage[+id+]-gcc [+
 	  IF compare-target +][+compare-target+] [+ ENDIF compare-target +]
-	$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) [+
+	$(MAKE) $(RECURSE_FLAGS_TO_PASS) [+
 	  IF compare-target +][+compare-target+] [+
 	  ELSE +] all-stage[+id+]-gcc [+ ENDIF compare-target +]
 

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