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]

[committed] Obvious toplevel bootstrap fixes + bring AIX back to bootstrap


David tested the changes to bootstrap AIX and said they were okay for him. Since the related Makefile.* are really obvious (passing additional variables to submakes), I'm committing them.

Committed to gcc and src.

Paolo
2005-12-19  Paolo Bonzini  <bonzini@gnu.org>

	* configure.in: Select appropriate fragments for PowerPC/AIX.
	* configure: Regenerate.

	* Makefile.def (flags_to_pass): Add ADAFLAGS, BOOT_ADAFLAGS,
	BOOT_CFLAGS, BOOT_LDFLAGS.
	* Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Handle BOOT_ADAFLAGS,
	BOOT_CFLAGS, BOOT_LDFLAGS.
	(TARGET_FLAGS_TO_PASS): Handle ADAFLAGS_FOR_TARGET.
	(stage[+id+]-bubble): Pass flags recursively to the comparison target.
	(stage): Fail if we cannot complete the work.
	* Makefile.in: Regenerate.

config:
2005-12-19  Paolo Bonzini  <bonzini@gnu.org>

	* mh-ppc-aix, mt-ppc-aix: New.

Index: configure.in
===================================================================
--- configure.in	(revision 108633)
+++ configure.in	(working copy)
@@ -967,6 +967,12 @@ case "${host}" in
   powerpc-*-darwin*)
     host_makefile_frag="config/mh-ppc-darwin"
     ;;
+  powerpc-*-aix*)
+    host_makefile_frag="config/mh-ppc-aix"
+    ;;
+  rs6000-*-aix*)
+    host_makefile_frag="config/mh-ppc-aix"
+    ;;
   *-*-lynxos*)
     # /bin/cc is less than useful for our purposes.  Always use GCC
     tentative_cc="/bin/gcc"
@@ -1513,6 +1519,7 @@ case "${target}" in
     # harmless if we're using GNU nm or ar.
     extra_arflags_for_target=" -X32_64"
     extra_nmflags_for_target=" -B -X32_64"
+    target_makefile_frag="config/mt-ppc-aix"
     ;;
   *-*-darwin*)
     # ranlib from Darwin requires the -c flag to look at common symbols.
Index: Makefile.def
===================================================================
--- Makefile.def	(revision 108633)
+++ Makefile.def	(working copy)
@@ -205,7 +205,11 @@ flags_to_pass = { flag= SHELL ; };
 flags_to_pass = { flag= YACC ; };
 
 // Host tools
+flags_to_pass = { flag= ADAFLAGS ; };
 flags_to_pass = { flag= AR_FLAGS ; };
+flags_to_pass = { flag= BOOT_ADAFLAGS ; };
+flags_to_pass = { flag= BOOT_CFLAGS ; };
+flags_to_pass = { flag= BOOT_LDFLAGS ; };
 flags_to_pass = { flag= CFLAGS ; };
 flags_to_pass = { flag= CXXFLAGS ; };
 flags_to_pass = { flag= LDFLAGS ; };
@@ -213,6 +217,7 @@ flags_to_pass = { flag= LIBCFLAGS ; };
 flags_to_pass = { flag= LIBCXXFLAGS ; };
 
 // Target tools
+flags_to_pass = { flag= ADAFLAGS_FOR_TARGET ; };
 flags_to_pass = { flag= AR_FOR_TARGET ; };
 flags_to_pass = { flag= AS_FOR_TARGET ; };
 flags_to_pass = { flag= CC_FOR_TARGET ; };
Index: Makefile.tpl
===================================================================
--- Makefile.tpl	(revision 108633)
+++ Makefile.tpl	(working copy)
@@ -255,6 +255,8 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@
 # Flags to pass to stage2 and later makes.  They are defined
 # here so that they can be overridden by Makefile fragments.
 BOOT_CFLAGS= -g -O2
+BOOT_ADAFLAGS=
+BOOT_LDFLAGS=
 
 BISON = @BISON@
 YACC = @YACC@
@@ -429,6 +431,7 @@ X11_FLAGS_TO_PASS = \
 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.  The
 # COMPILER_ prefixed variables are not passed down so we expand them here.
 EXTRA_TARGET_FLAGS = \
+	'ADAFLAGS=$$(ADAFLAGS_FOR_TARGET)' \
 	'AR=$$(AR_FOR_TARGET)' \
 	'AS=$(COMPILER_AS_FOR_TARGET)' \
 	'CC=$$(CC_FOR_TARGET)' \
@@ -1212,7 +1215,7 @@ stage = :
 
 @if gcc-bootstrap
 unstage = [ -f stage_current ] || $(MAKE) `cat stage_last`-start
-stage = [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+stage = if [ -f stage_current ]; then $(MAKE) `cat stage_current`-end || exit 1; else :; fi
 @endif gcc-bootstrap
 
 .PHONY: unstage stage
@@ -1252,6 +1255,8 @@ POSTSTAGE1_FLAGS_TO_PASS = \
 	CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
 	STAGE_PREFIX=$$r/prev-gcc/ \
 	CFLAGS="$(BOOT_CFLAGS)" \
+	ADAFLAGS="$(BOOT_ADAFLAGS)" \
+	LDFLAGS="$(BOOT_LDFLAGS)" \
 	ADAC="\$$(CC)"
 
 # For stage 1:
@@ -1319,7 +1320,7 @@ stage[+id+]-bubble:: [+ IF prev +]stage[
 	  $(MAKE) stage[+id+]-start; \
 	  $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]; \
 	fi[+ IF compare-target +]
-	$(MAKE) [+compare-target+][+ ENDIF compare-target +]
+	$(MAKE) $(RECURSE_FLAGS_TO_PASS) [+compare-target+][+ ENDIF compare-target +]
 
 .PHONY: all-stage[+id+] clean-stage[+id+]
 do-clean: clean-stage[+id+]
Index: config/mh-ppc-aix
===================================================================
--- config/mh-ppc-aix	(revision 0)
+++ config/mh-ppc-aix	(revision 0)
@@ -0,0 +1,8 @@
+
+# Compile Ada files with minimal-toc.  The primary focus is gnatlib, so
+# that the library does not use nearly the entire TOC of applications
+# until gnatlib is built as a shared library on AIX.  Compiling the
+# compiler with -mminimal-toc does not cause any harm.
+BOOT_ADAFLAGS = -mminimal-toc
+BOOT_LDFLAGS = -Wl,-bbigtoc
+LDFLAGS = `case $(CC) in *gcc*) echo -Wl,-bbigtoc ;; esac;`
Index: config/mt-ppc-aix
===================================================================
--- config/mt-ppc-aix	(revision 0)
+++ config/mt-ppc-aix	(revision 0)
@@ -0,0 +1,6 @@
+
+# Compile Ada files with minimal-toc.  The primary focus is gnatlib, so
+# that the library does not use nearly the entire TOC of applications
+# until gnatlib is built as a shared library on AIX.  Compiling the
+# compiler with -mminimal-toc does not cause any harm.
+ADAFLAGS_FOR_TARGET = -mminimal-toc


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