2004-06-01 Paolo Bonzini <bonzini@gnu.org>
authorPaolo Bonzini <bonzini@gnu.org>
Tue, 1 Jun 2004 07:42:22 +0000 (07:42 +0000)
committerPaolo Bonzini <bonzini@gnu.org>
Tue, 1 Jun 2004 07:42:22 +0000 (07:42 +0000)
* Makefile.tpl (all.normal): Rename to all.
(all): Replace with a rule to pick the default
target from configure.
(all-gcc, configure-gcc): Use conditionals to
do nothing when toplevel bootstrap is going on.
(GCC directory bootstrap) [gcc-bootstrap]: Disable.
(Toplevel bootstrap) [gcc-no-bootstrap]: Disable.
* configure.in: Support --enable-bootstrap.

* Makefile.def: Remove new- prefix from toplevel
bootstrap targets.
* Makefile.tpl: Likewise.

* Makefile.def: Add bootstrap_stage 4.  Add bootstrap2
target.

* Makefile.tpl (Toplevel bootstrap): Pass $(BASE_FLAGS_TO_PASS)
$(RECURSE_FLAGS) to recursive invocation of make.

* Makefile.in: Regenerate.
* configure: Regenerate.

ChangeLog
Makefile.def
Makefile.in
Makefile.tpl
configure
configure.in

index 07145664220c1862e1e4ce99e19af6a105647c44..77ee52ba78e5161c44d327145b208112f37795e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2004-06-01  Paolo Bonzini  <bonzini@gnu.org>
+
+       * Makefile.tpl (all.normal): Rename to all.
+       (all): Replace with a rule to pick the default
+       target from configure.
+       (all-gcc, configure-gcc): Use conditionals to
+       do nothing when toplevel bootstrap is going on.
+       (GCC directory bootstrap) [gcc-bootstrap]: Disable.
+       (Toplevel bootstrap) [gcc-no-bootstrap]: Disable.
+       * configure.in: Support --enable-bootstrap.
+
+       * Makefile.def: Remove new- prefix from toplevel
+       bootstrap targets.
+       * Makefile.tpl: Likewise.
+
+       * Makefile.def: Add bootstrap_stage 4.  Add bootstrap2
+       target.
+
+       * Makefile.tpl (Toplevel bootstrap): Pass $(BASE_FLAGS_TO_PASS)
+       $(RECURSE_FLAGS) to recursive invocation of make.
+
+       * Makefile.in: Regenerate.
+       * configure: Regenerate.
+
 2004-05-27  Daniel Jacobowitz  <dan@debian.org>
 
        * configure.in: Fix sed invocation for GFORTRAN_FOR_TARGET.
index 9c425963f5cf2714e0d1c4431a42d876c7de301f..22bdec0fd972df918843877b0c0d5f980d2f8a2d 100644 (file)
@@ -222,12 +222,19 @@ bootstrap_stage = {
        extra_make_flags='CFLAGS="$(STAGE1_CFLAGS)"' ; };
 bootstrap_stage = {
        id=2 ; prev=1 ; next=3 ;
+       bootstrap_target=new-bootstrap2 ;
        extra_configure_flags="@stage2_werror_flag@" ;
        extra_make_flags="$(POSTSTAGE1_FLAGS_TO_PASS)" ; };
 bootstrap_stage = {
-       id=3 ; prev=2 ;
+       id=3 ; prev=2 ; next=4 ;
        compare_target=compare ;
-       bootstrap_target=new-bootstrap ;
-       cleanstrap_target=new-cleanstrap ;
+       bootstrap_target=bootstrap ;
+       cleanstrap_target=cleanstrap ;
+       extra_configure_flags="@stage2_werror_flag@" ;
+       extra_make_flags="$(POSTSTAGE1_FLAGS_TO_PASS)" ; };
+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)" ; };
index b7b0831ae344c00f26de178573ed47d5249e7196..efa419cd9aea4ff0cabb675c7c6239f2a19000fd 100644 (file)
@@ -467,8 +467,7 @@ PICFLAG_FOR_TARGET =
 
 # The first rule in the file had better be this one.  Don't put any above it.
 # This lives here to allow makefile fragments to contain dependencies.
-all: all.normal
-.PHONY: all
+@default_target@:
 
 #### host and target specific makefile fragments come in here.
 @target_makefile_frag@
@@ -712,9 +711,9 @@ configure-target:  \
     maybe-configure-target-rda \
     maybe-configure-target-libada
 
-# The target built for a native build.
-.PHONY: all.normal
-all.normal: @all_build_modules@ all-host all-target
+# The target built for a native non-bootstrap build.
+.PHONY: all
+all: @all_build_modules@ all-host all-target
 
 .PHONY: all-host
 all-host: maybe-all-gcc  \
@@ -27646,8 +27645,9 @@ maybe-configure-gcc:
 @if gcc
 maybe-configure-gcc: configure-gcc
 configure-gcc:
+@endif gcc
+@if gcc-no-bootstrap
        @test ! -f gcc/Makefile || exit 0; \
-       [ -f stage_last ] && exit 0; \
        [ -d gcc ] || mkdir gcc; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -27668,7 +27668,7 @@ configure-gcc:
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
          || exit 1
