PATCH (mainline): Fix bootstrap failure for in-src configuration

Loren James Rittle rittle@latour.rsch.comm.mot.com
Wed Dec 10 22:08:00 GMT 2003


OK to install, top-level build machinery people?  Full bootstrap (w/
./configure and $srcdir/configure), check and install cycles on
i386-*-freebsd5.2.

Background: The libstdc++-v3 configuration is very complex with a lot
of internal staging and file location referencing.  It is just not
robust against the multiple ways that people hypothetically may build
the tree.  This situation is very tedious for users since they don't
see the break until very late configuration (of target libraries) & us
developers (since the rules do not state that such configuration
changes need to be tested in *all* configuration styles.  The upgrade
to modern auto-tools broke it (again) months ago.  The proposal is to
treat our subdir as an "objdir multilib", no matter how gcc itself was
configured and built.  Now that we say that only GNU make is
supported, all claims that unique staging are required for in-src
configuration are blown out of the water.  As a side effect, this
patch allows us to rip out many accumulated hacks!

	* Makefile.def (target_modules) [libstdc++-v3]: Do not stage.
	* Makefile.tpl (configure-target-[+module+]): Support no_stage.
	* Makefile: Rebuilt.

Index: Makefile.def
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.def,v
retrieving revision 1.10
diff -c -r1.10 Makefile.def
*** Makefile.def	23 Jun 2003 20:34:26 -0000	1.10
--- Makefile.def	10 Dec 2003 21:46:04 -0000
***************
*** 96,102 ****
                  missing=maintainer-clean; };
  host_modules= { module= utils; no_check=true; };
  
! target_modules = { module= libstdc++-v3; raw_cxx=true; };
  target_modules = { module= newlib; };
  target_modules = { module= libf2c; };
  target_modules = { module= libobjc; };
--- 96,102 ----
                  missing=maintainer-clean; };
  host_modules= { module= utils; no_check=true; };
  
! target_modules = { module= libstdc++-v3; raw_cxx=true; no_stage=true; };
  target_modules = { module= newlib; };
  target_modules = { module= libf2c; };
  target_modules = { module= libobjc; };
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.76
diff -c -r1.76 Makefile.tpl
*** Makefile.tpl	21 Nov 2003 00:39:03 -0000	1.76
--- Makefile.tpl	10 Dec 2003 21:46:04 -0000
***************
*** 983,989 ****
  	      .) topdir="../$(srcdir)" ;; \
  	      *) topdir="../../$(srcdir)" ;; \
  	    esac ;; \
! 	esac; \
  	if [ "$(srcdir)" = "." ] ; then \
  	  if [ "$(TARGET_SUBDIR)" != "." ] ; then \
  	    if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
--- 983,990 ----
  	      .) topdir="../$(srcdir)" ;; \
  	      *) topdir="../../$(srcdir)" ;; \
  	    esac ;; \
! 	esac; \[+
! IF no_stage +][+ ELSE stage +]
  	if [ "$(srcdir)" = "." ] ; then \
  	  if [ "$(TARGET_SUBDIR)" != "." ] ; then \
  	    if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
***************
*** 1004,1013 ****
  	  fi; \
  	  srcdiroption="--srcdir=."; \
  	  libsrcdir="."; \
! 	else \
  	  srcdiroption="--srcdir=$${topdir}/[+module+]"; \
! 	  libsrcdir="$$s/[+module+]"; \
! 	fi; \
  	rm -f no-such-file || : ; \
  	CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
  	  $(TARGET_CONFIGARGS) $${srcdiroption} \
--- 1005,1017 ----
  	  fi; \
  	  srcdiroption="--srcdir=."; \
  	  libsrcdir="."; \
! 	else \[+
! ENDIF no_stage +]
  	  srcdiroption="--srcdir=$${topdir}/[+module+]"; \
! 	  libsrcdir="$$s/[+module+]"; \[+
! IF no_stage +][+ ELSE stage +]
! 	fi; \[+
! ENDIF no_stage +]
  	rm -f no-such-file || : ; \
  	CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
  	  $(TARGET_CONFIGARGS) $${srcdiroption} \



More information about the Libstdc++ mailing list