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]

Re: PR/32009 and PR/32161, use CFLAGS_FOR_TARGET for bootstrapped target libraries


Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.

This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.

Other changes I had to do include:

- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.

- passing the right CFLAGS to configure scripts as exported environment variables

I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.

Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?

Paolo
2008-02-19  Paolo Bonzini  <bonzini@gnu.org>

        PR bootstrap/32009
        PR bootstrap/32161

	* configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Compute here.
	* configure: Regenerate.

	* Makefile.def: Define stage_libcflags for all bootstrap stages.
	* Makefile.tpl (BOOT_LIBCFLAGS, STAGE2_LIBCFLAGS, STAGE3_LIBCFLAGS,
	STAGE4_LIBCFLAGS): New.
	(CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Subst from autoconf, without
	$(SYSROOT_CFLAGS_FOR_TARGET) and $(DEBUG_PREFIX_CFLAGS_FOR_TARGET).
	(BASE_TARGET_EXPORTS): Append them here to C{,XX}FLAGS.
	(EXTRA_TARGET_FLAGS): Append them here to {LIB,}C{,XX}FLAGS.
	(configure-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags
	for target modules.  Don't export LIBCFLAGS.
	(all-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags; pass
	$(BASE_FLAGS_TO_PASS) where [+args+] was passed, and [+args+] after
	the overridden CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
	(invocations of `all'): Replace $(TARGET_FLAGS_TO_PASS) with
	$(EXTRA_TARGET_FLAGS), $(FLAGS_TO_PASS) with $(EXTRA_HOST_FLAGS).
	* Makefile.in: Regenerate.

config:
2008-02-19  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/32009
	* mh-ppc-darwin (BOOT_CFLAGS): Reenable.

gcc:
2008-02-19  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/32009
	* doc/install.texi: Correct references to CFLAGS, replacing them
	with BOOT_CFLAGS.  Document flags used during bootstrap for
	target libraries.


Index: configure.ac
===================================================================
--- configure.ac	(revision 131961)
+++ configure.ac	(working copy)
@@ -1668,6 +1668,38 @@ AC_ARG_WITH([debug-prefix-map],
   [DEBUG_PREFIX_CFLAGS_FOR_TARGET=])
 AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
 
+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
+# might be empty or "-g".  We don't require a C++ compiler, so CXXFLAGS
+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
+# We want to ensure that TARGET libraries (which we know are built with
+# gcc) are built with "-O2 -g", so include those options when setting
+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
+if test "x$CFLAGS_FOR_TARGET" = x; then
+  CFLAGS_FOR_TARGET=$CFLAGS
+  case " $CFLAGS " in
+    *" -O2 "*) ;;
+    *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
+  esac
+  case " $CFLAGS " in
+    *" -g "* | *" -g3 "*) ;;
+    *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
+  esac
+fi
+AC_SUBST(CFLAGS_FOR_TARGET)
+
+if test "x$CXXFLAGS_FOR_TARGET" = x; then
+  CXXFLAGS_FOR_TARGET=$CXXFLAGS
+  case " $CXXFLAGS " in
+    *" -O2 "*) ;;
+    *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
+  esac
+  case " $CXXFLAGS " in
+    *" -g "* | *" -g3 "*) ;;
+    *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
+  esac
+fi
+AC_SUBST(CXXFLAGS_FOR_TARGET)
+
 # Handle --with-headers=XXX.  If the value is not "yes", the contents of
 # the named directory are copied to $(tooldir)/sys-include.
 if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
Index: Makefile.def
===================================================================
--- Makefile.def	(revision 131960)
+++ Makefile.def	(working copy)
@@ -511,43 +511,51 @@ bootstrap_stage = {
 	//   compiler probably has never heard of them.
 	stage_configure_flags='--disable-intermodule $(STAGE1_CHECKING) \
 	  --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ;
-	stage_cflags='$(STAGE1_CFLAGS)' ; };
+	stage_cflags='$(STAGE1_CFLAGS)' ;
+	stage_libcflags='$(STAGE1_LIBCFLAGS)' ; };
 bootstrap_stage = {
 	id=2 ; prev=1 ;
 	bootstrap_target=bootstrap2 ;
 	stage_configure_flags="@stage2_werror_flag@" ;
-	stage_cflags="$(STAGE2_CFLAGS)" ; };
+	stage_cflags="$(STAGE2_CFLAGS)" ;
+	stage_libcflags="$(STAGE2_LIBCFLAGS)" ; };
 bootstrap_stage = {
 	id=b2g0 ; prev=1 ;
 	bootstrap_target=bootstrap2-debug ;
 	stage_configure_flags="@stage2_werror_flag@" ;
-	stage_cflags="$(STAGE2_CFLAGS) -g0" ; };
+	stage_cflags="$(STAGE2_CFLAGS) -g0" ;
+	stage_libcflags="$(STAGE2_LIBCFLAGS) -g0" ; };
 bootstrap_stage = {
 	id=3 ; prev=2 ; lean=1 ;
 	compare_target=compare ;
 	bootstrap_target=bootstrap ;
 	cleanstrap_target=cleanstrap ;
 	stage_configure_flags="@stage2_werror_flag@" ;
-	stage_cflags="$(STAGE3_CFLAGS)" ; };
+	stage_cflags="$(STAGE3_CFLAGS)" ;
+	stage_libcflags="$(STAGE3_LIBCFLAGS)" ; };
 bootstrap_stage = {
 	id=b3g2 ; prev=b2g0 ; lean=1 ;
 	compare_target=compare-debug ;
 	bootstrap_target=bootstrap-debug ;
 	cleanstrap_target=cleanstrap-debug ;
 	stage_configure_flags="@stage2_werror_flag@" ;
-	stage_cflags="$(STAGE3_CFLAGS) -g2" ; };
+	stage_cflags="$(STAGE3_CFLAGS) -g2" ;
+	stage_libcflags="$(STAGE3_LIBCFLAGS) -g2" ; };
 bootstrap_stage = {
 	id=4 ; prev=3 ; lean=2 ;
 	compare_target=compare3 ;
 	bootstrap_target=bootstrap4 ;
 	stage_configure_flags="@stage2_werror_flag@" ;
-	stage_cflags="$(STAGE4_CFLAGS)" ; };
+	stage_cflags="$(STAGE4_CFLAGS)" ;
+	stage_libcflags="$(STAGE4_CFLAGS)" ; };
 bootstrap_stage = {
 	id=profile ; prev=1 ;
 	stage_configure_flags="@stage2_werror_flag@" ;
-	stage_cflags='$(STAGE2_CFLAGS) -fprofile-generate' ; };
+	stage_cflags='$(STAGE2_CFLAGS) -fprofile-generate' ;
+	stage_libcflags='$(STAGE2_LIBCFLAGS) -fprofile-generate' ; };
 bootstrap_stage = {
 	id=feedback ; prev=profile ;
 	bootstrap_target=profiledbootstrap ;
 	stage_configure_flags="@stage2_werror_flag@" ;
-	stage_cflags='$(STAGE3_CFLAGS) -fprofile-use' ; };
+	stage_cflags='$(STAGE3_CFLAGS) -fprofile-use' ;
+	stage_libcflags='$(STAGE3_LIBCFLAGS) -fprofile-use' ; };
Index: Makefile.tpl
===================================================================
--- Makefile.tpl	(revision 131960)
+++ Makefile.tpl	(working copy)
@@ -207,10 +207,10 @@ BASE_TARGET_EXPORTS = \
 	AR="$(AR_FOR_TARGET)"; export AR; \
 	AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
 	CC="$(CC_FOR_TARGET)"; export CC; \
-	CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+	CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
 	CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
-	CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+	CXXFLAGS="$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
 	GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
 	GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
 	DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
@@ -330,14 +330,19 @@ PICFLAG = 
 # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
 # overrideable (for a bootstrap build stage1 also builds gcc.info).
 
-STAGE1_CFLAGS=@stage1_cflags@
 STAGE1_CHECKING=@stage1_checking@
 STAGE1_LANGUAGES=@stage1_languages@
 
+STAGE1_CFLAGS=@stage1_cflags@
 STAGE2_CFLAGS=$(BOOT_CFLAGS)
 STAGE3_CFLAGS=$(BOOT_CFLAGS)
 STAGE4_CFLAGS=$(BOOT_CFLAGS)
 
+STAGE1_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
+STAGE2_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
+STAGE3_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
+STAGE4_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
+
 do-compare = @do_compare@
 do-compare3 = $(do-compare)
 do-compare-debug = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2
@@ -376,18 +381,11 @@ COMPILER_AS_FOR_TARGET=@COMPILER_AS_FOR_
 COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@
 COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
 
-# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
-# might be empty or "-g".  We don't require a C++ compiler, so CXXFLAGS
-# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
-# We want to ensure that TARGET libraries (which we know are built with
-# gcc) are built with "-O2 -g", so prepend those options when setting
-# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 -g $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
-	$(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
+CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@
+CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
 DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
-CXXFLAGS_FOR_TARGET = -O2 -g $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
-	$(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
+
 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
 LDFLAGS_FOR_TARGET = 
@@ -491,19 +489,20 @@ POSTSTAGE1_FLAGS_TO_PASS = \
 # Flags to pass down to makes which are built with the target environment.
 # The double $ decreases the length of the command line; those variables
 # 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.
+# *_CFLAGS_FOR_TARGET variables are not passed down and most often empty,
+# so we expand them here.
 EXTRA_TARGET_FLAGS = \
 	'AR=$$(AR_FOR_TARGET)' \
 	'AS=$(COMPILER_AS_FOR_TARGET)' \
 	'CC=$$(CC_FOR_TARGET)' \
-	'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
+	'CFLAGS=$$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
 	'CXX=$$(CXX_FOR_TARGET)' \
-	'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
+	'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
 	'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
 	'LD=$(COMPILER_LD_FOR_TARGET)' \
 	'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
-	'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
-	'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
+	'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
+	'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
 	'NM=$(COMPILER_NM_FOR_TARGET)' \
 	'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
 	'RANLIB=$$(RANLIB_FOR_TARGET)' \
@@ -851,9 +850,11 @@ configure-stage[+id+]-[+prefix+][+module
 	fi; \
 	[+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
 	[+exports+][+ IF prev +] \
-	[+poststage1_exports+][+ ENDIF prev +] \
+	[+poststage1_exports+][+ ENDIF prev +] [+ IF prefix +] \
+	CFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+	CXXFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; [+ ELSE +] \
 	CFLAGS="[+stage_cflags+]"; export CFLAGS; \
-	LIBCFLAGS="[+stage_cflags+]"; export LIBCFLAGS; \
+	CXXFLAGS="[+stage_cflags+]"; export CXXFLAGS; [+ ENDIF +] \
 	echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
 	$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
 	cd [+subdir+]/[+module+] || exit 1; \
@@ -890,7 +891,8 @@ all-[+prefix+][+module+]: configure-[+pr
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	[+exports+] \
 	(cd [+subdir+]/[+module+] && \
-	  $(MAKE) [+args+] [+extra_make_flags+] $(TARGET-[+prefix+][+module+]))
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+extra_make_flags+] \
+		$(TARGET-[+prefix+][+module+]))
 @endif [+prefix+][+module+]
 
 [+ IF bootstrap +]
@@ -910,8 +912,11 @@ all-stage[+id+]-[+prefix+][+module+]: co
 	[+exports+][+ IF prev +] \
 	[+poststage1_exports+][+ ENDIF prev +] \
 	cd [+subdir+]/[+module+] && \
-	$(MAKE) [+args+] \
-		CFLAGS="[+stage_cflags+]" LIBCFLAGS="[+stage_cflags+]" [+
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="[+stage_cflags+]" CXXFLAGS="[+stage_cflags+]" \
+		LIBCFLAGS="[+stage_libcflags+]" \
+		CFLAGS_FOR_TARGET="[+stage_libcflags+]" \
+		CXXFLAGS_FOR_TARGET="[+stage_libcflags+]" [+args+] [+
 		IF prev +][+poststage1_args+][+ ENDIF prev
 		+] [+extra_make_flags+] \
 		$(TARGET-stage[+id+]-[+prefix+][+module+])
@@ -961,7 +966,7 @@ clean-stage[+id+]-[+prefix+][+module+]:
 [+ all prefix="" subdir="$(HOST_SUBDIR)"
        exports="$(HOST_EXPORTS)"
        poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)"
-       args="$(FLAGS_TO_PASS)"
+       args="$(EXTRA_HOST_FLAGS)"
        poststage1_args="$(POSTSTAGE1_FLAGS_TO_PASS)" +]
 
 .PHONY: check-[+module+] maybe-check-[+module+]
@@ -1059,7 +1064,7 @@ maybe-[+make_target+]-[+module+]: [+make
 
 [+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
        exports="$(RAW_CXX_TARGET_EXPORTS)"
-       args="$(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +]
+       args="$(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +]
 [+ ELSE +]
 [+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
 	     check_multilibs=true
@@ -1070,7 +1075,7 @@ maybe-[+make_target+]-[+module+]: [+make
 
 [+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
        exports="$(NORMAL_TARGET_EXPORTS)"
-       args="$(TARGET_FLAGS_TO_PASS)" +]
+       args="$(EXTRA_TARGET_FLAGS)" +]
 [+ ENDIF +]
 
 .PHONY: check-target-[+module+] maybe-check-target-[+module+]
Index: config/mh-ppc-darwin
===================================================================
--- config/mh-ppc-darwin	(revision 131960)
+++ config/mh-ppc-darwin	(working copy)
@@ -2,5 +2,4 @@
 # position-independent-code -- the usual default on Darwin. This fix speeds
 # compiles by 3-5%.
 
-# Broken because of PR32009.
-# BOOT_CFLAGS=-g -O2 -mdynamic-no-pic
+BOOT_CFLAGS=-g -O2 -mdynamic-no-pic
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi	(revision 131960)
+++ gcc/doc/install.texi	(working copy)
@@ -1762,33 +1762,35 @@ same described above, but object files f
 stage2 of the 3-stage bootstrap of the compiler are deleted as
 soon as they are no longer needed.
 
-If you want to save additional space during the bootstrap and in
-the final installation as well, you can build the compiler binaries
-without debugging information as in the following example.  This will save
-roughly 40% of disk space both for the bootstrap and the final installation.
-(Libraries will still contain debugging information.)
-
-@smallexample
-     make CFLAGS='-O' LIBCFLAGS='-g -O2' \
-       LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
-@end smallexample
-
-If you wish to use non-default GCC flags when compiling the stage2 and
-stage3 compilers, set @code{BOOT_CFLAGS} on the command line when doing
-@samp{make}.  Non-default optimization flags are less well
-tested here than the default of @samp{-g -O2}, but should still work.
-In a few cases, you may find that you need to specify special flags such
-as @option{-msoft-float} here to complete the bootstrap; or, if the
-native compiler miscompiles the stage1 compiler, you may need to work
-around this, by choosing @code{BOOT_CFLAGS} to avoid the parts of the
-stage1 compiler that were miscompiled, or by using @samp{make
+If you wish to use non-default GCC flags when compiling the stage2
+and stage3 compilers, set @code{BOOT_CFLAGS} on the command line when
+doing @samp{make}.  For example, if you want to save additional space
+during the bootstrap and in the final installation as well, you can
+build the compiler binaries without debugging information as in the
+following example.  This will save roughly 40% of disk space both for
+the bootstrap and the final installation.  (Libraries will still contain
+debugging information.)
+
+@smallexample
+     make BOOT_CFLAGS='-O' bootstrap
+@end smallexample
+
+You can place non-default optimization flags into @code{BOOT_CFLAGS}; they
+are less well tested here than the default of @samp{-g -O2}, but should
+still work.  In a few cases, you may find that you need to specify special
+flags such as @option{-msoft-float} here to complete the bootstrap; or,
+if the native compiler miscompiles the stage1 compiler, you may need
+to work around this, by choosing @code{BOOT_CFLAGS} to avoid the parts
+of the stage1 compiler that were miscompiled, or by using @samp{make
 bootstrap4} to increase the number of stages of bootstrap.
 
-Note that using non-standard @code{CFLAGS} can cause bootstrap to fail
-if these trigger a warning with the new compiler.  For example using
-@samp{-O2 -g -mcpu=i686} on @code{i686-pc-linux-gnu} will cause bootstrap
-failure as @option{-mcpu=} is deprecated in 3.4.0 and above.
-
+@code{BOOT_CFLAGS} does not apply to bootstrapped target libraries.
+Since these are always compiled with the compiler currently being
+bootstrapped, you can use @code{CFLAGS_FOR_TARGET} to modify their
+compilation flags, as for non-bootstrapped target libraries.
+Again, if the native compiler miscompiles the stage1 compiler, you may
+need to work around this by avoiding non-working parts of the stage1
+compiler.  Use @code{STAGE1_LIBCFLAGS} to this end.
 
 If you used the flag @option{--enable-languages=@dots{}} to restrict
 the compilers to be built, only those you've actually enabled will be
@@ -2679,8 +2681,8 @@ cross-compilers on the Alpha for 32-bit 
 a few cases and may not work properly.
 
 @samp{make compare} may fail on old versions of DEC Unix unless you add
-@option{-save-temps} to @code{CFLAGS}.  On these systems, the name of the
-assembler input file is stored in the object file, and that makes
+@option{-save-temps} to @code{BOOT_CFLAGS}.  On these systems, the name
+of the assembler input file is stored in the object file, and that makes
 comparison fail if it differs between the @code{stage1} and
 @code{stage2} compilations.  The option @option{-save-temps} forces a
 fixed name to be used for the assembler input file, instead of a

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