-@endif gcc
+@endif gcc-no-bootstrap
 
 # Don't 'make all' in gcc if it's already been made by 'bootstrap'; that
 # causes trouble.  This wart will be fixed eventually by moving
@@ -27678,19 +27678,17 @@ maybe-all-gcc:
 @if gcc
 maybe-all-gcc: all-gcc
 all-gcc: configure-gcc
+@endif gcc
+@if gcc-no-bootstrap
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
        $(GCC_HOST_EXPORTS) \
-       if [ -f stage_last ] ; then \
-         true ; \
-       elif [ -f gcc/stage_last ] ; then \
-         $(SET_LIB_PATH) \
+       if [ -f gcc/stage_last ] ; then \
          (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
        else \
-         $(SET_LIB_PATH) \
          (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
        fi
-@endif gcc
 
 # Building GCC uses some tools for rebuilding "source" files
 # like texinfo, bison/byacc, etc.  So we must depend on those.
@@ -27769,7 +27767,8 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
        $(SET_LIB_PATH) \
        echo "Building runtime libraries"; \
        $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
-         LANGUAGES="c c++" all
+               LANGUAGES="c c++" all
+@endif gcc-no-bootstrap
 
 .PHONY: check-gcc maybe-check-gcc
 maybe-check-gcc:
@@ -28065,6 +28064,7 @@ maintainer-clean-gcc:
 
 
 
+@if gcc-bootstrap
 # ---------------------
 # GCC bootstrap support
 # ---------------------
@@ -28110,7 +28110,7 @@ objext = .o
 # Real targets act phony if they depend on phony targets; this hack
 # prevents gratuitous rebuilding of stage 1.
 prebootstrap:
-       $(MAKE) all-bootstrap
+       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all-bootstrap
        $(STAMP) prebootstrap
 
 # Flags to pass to stage2 and later makes.
@@ -28129,36 +28129,37 @@ POSTSTAGE1_FLAGS_TO_PASS = \
 # * We build only C (and possibly Ada).
 
 
-.PHONY: new-stage1-start new-stage1-end
+.PHONY: stage1-start stage1-end
 
-new-stage1-start:
-       [ -f stage_last ] && $(MAKE) new-`cat stage_last`-end || :
+stage1-start:
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
        echo stage1 > stage_last ; \
        [ -d stage1-gcc ] || mkdir stage1-gcc; \
        set stage1-gcc gcc ; @CREATE_LINK_TO_DIR@ 
 
-new-stage1-end:
+stage1-end:
        rm -f stage_last ; \
        set gcc stage1-gcc ; @UNDO_LINK_TO_DIR@ 
 
 # Bubble a bugfix through all the stages up to stage 1.  They
 # are remade, but not reconfigured.  The next stage (if any) will not
 # be reconfigured as well.
-.PHONY: new-stage1-bubble
-new-stage1-bubble: 
+.PHONY: stage1-bubble
+stage1-bubble: 
        @if [ -f all-stage1-gcc ] ; then \
          echo Remaking stage 1 ; \
          rm -f all-stage1-gcc ; \
-         $(MAKE) all-stage1-gcc  && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
+           all-stage1-gcc  && \
          if [ -f configure-stage2-gcc ] ; then \
            $(STAMP) configure-stage2-gcc ; \
          fi ; \
        else \
-         $(MAKE) all-stage1-gcc ; \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all-stage1-gcc ; \
        fi
 
 configure-stage1-gcc:  prebootstrap 
-       $(MAKE) new-stage1-start
+       $(MAKE) stage1-start
        @if [ -f stage1-gcc/Makefile ] ; then \
          $(STAMP) configure-stage1-gcc ; \
          exit 0; \
@@ -28187,7 +28188,7 @@ configure-stage1-gcc:  prebootstrap
          $(STAMP) ../configure-stage1-gcc
 
 all-stage1-gcc: configure-stage1-gcc
-       $(MAKE) new-stage1-start
+       $(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(GCC_HOST_EXPORTS)  \
@@ -28199,29 +28200,29 @@ all-stage1-gcc: configure-stage1-gcc
 
 
 
-.PHONY: new-restage1 distclean-stage1
+.PHONY: restage1 distclean-stage1
 
 distclean-stage1:  distclean-stage2 
-       [ -f stage_last ] && $(MAKE) new-`cat stage_last`-end || :
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
        rm -rf configure-stage1-gcc all-stage1-gcc stage1-gcc 
 
-new-restage1:  distclean-stage2 
+restage1:  distclean-stage2 
        rm -rf all-stage1-gcc 
-       $(MAKE)  all-stage1-gcc 
+       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS)  all-stage1-gcc 
 
 
 
 
-.PHONY: new-stage2-start new-stage2-end
+.PHONY: stage2-start stage2-end
 
-new-stage2-start:
-       [ -f stage_last ] && $(MAKE) new-`cat stage_last`-end || :
+stage2-start:
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
        echo stage2 > stage_last ; \
        [ -d stage2-gcc ] || mkdir stage2-gcc; \
        set stage2-gcc gcc ; @CREATE_LINK_TO_DIR@  ; \
        set stage1-gcc prev-gcc ; @CREATE_LINK_TO_DIR@ 
 
-new-stage2-end:
+stage2-end:
        rm -f stage_last ; \
        set gcc stage2-gcc ; @UNDO_LINK_TO_DIR@  ; \
        set prev-gcc stage1-gcc ; @UNDO_LINK_TO_DIR@ 
@@ -28229,21 +28230,22 @@ new-stage2-end:
 # Bubble a bugfix through all the stages up to stage 2.  They
 # are remade, but not reconfigured.  The next stage (if any) will not
 # be reconfigured as well.
-.PHONY: new-stage2-bubble
-new-stage2-bubble: new-stage1-bubble
+.PHONY: stage2-bubble
+stage2-bubble: stage1-bubble
        @if [ -f all-stage2-gcc ] ; then \
          echo Remaking stage 2 ; \
          rm -f all-stage2-gcc ; \
-         $(MAKE) all-stage2-gcc  && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
+           all-stage2-gcc  && \
          if [ -f configure-stage3-gcc ] ; then \
            $(STAMP) configure-stage3-gcc ; \
          fi ; \
        else \
-         $(MAKE) all-stage2-gcc ; \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all-stage2-gcc ; \
        fi
 
 configure-stage2-gcc:  all-stage1-gcc 
-       $(MAKE) new-stage2-start
+       $(MAKE) stage2-start
        @if [ -f stage2-gcc/Makefile ] ; then \
          $(STAMP) configure-stage2-gcc ; \
          exit 0; \
@@ -28272,7 +28274,7 @@ configure-stage2-gcc:  all-stage1-gcc
          $(STAMP) ../configure-stage2-gcc
 
 all-stage2-gcc: configure-stage2-gcc
-       $(MAKE) new-stage2-start
+       $(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
@@ -28285,30 +28287,35 @@ all-stage2-gcc: configure-stage2-gcc
 
 
 
+.PHONY: new-bootstrap2
+new-bootstrap2:
+       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) stage2-bubble  \
+         stage2-start all stage2-end 
 
-.PHONY: new-restage2 distclean-stage2
+
+.PHONY: restage2 distclean-stage2
 
 distclean-stage2:  distclean-stage3 
-       [ -f stage_last ] && $(MAKE) new-`cat stage_last`-end || :
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
        rm -rf configure-stage2-gcc all-stage2-gcc stage2-gcc 
 
-new-restage2:  distclean-stage3 
+restage2:  distclean-stage3 
        rm -rf all-stage2-gcc 
-       $(MAKE)  all-stage2-gcc 
+       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS)  all-stage2-gcc 
 
 
 
 
-.PHONY: new-stage3-start new-stage3-end
+.PHONY: stage3-start stage3-end
 
-new-stage3-start:
-       [ -f stage_last ] && $(MAKE) new-`cat stage_last`-end || :
+stage3-start:
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
        echo stage3 > stage_last ; \
        [ -d stage3-gcc ] || mkdir stage3-gcc; \
        set stage3-gcc gcc ; @CREATE_LINK_TO_DIR@  ; \
        set stage2-gcc prev-gcc ; @CREATE_LINK_TO_DIR@ 
 
-new-stage3-end:
+stage3-end:
        rm -f stage_last ; \
        set gcc stage3-gcc ; @UNDO_LINK_TO_DIR@  ; \
        set prev-gcc stage2-gcc ; @UNDO_LINK_TO_DIR@ 
@@ -28316,18 +28323,22 @@ new-stage3-end:
 # Bubble a bugfix through all the stages up to stage 3.  They
 # are remade, but not reconfigured.  The next stage (if any) will not
 # be reconfigured as well.
-.PHONY: new-stage3-bubble
-new-stage3-bubble: new-stage2-bubble
+.PHONY: stage3-bubble
+stage3-bubble: stage2-bubble
        @if [ -f all-stage3-gcc ] ; then \
          echo Remaking stage 3 ; \
          rm -f all-stage3-gcc ; \
-         $(MAKE) all-stage3-gcc ; \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
+           all-stage3-gcc  && \
+         if [ -f configure-stage4-gcc ] ; then \
+           $(STAMP) configure-stage4-gcc ; \
+         fi ; \
        else \
-         $(MAKE) all-stage3-gcc ; \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all-stage3-gcc ; \
        fi
 
 configure-stage3-gcc:  all-stage2-gcc 
-       $(MAKE) new-stage3-start
+       $(MAKE) stage3-start
        @if [ -f stage3-gcc/Makefile ] ; then \
          $(STAMP) configure-stage3-gcc ; \
          exit 0; \
@@ -28356,7 +28367,7 @@ configure-stage3-gcc:  all-stage2-gcc
          $(STAMP) ../configure-stage3-gcc
 
 all-stage3-gcc: configure-stage3-gcc
-       $(MAKE) new-stage3-start
+       $(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
@@ -28368,7 +28379,7 @@ all-stage3-gcc: configure-stage3-gcc
 
 
 compare: all-stage3-gcc
-       [ -f stage_last ] && $(MAKE) new-`cat stage_last`-end || :
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        rm -f .bad_compare ; \
@@ -28391,28 +28402,141 @@ compare: all-stage3-gcc
 
 
 
-.PHONY: new-bootstrap
-new-bootstrap:
-       $(MAKE) new-stage3-bubble  compare  \
-         new-stage3-start all new-stage3-end 
+.PHONY: bootstrap
+bootstrap:
+       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) stage3-bubble  compare  \
+         stage3-start all stage3-end 
 
 
-.PHONY: new-restage3 distclean-stage3
+.PHONY: restage3 distclean-stage3
 
-distclean-stage3: 
-       [ -f stage_last ] && $(MAKE) new-`cat stage_last`-end || :
+distclean-stage3:  distclean-stage4 
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
        rm -rf configure-stage3-gcc all-stage3-gcc stage3-gcc compare 
 
-new-restage3: 
+restage3:  distclean-stage4 
        rm -rf all-stage3-gcc compare 
-       $(MAKE) compare 
+       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) compare 
+
+
+.PHONY: cleanstrap
+cleanstrap: distclean-stage1 bootstrap
+
+
+
+.PHONY: stage4-start stage4-end
+
+stage4-start:
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+       echo stage4 > stage_last ; \
+       [ -d stage4-gcc ] || mkdir stage4-gcc; \
+       set stage4-gcc gcc ; @CREATE_LINK_TO_DIR@  ; \
+       set stage3-gcc prev-gcc ; @CREATE_LINK_TO_DIR@ 
+
+stage4-end:
+       rm -f stage_last ; \
+       set gcc stage4-gcc ; @UNDO_LINK_TO_DIR@  ; \
+       set prev-gcc stage3-gcc ; @UNDO_LINK_TO_DIR@ 
+
+# Bubble a bugfix through all the stages up to stage 4.  They
+# are remade, but not reconfigured.  The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage4-bubble
+stage4-bubble: stage3-bubble
+       @if [ -f all-stage4-gcc ] ; then \
+         echo Remaking stage 4 ; \
+         rm -f all-stage4-gcc ; \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
+           all-stage4-gcc ; \
+       else \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all-stage4-gcc ; \
+       fi
+
+configure-stage4-gcc:  all-stage3-gcc 
+       $(MAKE) stage4-start
+       @if [ -f stage4-gcc/Makefile ] ; then \
+         $(STAMP) configure-stage4-gcc ; \
+         exit 0; \
+       else \
+         true ; \
+       fi ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
+       $(STAGE_HOST_EXPORTS)  \
+       echo Configuring stage 4 in gcc ; \
+       cd gcc || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/gcc"; \
+           libsrcdir="$$s/gcc";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+           libsrcdir="$$s/gcc";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         @stage2_werror_flag@ && \
+         $(STAMP) ../configure-stage4-gcc
+
+all-stage4-gcc: configure-stage4-gcc
+       $(MAKE) stage4-start
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
+       $(STAGE_HOST_EXPORTS)  \
+       cd gcc && \
+       $(MAKE) $(GCC_FLAGS_TO_PASS)  \
+               CC="$${CC}" CC_FOR_BUILD="${CC_FOR_BUILD}" \
+               STAGE_PREFIX=$$r/stage3-gcc/  \
+               $(POSTSTAGE1_FLAGS_TO_PASS) && $(STAMP) ../all-stage4-gcc
+
+
+compare3: all-stage4-gcc
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       rm -f .bad_compare ; \
+       cd stage4-gcc; \
+       files=`find . -name "*$(objext)" -print` ; \
+       cd .. ; \
+       for file in $${files} ; do \
+         f1=$$r/stage3-gcc/$$file; f2=$$r/stage4-gcc/$$file; \
+         @do_compare@ > /dev/null 2>&1; \
+         test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
+       done ; \
+       if [ -f .bad_compare ]; then \
+         echo "Bootstrap comparison failure!"; \
+         cat .bad_compare; \
+         exit 1; \
+       else \
+         true; \
+       fi ; \
+       $(STAMP) compare3
+
+
+
+.PHONY: bootstrap4
+bootstrap4:
+       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) stage4-bubble  compare3  \
+         stage4-start all stage4-end 
+
+
+.PHONY: restage4 distclean-stage4
+
+distclean-stage4: 
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
+       rm -rf configure-stage4-gcc all-stage4-gcc stage4-gcc compare3 
 
+restage4: 
+       rm -rf all-stage4-gcc compare3 
+       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) compare3 
 
-.PHONY: new-cleanstrap
-new-cleanstrap: distclean-stage1 new-bootstrap
 
 
 
+@endif gcc-bootstrap
 
 # --------------------------------------
 # Dependencies between different modules
index 784665dfa693169899999aae76cd287b0e1759a8..e81d036139682cc02dba9d2dd382768c0c567d90 100644 (file)
@@ -470,8 +470,7 @@ PICFLAG_FOR_TARGET =
 
 # The first rule in the file had better be this one.  Don't put any above it.
 # This lives here to allow makefile fragments to contain dependencies.
-all: all.normal
-.PHONY: all
+@default_target@:
 
 #### host and target specific makefile fragments come in here.
 @target_makefile_frag@
@@ -576,9 +575,9 @@ configure-target: [+
     maybe-configure-target-[+module+][+
   ENDFOR target_modules +]
 
-# The target built for a native build.
-.PHONY: all.normal
-all.normal: @all_build_modules@ all-host all-target
+# The target built for a native non-bootstrap build.
+.PHONY: all
+all: @all_build_modules@ all-host all-target
 
 .PHONY: all-host
 all-host: maybe-all-gcc [+
@@ -1171,8 +1170,9 @@ maybe-configure-gcc:
 @if gcc
 maybe-configure-gcc: configure-gcc
 configure-gcc:
+@endif gcc
+@if gcc-no-bootstrap
        @test ! -f gcc/Makefile || exit 0; \
-       [ -f stage_last ] && exit 0; \
        [ -d gcc ] || mkdir gcc; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -1193,7 +1193,7 @@ configure-gcc:
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
          || exit 1
-@endif gcc
+@endif gcc-no-bootstrap
 
 # Don't 'make all' in gcc if it's already been made by 'bootstrap'; that
 # causes trouble.  This wart will be fixed eventually by moving
@@ -1203,19 +1203,17 @@ maybe-all-gcc:
 @if gcc
 maybe-all-gcc: all-gcc
 all-gcc: configure-gcc
+@endif gcc
+@if gcc-no-bootstrap
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
        $(GCC_HOST_EXPORTS) \
-       if [ -f stage_last ] ; then \
-         true ; \
-       elif [ -f gcc/stage_last ] ; then \
-         $(SET_LIB_PATH) \
+       if [ -f gcc/stage_last ] ; then \
          (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
        else \
-         $(SET_LIB_PATH) \
          (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
        fi
-@endif gcc
 
 # Building GCC uses some tools for rebuilding "source" files
 # like texinfo, bison/byacc, etc.  So we must depend on those.
@@ -1294,7 +1292,8 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
        $(SET_LIB_PATH) \
        echo "Building runtime libraries"; \
        $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
-         LANGUAGES="c c++" all
+               LANGUAGES="c c++" all
+@endif gcc-no-bootstrap
 
 .PHONY: check-gcc maybe-check-gcc
 maybe-check-gcc:
@@ -1395,6 +1394,7 @@ maybe-[+make_target+]-gcc: [+make_target+]-gcc
 
 [+ ENDFOR recursive_targets +]
 
+@if gcc-bootstrap
 # ---------------------
 # GCC bootstrap support
 # ---------------------
@@ -1440,7 +1440,7 @@ objext = .o
 # Real targets act phony if they depend on phony targets; this hack
 # prevents gratuitous rebuilding of stage 1.
 prebootstrap:
-       $(MAKE) all-bootstrap
+       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all-bootstrap
        $(STAMP) prebootstrap
 
 # Flags to pass to stage2 and later makes.
@@ -1459,16 +1459,16 @@ POSTSTAGE1_FLAGS_TO_PASS = \
 # * We build only C (and possibly Ada).
 
 [+ FOR bootstrap-stage +]
-.PHONY: new-stage[+id+]-start new-stage[+id+]-end
+.PHONY: stage[+id+]-start stage[+id+]-end
 
-new-stage[+id+]-start:
-       [ -f stage_last ] && $(MAKE) new-`cat stage_last`-end || :
+stage[+id+]-start:
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
        echo stage[+id+] > stage_last ; \
        [ -d stage[+id+]-gcc ] || mkdir stage[+id+]-gcc; \
        set stage[+id+]-gcc gcc ; @CREATE_LINK_TO_DIR@ [+ IF prev +] ; \
        set stage[+prev+]-gcc prev-gcc ; @CREATE_LINK_TO_DIR@ [+ ENDIF prev +]
 
-new-stage[+id+]-end:
+stage[+id+]-end:
        rm -f stage_last ; \
        set gcc stage[+id+]-gcc ; @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \
        set prev-gcc stage[+prev+]-gcc ; @UNDO_LINK_TO_DIR@ [+ ENDIF prev +]
@@ -1476,22 +1476,23 @@ new-stage[+id+]-end:
 # Bubble a bugfix through all the stages up to stage [+id+].  They
 # are remade, but not reconfigured.  The next stage (if any) will not
 # be reconfigured as well.
-.PHONY: new-stage[+id+]-bubble
-new-stage[+id+]-bubble: [+ IF prev +]new-stage[+prev+]-bubble[+ ENDIF +]
+.PHONY: stage[+id+]-bubble
+stage[+id+]-bubble: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +]
        @if [ -f all-stage[+id+]-gcc ] ; then \
          echo Remaking stage [+id+] ; \
          rm -f all-stage[+id+]-gcc ; \
-         $(MAKE) all-stage[+id+]-gcc [+ IF next +] && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
+           all-stage[+id+]-gcc [+ IF next +] && \
          if [ -f configure-stage[+next+]-gcc ] ; then \
            $(STAMP) configure-stage[+next+]-gcc ; \
          fi [+ ENDIF next +]; \
        else \
-         $(MAKE) all-stage[+id+]-gcc ; \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all-stage[+id+]-gcc ; \
        fi
 
 configure-stage[+id+]-gcc: [+ IF prev +] all-stage[+prev+]-gcc [+
          ELSE +] prebootstrap [+ ENDIF prev +]
-       $(MAKE) new-stage[+id+]-start
+       $(MAKE) stage[+id+]-start
        @if [ -f stage[+id+]-gcc/Makefile ] ; then \
          $(STAMP) configure-stage[+id+]-gcc ; \
          exit 0; \
@@ -1521,7 +1522,7 @@ configure-stage[+id+]-gcc: [+ IF prev +] all-stage[+prev+]-gcc [+
          $(STAMP) ../configure-stage[+id+]-gcc
 
 all-stage[+id+]-gcc: configure-stage[+id+]-gcc
-       $(MAKE) new-stage[+id+]-start
+       $(MAKE) stage[+id+]-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; [+ IF prev +] \
        $(STAGE_HOST_EXPORTS) [+ ELSE prev +] \
@@ -1534,7 +1535,7 @@ all-stage[+id+]-gcc: configure-stage[+id+]-gcc
 
 [+ IF compare-target +]
 [+compare-target+]: all-stage[+id+]-gcc
-       [ -f stage_last ] && $(MAKE) new-`cat stage_last`-end || :
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        rm -f .bad_compare ; \
@@ -1559,23 +1560,23 @@ all-stage[+id+]-gcc: configure-stage[+id+]-gcc
 [+ IF bootstrap-target +]
 .PHONY: [+bootstrap-target+]
 [+bootstrap-target+]:
-       $(MAKE) new-stage[+id+]-bubble [+
+       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) stage[+id+]-bubble [+
          IF compare-target +] [+compare-target+] [+
          ENDIF compare-target +] \
-         new-stage[+id+]-start all new-stage[+id+]-end 
+         stage[+id+]-start all stage[+id+]-end 
 [+ ENDIF bootstrap-target +]
 
-.PHONY: new-restage[+id+] distclean-stage[+id+]
+.PHONY: restage[+id+] distclean-stage[+id+]
 
 distclean-stage[+id+]: [+ IF next +] distclean-stage[+next+] [+ ENDIF next +]
-       [ -f stage_last ] && $(MAKE) new-`cat stage_last`-end || :
+       [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
        rm -rf configure-stage[+id+]-gcc all-stage[+id+]-gcc stage[+id+]-gcc [+
          IF compare-target +][+compare-target+] [+ ENDIF compare-target +]
 
-new-restage[+id+]: [+ IF next +] distclean-stage[+next+] [+ ENDIF next +]
+restage[+id+]: [+ IF next +] distclean-stage[+next+] [+ ENDIF next +]
        rm -rf all-stage[+id+]-gcc [+
          IF compare-target +][+compare-target+] [+ ENDIF compare-target +]
-       $(MAKE) [+
+       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) [+
          IF compare-target +][+compare-target+] [+
          ELSE +] all-stage[+id+]-gcc [+ ENDIF compare-target +]
 
@@ -1585,6 +1586,7 @@ new-restage[+id+]: [+ IF next +] distclean-stage[+next+] [+ ENDIF next +]
 [+ ENDIF cleanstrap-target +]
 
 [+ ENDFOR bootstrap-stage +]
+@endif gcc-bootstrap
 
 # --------------------------------------
 # Dependencies between different modules
index 765022877c338328b0edc9194181535d01db2c27..aefa08ca0adc11a67e728bc9ee8f53e4bd939abb 100755 (executable)
--- a/configure
+++ b/configure
@@ -19,6 +19,8 @@ ac_help="$ac_help
   --with-gmp-dir=PATH     Specify source directory for GMP library"
 ac_help="$ac_help
   --with-gmp=PATH         Specify directory for installed GMP library"
+ac_help="$ac_help
+  --enable-bootstrap     Enable bootstrapping [no]"
 ac_help="$ac_help
   --enable-serial-[{host,target,build}-]configure
                           Force sequential configuration of
@@ -587,7 +589,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:591: checking host system type" >&5
+echo "configure:593: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -608,7 +610,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:612: checking target system type" >&5
+echo "configure:614: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -626,7 +628,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:630: checking build system type" >&5
+echo "configure:632: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -681,7 +683,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:685: checking for a BSD compatible install" >&5
+echo "configure:687: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -734,7 +736,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:738: checking whether ln -s works" >&5
+echo "configure:740: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1920,7 +1922,7 @@ fi
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1924: checking for $ac_word" >&5
+echo "configure:1926: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1950,7 +1952,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1954: checking for $ac_word" >&5
+echo "configure:1956: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2001,7 +2003,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2005: checking for $ac_word" >&5
+echo "configure:2007: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2033,7 +2035,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2037: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2044,12 +2046,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 2048 "configure"
+#line 2050 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -2075,12 +2077,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2079: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2081: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2084: checking whether we are using GNU C" >&5
+echo "configure:2086: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2089,7 +2091,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -2108,7 +2110,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2112: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2114: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2144,7 +2146,7 @@ fi
 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2148: checking for $ac_word" >&5
+echo "configure:2150: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2176,7 +2178,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "gnatbind", so it can be a program name with args.
 set dummy gnatbind; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2180: checking for $ac_word" >&5
+echo "configure:2182: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2209,7 +2211,7 @@ fi
 fi
 
 echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
-echo "configure:2213: checking whether compiler driver understands Ada" >&5
+echo "configure:2215: checking whether compiler driver understands Ada" >&5
 if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2242,7 +2244,7 @@ else
 fi
 
 echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
-echo "configure:2246: checking how to compare bootstrapped objects" >&5
+echo "configure:2248: checking how to compare bootstrapped objects" >&5
 if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2315,9 +2317,9 @@ saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS $gmpinc"
 # Check GMP actually works
 echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
-echo "configure:2319: checking for correct version of gmp.h" >&5
+echo "configure:2321: checking for correct version of gmp.h" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2321 "configure"
+#line 2323 "configure"
 #include "confdefs.h"
 #include "gmp.h"
 int main() {
@@ -2328,7 +2330,7 @@ choke me
 
 ; return 0; }
 EOF
-if { (eval echo configure:2332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -2341,19 +2343,19 @@ rm -f conftest*
 
 if test x"$have_gmp" = xyes; then
   echo $ac_n "checking for mpf_init in -lgmp""... $ac_c" 1>&6
-echo "configure:2345: checking for mpf_init in -lgmp" >&5
+echo "configure:2347: checking for mpf_init in -lgmp" >&5
 
   saved_LIBS="$LIBS"
   LIBS="$LIBS $gmplibs"
   cat > conftest.$ac_ext <<EOF
-#line 2350 "configure"
+#line 2352 "configure"
 #include "confdefs.h"
 #include <gmp.h>
 int main() {
 mpf_t n; mpf_init(n);
 ; return 0; }
 EOF
-if { (eval echo configure:2357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -2815,7 +2817,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2819: checking for $ac_word" >&5
+echo "configure:2821: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_YACC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2850,7 +2852,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2854: checking for $ac_word" >&5
+echo "configure:2856: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_M4'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2885,7 +2887,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2889: checking for $ac_word" >&5
+echo "configure:2891: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_LEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3078,6 +3080,41 @@ for module in ${target_configdirs} ; do
 /^@if target-$module\$/d
 /^@endif target-$module\$/d"
 done
+
+# Check whether --enable-bootstrap or --disable-bootstrap was given.
+if test "${enable_bootstrap+set}" = set; then
+  enableval="$enable_bootstrap"
+  :
+else
+  enable_bootstrap=no
+fi
+
+if test -d ${srcdir}/gcc; then
+  case "$host:$target:$enable_bootstrap" in
+    $build:$build:yes | *:no) ;;
+    *:yes) { echo "configure: error: cannot bootstrap a cross-compiler" 1>&2; exit 1; } ;;
+    *) { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; } ;;
+  esac
+else
+  if test $enable_bootstrap = yes; then
+    { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; }
+  fi
+fi
+
+case "$enable_bootstrap" in
+  yes)
+    default_target=new-bootstrap
+    extrasub="$extrasub
+/^@if gcc-bootstrap\$/d
+/^@endif gcc-bootstrap\$/d" ;;
+  no)
+    default_target=all
+    extrasub="$extrasub
+/^@if gcc-no-bootstrap\$/d
+/^@endif gcc-no-bootstrap\$/d" ;;
+esac
+
+
 extrasub="$extrasub
 /^@if /,/^@endif /d"
 
@@ -3460,7 +3497,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
   # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3464: checking for $ac_word" >&5
+echo "configure:3501: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3493,7 +3530,7 @@ if test -z "$ac_cv_prog_AR" ; then
     # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3497: checking for $ac_word" >&5
+echo "configure:3534: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3532,7 +3569,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}as; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3536: checking for $ac_word" >&5
+echo "configure:3573: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3565,7 +3602,7 @@ if test -z "$ac_cv_prog_AS" ; then
     # Extract the first word of "as", so it can be a program name with args.
 set dummy as; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3569: checking for $ac_word" >&5
+echo "configure:3606: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3604,7 +3641,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3608: checking for $ac_word" >&5
+echo "configure:3645: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3637,7 +3674,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then
     # Extract the first word of "dlltool", so it can be a program name with args.
 set dummy dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3641: checking for $ac_word" >&5
+echo "configure:3678: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3676,7 +3713,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}ld; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3680: checking for $ac_word" >&5
+echo "configure:3717: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3709,7 +3746,7 @@ if test -z "$ac_cv_prog_LD" ; then
     # Extract the first word of "ld", so it can be a program name with args.
 set dummy ld; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3713: checking for $ac_word" >&5
+echo "configure:3750: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3748,7 +3785,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}nm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3752: checking for $ac_word" >&5
+echo "configure:3789: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3781,7 +3818,7 @@ if test -z "$ac_cv_prog_NM" ; then
     # Extract the first word of "nm", so it can be a program name with args.
 set dummy nm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3785: checking for $ac_word" >&5
+echo "configure:3822: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3820,7 +3857,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3824: checking for $ac_word" >&5
+echo "configure:3861: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3853,7 +3890,7 @@ if test -z "$ac_cv_prog_RANLIB" ; then
     # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3857: checking for $ac_word" >&5
+echo "configure:3894: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3892,7 +3929,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3896: checking for $ac_word" >&5
+echo "configure:3933: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3925,7 +3962,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then
     # Extract the first word of "windres", so it can be a program name with args.
 set dummy windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3929: checking for $ac_word" >&5
+echo "configure:3966: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3964,7 +4001,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3968: checking for $ac_word" >&5
+echo "configure:4005: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3997,7 +4034,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then
     # Extract the first word of "objcopy", so it can be a program name with args.
 set dummy objcopy; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4001: checking for $ac_word" >&5
+echo "configure:4038: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4036,7 +4073,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}objdump; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4040: checking for $ac_word" >&5
+echo "configure:4077: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4069,7 +4106,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then
     # Extract the first word of "objdump", so it can be a program name with args.
 set dummy objdump; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4073: checking for $ac_word" >&5
+echo "configure:4110: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4118,7 +4155,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4122: checking for $ac_word" >&5
+echo "configure:4159: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4151,7 +4188,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AR_FOR_TARGET" ; then
     # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4155: checking for $ac_word" >&5
+echo "configure:4192: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4190,7 +4227,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}as; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4194: checking for $ac_word" >&5
+echo "configure:4231: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4223,7 +4260,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AS_FOR_TARGET" ; then
     # Extract the first word of "as", so it can be a program name with args.
 set dummy as; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4227: checking for $ac_word" >&5
+echo "configure:4264: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4262,7 +4299,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4266: checking for $ac_word" >&5
+echo "configure:4303: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4295,7 +4332,7 @@ if test -z "$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET" ; then
     # Extract the first word of "dlltool", so it can be a program name with args.
 set dummy dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4299: checking for $ac_word" >&5
+echo "configure:4336: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4334,7 +4371,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4338: checking for $ac_word" >&5
+echo "configure:4375: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4367,7 +4404,7 @@ if test -z "$ac_cv_prog_CONFIGURED_LD_FOR_TARGET" ; then
     # Extract the first word of "ld", so it can be a program name with args.
 set dummy ld; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4371: checking for $ac_word" >&5
+echo "configure:4408: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4406,7 +4443,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4410: checking for $ac_word" >&5
+echo "configure:4447: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4439,7 +4476,7 @@ if test -z "$ac_cv_prog_CONFIGURED_NM_FOR_TARGET" ; then
     # Extract the first word of "nm", so it can be a program name with args.
 set dummy nm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4443: checking for $ac_word" >&5
+echo "configure:4480: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4478,7 +4515,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4482: checking for $ac_word" >&5
+echo "configure:4519: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4511,7 +4548,7 @@ if test -z "$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET" ; then
     # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4515: checking for $ac_word" >&5
+echo "configure:4552: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4550,7 +4587,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4554: checking for $ac_word" >&5
+echo "configure:4591: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4583,7 +4620,7 @@ if test -z "$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET" ; then
     # Extract the first word of "windres", so it can be a program name with args.
 set dummy windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4587: checking for $ac_word" >&5
+echo "configure:4624: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4668,7 +4705,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
 NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4672: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4709: checking whether to enable maintainer-specific portions of Makefiles" >&5
 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then
   enableval="$enable_maintainer_mode"
@@ -4715,7 +4752,7 @@ esac
 # gcc for stageN-gcc and stage-prev for stage(N-1).  In case this is not
 # possible, however, we can resort to mv.
 echo $ac_n "checking if symbolic links between directories work""... $ac_c" 1>&6
-echo "configure:4719: checking if symbolic links between directories work" >&5
+echo "configure:4756: checking if symbolic links between directories work" >&5
 if eval "test \"`echo '$''{'gcc_cv_prog_ln_s_dir'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4940,6 +4977,7 @@ s%@stage1_languages@%$stage1_languages%g
 s%@DEFAULT_YACC@%$DEFAULT_YACC%g
 s%@DEFAULT_M4@%$DEFAULT_M4%g
 s%@DEFAULT_LEX@%$DEFAULT_LEX%g
+s%@default_target@%$default_target%g
 /@serialization_dependencies@/r $serialization_dependencies
 s%@serialization_dependencies@%%g
 /@host_makefile_frag@/r $host_makefile_frag
index 3d7538459c1bf0a32024f5ffa836ef920872c989..bb6e8d7b2d171ca016bd7a7a4a769c35718f4803 100644 (file)
@@ -1760,6 +1760,36 @@ for module in ${target_configdirs} ; do
 /^@if target-$module\$/d
 /^@endif target-$module\$/d"
 done
+
+AC_ARG_ENABLE([bootstrap],
+[  --enable-bootstrap     Enable bootstrapping [no]],,
+enable_bootstrap=no)
+if test -d ${srcdir}/gcc; then
+  case "$host:$target:$enable_bootstrap" in
+    $build:$build:yes | *:no) ;;
+    *:yes) AC_MSG_ERROR([cannot bootstrap a cross-compiler]) ;;
+    *) AC_MSG_ERROR([invalid option for --enable-bootstrap]) ;;
+  esac
+else
+  if test $enable_bootstrap = yes; then
+    AC_MSG_ERROR([cannot bootstrap without a compiler])
+  fi
+fi
+
+case "$enable_bootstrap" in
+  yes)
+    default_target=new-bootstrap
+    extrasub="$extrasub
+/^@if gcc-bootstrap\$/d
+/^@endif gcc-bootstrap\$/d" ;;
+  no)
+    default_target=all
+    extrasub="$extrasub
+/^@if gcc-no-bootstrap\$/d
+/^@endif gcc-no-bootstrap\$/d" ;;
+esac
+AC_SUBST(default_target)
+
 extrasub="$extrasub
 /^@if /,/^@endif /d"
 
This page took 0.066739 seconds and 4 git commands to generate.