diff --git a/ChangeLog b/ChangeLog
index 0a3943b8ceef01127965ba0cf6c71f11df6b9710..aef8e315f1469988c222a12794762b11f3e9a202 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2018-06-29  Alexandre Oliva <oliva@adacore.com>
+
+	* configure.ac: Introduce support for @unless/@endunless.
+	* Makefile.tpl (dep-kind): Rewrite with cond; return
+	postbootstrap in some cases.
+	(make-postboot-dep, postboot-targets): New.
+	(dependencies): Do not output postbootstrap dependencies at
+	first.  Output non-target ones changed for configure to depend
+	on stage_last @if gcc-bootstrap, and the original deps @unless
+	gcc-bootstrap.
+	* configure.in, Makefile.in: Rebuilt.
+
 2018-06-28  Jackson Woodruff  <jackson.woodruff@arm.com>
 
 	* MAINTAINERS (write after approval): Add myself.
diff --git a/Makefile.in b/Makefile.in
index 32a92a6bcd17dd01483759745b0e7d5de37465a3..e0dfad337a6cab955508eafd76e93166e956b423 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -55594,7 +55594,6 @@ all-build-m4: maybe-all-build-texinfo
 all-build-fixincludes: maybe-all-build-libiberty
 all-build-libcpp: maybe-all-build-libiberty
 configure-gcc: maybe-configure-intl
-
 configure-stage1-gcc: maybe-configure-stage1-intl
 configure-stage2-gcc: maybe-configure-stage2-intl
 configure-stage3-gcc: maybe-configure-stage3-intl
@@ -55605,7 +55604,6 @@ configure-stagefeedback-gcc: maybe-configure-stagefeedback-intl
 configure-stageautoprofile-gcc: maybe-configure-stageautoprofile-intl
 configure-stageautofeedback-gcc: maybe-configure-stageautofeedback-intl
 configure-gcc: maybe-all-gmp
-
 configure-stage1-gcc: maybe-all-stage1-gmp
 configure-stage2-gcc: maybe-all-stage2-gmp
 configure-stage3-gcc: maybe-all-stage3-gmp
@@ -55616,7 +55614,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-gmp
 configure-stageautoprofile-gcc: maybe-all-stageautoprofile-gmp
 configure-stageautofeedback-gcc: maybe-all-stageautofeedback-gmp
 configure-gcc: maybe-all-mpfr
-
 configure-stage1-gcc: maybe-all-stage1-mpfr
 configure-stage2-gcc: maybe-all-stage2-mpfr
 configure-stage3-gcc: maybe-all-stage3-mpfr
@@ -55627,7 +55624,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-mpfr
 configure-stageautoprofile-gcc: maybe-all-stageautoprofile-mpfr
 configure-stageautofeedback-gcc: maybe-all-stageautofeedback-mpfr
 configure-gcc: maybe-all-mpc
-
 configure-stage1-gcc: maybe-all-stage1-mpc
 configure-stage2-gcc: maybe-all-stage2-mpc
 configure-stage3-gcc: maybe-all-stage3-mpc
@@ -55638,7 +55634,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-mpc
 configure-stageautoprofile-gcc: maybe-all-stageautoprofile-mpc
 configure-stageautofeedback-gcc: maybe-all-stageautofeedback-mpc
 configure-gcc: maybe-all-isl
-
 configure-stage1-gcc: maybe-all-stage1-isl
 configure-stage2-gcc: maybe-all-stage2-isl
 configure-stage3-gcc: maybe-all-stage3-isl
@@ -55649,7 +55644,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-isl
 configure-stageautoprofile-gcc: maybe-all-stageautoprofile-isl
 configure-stageautofeedback-gcc: maybe-all-stageautofeedback-isl
 configure-gcc: maybe-all-lto-plugin
-
 configure-stage1-gcc: maybe-all-stage1-lto-plugin
 configure-stage2-gcc: maybe-all-stage2-lto-plugin
 configure-stage3-gcc: maybe-all-stage3-lto-plugin
@@ -55660,7 +55654,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin
 configure-stageautoprofile-gcc: maybe-all-stageautoprofile-lto-plugin
 configure-stageautofeedback-gcc: maybe-all-stageautofeedback-lto-plugin
 configure-gcc: maybe-all-binutils
-
 configure-stage1-gcc: maybe-all-stage1-binutils
 configure-stage2-gcc: maybe-all-stage2-binutils
 configure-stage3-gcc: maybe-all-stage3-binutils
@@ -55671,7 +55664,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-binutils
 configure-stageautoprofile-gcc: maybe-all-stageautoprofile-binutils
 configure-stageautofeedback-gcc: maybe-all-stageautofeedback-binutils
 configure-gcc: maybe-all-gas
-
 configure-stage1-gcc: maybe-all-stage1-gas
 configure-stage2-gcc: maybe-all-stage2-gas
 configure-stage3-gcc: maybe-all-stage3-gas
@@ -55682,7 +55674,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-gas
 configure-stageautoprofile-gcc: maybe-all-stageautoprofile-gas
 configure-stageautofeedback-gcc: maybe-all-stageautofeedback-gas
 configure-gcc: maybe-all-ld
-
 configure-stage1-gcc: maybe-all-stage1-ld
 configure-stage2-gcc: maybe-all-stage2-ld
 configure-stage3-gcc: maybe-all-stage3-ld
@@ -55693,7 +55684,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-ld
 configure-stageautoprofile-gcc: maybe-all-stageautoprofile-ld
 configure-stageautofeedback-gcc: maybe-all-stageautofeedback-ld
 configure-gcc: maybe-all-gold
-
 configure-stage1-gcc: maybe-all-stage1-gold
 configure-stage2-gcc: maybe-all-stage2-gold
 configure-stage3-gcc: maybe-all-stage3-gold
@@ -55704,7 +55694,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-gold
 configure-stageautoprofile-gcc: maybe-all-stageautoprofile-gold
 configure-stageautofeedback-gcc: maybe-all-stageautofeedback-gold
 configure-gcc: maybe-all-libelf
-
 configure-stage1-gcc: maybe-all-stage1-libelf
 configure-stage2-gcc: maybe-all-stage2-libelf
 configure-stage3-gcc: maybe-all-stage3-libelf
@@ -55715,7 +55704,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-libelf
 configure-stageautoprofile-gcc: maybe-all-stageautoprofile-libelf
 configure-stageautofeedback-gcc: maybe-all-stageautofeedback-libelf
 configure-gcc: maybe-all-libiconv
-
 configure-stage1-gcc: maybe-all-stage1-libiconv
 configure-stage2-gcc: maybe-all-stage2-libiconv
 configure-stage3-gcc: maybe-all-stage3-libiconv
@@ -55726,7 +55714,6 @@ configure-stagefeedback-gcc: maybe-all-stagefeedback-libiconv
 configure-stageautoprofile-gcc: maybe-all-stageautoprofile-libiconv
 configure-stageautofeedback-gcc: maybe-all-stageautofeedback-libiconv
 all-gcc: all-libiberty
-
 all-stage1-gcc: all-stage1-libiberty
 all-stage2-gcc: all-stage2-libiberty
 all-stage3-gcc: all-stage3-libiberty
@@ -55737,7 +55724,6 @@ all-stagefeedback-gcc: all-stagefeedback-libiberty
 all-stageautoprofile-gcc: all-stageautoprofile-libiberty
 all-stageautofeedback-gcc: all-stageautofeedback-libiberty
 all-gcc: maybe-all-intl
-
 all-stage1-gcc: maybe-all-stage1-intl
 all-stage2-gcc: maybe-all-stage2-intl
 all-stage3-gcc: maybe-all-stage3-intl
@@ -55748,7 +55734,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-intl
 all-stageautoprofile-gcc: maybe-all-stageautoprofile-intl
 all-stageautofeedback-gcc: maybe-all-stageautofeedback-intl
 all-gcc: maybe-all-mpfr
-
 all-stage1-gcc: maybe-all-stage1-mpfr
 all-stage2-gcc: maybe-all-stage2-mpfr
 all-stage3-gcc: maybe-all-stage3-mpfr
@@ -55759,7 +55744,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-mpfr
 all-stageautoprofile-gcc: maybe-all-stageautoprofile-mpfr
 all-stageautofeedback-gcc: maybe-all-stageautofeedback-mpfr
 all-gcc: maybe-all-mpc
-
 all-stage1-gcc: maybe-all-stage1-mpc
 all-stage2-gcc: maybe-all-stage2-mpc
 all-stage3-gcc: maybe-all-stage3-mpc
@@ -55770,7 +55754,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-mpc
 all-stageautoprofile-gcc: maybe-all-stageautoprofile-mpc
 all-stageautofeedback-gcc: maybe-all-stageautofeedback-mpc
 all-gcc: maybe-all-isl
-
 all-stage1-gcc: maybe-all-stage1-isl
 all-stage2-gcc: maybe-all-stage2-isl
 all-stage3-gcc: maybe-all-stage3-isl
@@ -55781,7 +55764,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-isl
 all-stageautoprofile-gcc: maybe-all-stageautoprofile-isl
 all-stageautofeedback-gcc: maybe-all-stageautofeedback-isl
 all-gcc: maybe-all-build-texinfo
-
 all-stage1-gcc: maybe-all-build-texinfo
 all-stage2-gcc: maybe-all-build-texinfo
 all-stage3-gcc: maybe-all-build-texinfo
@@ -55792,7 +55774,6 @@ all-stagefeedback-gcc: maybe-all-build-texinfo
 all-stageautoprofile-gcc: maybe-all-build-texinfo
 all-stageautofeedback-gcc: maybe-all-build-texinfo
 all-gcc: maybe-all-build-bison
-
 all-stage1-gcc: maybe-all-build-bison
 all-stage2-gcc: maybe-all-build-bison
 all-stage3-gcc: maybe-all-build-bison
@@ -55803,7 +55784,6 @@ all-stagefeedback-gcc: maybe-all-build-bison
 all-stageautoprofile-gcc: maybe-all-build-bison
 all-stageautofeedback-gcc: maybe-all-build-bison
 all-gcc: maybe-all-build-flex
-
 all-stage1-gcc: maybe-all-build-flex
 all-stage2-gcc: maybe-all-build-flex
 all-stage3-gcc: maybe-all-build-flex
@@ -55814,7 +55794,6 @@ all-stagefeedback-gcc: maybe-all-build-flex
 all-stageautoprofile-gcc: maybe-all-build-flex
 all-stageautofeedback-gcc: maybe-all-build-flex
 all-gcc: maybe-all-build-libiberty
-
 all-stage1-gcc: maybe-all-build-libiberty
 all-stage2-gcc: maybe-all-build-libiberty
 all-stage3-gcc: maybe-all-build-libiberty
@@ -55825,7 +55804,6 @@ all-stagefeedback-gcc: maybe-all-build-libiberty
 all-stageautoprofile-gcc: maybe-all-build-libiberty
 all-stageautofeedback-gcc: maybe-all-build-libiberty
 all-gcc: maybe-all-build-fixincludes
-
 all-stage1-gcc: maybe-all-build-fixincludes
 all-stage2-gcc: maybe-all-build-fixincludes
 all-stage3-gcc: maybe-all-build-fixincludes
@@ -55836,7 +55814,6 @@ all-stagefeedback-gcc: maybe-all-build-fixincludes
 all-stageautoprofile-gcc: maybe-all-build-fixincludes
 all-stageautofeedback-gcc: maybe-all-build-fixincludes
 all-gcc: maybe-all-build-libcpp
-
 all-stage1-gcc: maybe-all-build-libcpp
 all-stage2-gcc: maybe-all-build-libcpp
 all-stage3-gcc: maybe-all-build-libcpp
@@ -55847,7 +55824,6 @@ all-stagefeedback-gcc: maybe-all-build-libcpp
 all-stageautoprofile-gcc: maybe-all-build-libcpp
 all-stageautofeedback-gcc: maybe-all-build-libcpp
 all-gcc: maybe-all-zlib
-
 all-stage1-gcc: maybe-all-stage1-zlib
 all-stage2-gcc: maybe-all-stage2-zlib
 all-stage3-gcc: maybe-all-stage3-zlib
@@ -55858,7 +55834,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-zlib
 all-stageautoprofile-gcc: maybe-all-stageautoprofile-zlib
 all-stageautofeedback-gcc: maybe-all-stageautofeedback-zlib
 all-gcc: all-libbacktrace
-
 all-stage1-gcc: all-stage1-libbacktrace
 all-stage2-gcc: all-stage2-libbacktrace
 all-stage3-gcc: all-stage3-libbacktrace
@@ -55869,7 +55844,6 @@ all-stagefeedback-gcc: all-stagefeedback-libbacktrace
 all-stageautoprofile-gcc: all-stageautoprofile-libbacktrace
 all-stageautofeedback-gcc: all-stageautofeedback-libbacktrace
 all-gcc: all-libcpp
-
 all-stage1-gcc: all-stage1-libcpp
 all-stage2-gcc: all-stage2-libcpp
 all-stage3-gcc: all-stage3-libcpp
@@ -55880,7 +55854,6 @@ all-stagefeedback-gcc: all-stagefeedback-libcpp
 all-stageautoprofile-gcc: all-stageautoprofile-libcpp
 all-stageautofeedback-gcc: all-stageautofeedback-libcpp
 all-gcc: all-libdecnumber
-
 all-stage1-gcc: all-stage1-libdecnumber
 all-stage2-gcc: all-stage2-libdecnumber
 all-stage3-gcc: all-stage3-libdecnumber
@@ -55891,7 +55864,6 @@ all-stagefeedback-gcc: all-stagefeedback-libdecnumber
 all-stageautoprofile-gcc: all-stageautoprofile-libdecnumber
 all-stageautofeedback-gcc: all-stageautofeedback-libdecnumber
 all-gcc: maybe-all-libiberty
-
 all-stage1-gcc: maybe-all-stage1-libiberty
 all-stage2-gcc: maybe-all-stage2-libiberty
 all-stage3-gcc: maybe-all-stage3-libiberty
@@ -55902,7 +55874,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-libiberty
 all-stageautoprofile-gcc: maybe-all-stageautoprofile-libiberty
 all-stageautofeedback-gcc: maybe-all-stageautofeedback-libiberty
 all-gcc: maybe-all-fixincludes
-
 all-stage1-gcc: maybe-all-stage1-fixincludes
 all-stage2-gcc: maybe-all-stage2-fixincludes
 all-stage3-gcc: maybe-all-stage3-fixincludes
@@ -55913,7 +55884,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-fixincludes
 all-stageautoprofile-gcc: maybe-all-stageautoprofile-fixincludes
 all-stageautofeedback-gcc: maybe-all-stageautofeedback-fixincludes
 all-gcc: maybe-all-lto-plugin
-
 all-stage1-gcc: maybe-all-stage1-lto-plugin
 all-stage2-gcc: maybe-all-stage2-lto-plugin
 all-stage3-gcc: maybe-all-stage3-lto-plugin
@@ -55924,7 +55894,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin
 all-stageautoprofile-gcc: maybe-all-stageautoprofile-lto-plugin
 all-stageautofeedback-gcc: maybe-all-stageautofeedback-lto-plugin
 all-gcc: maybe-all-libiconv
-
 all-stage1-gcc: maybe-all-stage1-libiconv
 all-stage2-gcc: maybe-all-stage2-libiconv
 all-stage3-gcc: maybe-all-stage3-libiconv
@@ -55935,7 +55904,6 @@ all-stagefeedback-gcc: maybe-all-stagefeedback-libiconv
 all-stageautoprofile-gcc: maybe-all-stageautoprofile-libiconv
 all-stageautofeedback-gcc: maybe-all-stageautofeedback-libiconv
 info-gcc: maybe-all-build-libiberty
-
 info-stage1-gcc: maybe-all-build-libiberty
 info-stage2-gcc: maybe-all-build-libiberty
 info-stage3-gcc: maybe-all-build-libiberty
@@ -55946,7 +55914,6 @@ info-stagefeedback-gcc: maybe-all-build-libiberty
 info-stageautoprofile-gcc: maybe-all-build-libiberty
 info-stageautofeedback-gcc: maybe-all-build-libiberty
 dvi-gcc: maybe-all-build-libiberty
-
 dvi-stage1-gcc: maybe-all-build-libiberty
 dvi-stage2-gcc: maybe-all-build-libiberty
 dvi-stage3-gcc: maybe-all-build-libiberty
@@ -55957,7 +55924,6 @@ dvi-stagefeedback-gcc: maybe-all-build-libiberty
 dvi-stageautoprofile-gcc: maybe-all-build-libiberty
 dvi-stageautofeedback-gcc: maybe-all-build-libiberty
 pdf-gcc: maybe-all-build-libiberty
-
 pdf-stage1-gcc: maybe-all-build-libiberty
 pdf-stage2-gcc: maybe-all-build-libiberty
 pdf-stage3-gcc: maybe-all-build-libiberty
@@ -55968,7 +55934,6 @@ pdf-stagefeedback-gcc: maybe-all-build-libiberty
 pdf-stageautoprofile-gcc: maybe-all-build-libiberty
 pdf-stageautofeedback-gcc: maybe-all-build-libiberty
 html-gcc: maybe-all-build-libiberty
-
 html-stage1-gcc: maybe-all-build-libiberty
 html-stage2-gcc: maybe-all-build-libiberty
 html-stage3-gcc: maybe-all-build-libiberty
@@ -55983,7 +55948,6 @@ install-gcc: maybe-install-lto-plugin
 install-strip-gcc: maybe-install-strip-fixincludes
 install-strip-gcc: maybe-install-strip-lto-plugin
 configure-libcpp: configure-libiberty
-
 configure-stage1-libcpp: configure-stage1-libiberty
 configure-stage2-libcpp: configure-stage2-libiberty
 configure-stage3-libcpp: configure-stage3-libiberty
@@ -55994,7 +55958,6 @@ configure-stagefeedback-libcpp: configure-stagefeedback-libiberty
 configure-stageautoprofile-libcpp: configure-stageautoprofile-libiberty
 configure-stageautofeedback-libcpp: configure-stageautofeedback-libiberty
 configure-libcpp: maybe-configure-intl
-
 configure-stage1-libcpp: maybe-configure-stage1-intl
 configure-stage2-libcpp: maybe-configure-stage2-intl
 configure-stage3-libcpp: maybe-configure-stage3-intl
@@ -56005,7 +55968,6 @@ configure-stagefeedback-libcpp: maybe-configure-stagefeedback-intl
 configure-stageautoprofile-libcpp: maybe-configure-stageautoprofile-intl
 configure-stageautofeedback-libcpp: maybe-configure-stageautofeedback-intl
 configure-libcpp: maybe-all-libiconv
-
 configure-stage1-libcpp: maybe-all-stage1-libiconv
 configure-stage2-libcpp: maybe-all-stage2-libiconv
 configure-stage3-libcpp: maybe-all-stage3-libiconv
@@ -56016,7 +55978,6 @@ configure-stagefeedback-libcpp: maybe-all-stagefeedback-libiconv
 configure-stageautoprofile-libcpp: maybe-all-stageautoprofile-libiconv
 configure-stageautofeedback-libcpp: maybe-all-stageautofeedback-libiconv
 all-libcpp: all-libiberty
-
 all-stage1-libcpp: all-stage1-libiberty
 all-stage2-libcpp: all-stage2-libiberty
 all-stage3-libcpp: all-stage3-libiberty
@@ -56027,7 +55988,6 @@ all-stagefeedback-libcpp: all-stagefeedback-libiberty
 all-stageautoprofile-libcpp: all-stageautoprofile-libiberty
 all-stageautofeedback-libcpp: all-stageautofeedback-libiberty
 all-libcpp: maybe-all-intl
-
 all-stage1-libcpp: maybe-all-stage1-intl
 all-stage2-libcpp: maybe-all-stage2-intl
 all-stage3-libcpp: maybe-all-stage3-intl
@@ -56038,7 +55998,6 @@ all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
 all-stageautoprofile-libcpp: maybe-all-stageautoprofile-intl
 all-stageautofeedback-libcpp: maybe-all-stageautofeedback-intl
 all-libcpp: maybe-all-libiconv
-
 all-stage1-libcpp: maybe-all-stage1-libiconv
 all-stage2-libcpp: maybe-all-stage2-libiconv
 all-stage3-libcpp: maybe-all-stage3-libiconv
@@ -56049,7 +56008,6 @@ all-stagefeedback-libcpp: maybe-all-stagefeedback-libiconv
 all-stageautoprofile-libcpp: maybe-all-stageautoprofile-libiconv
 all-stageautofeedback-libcpp: maybe-all-stageautofeedback-libiconv
 all-fixincludes: maybe-all-libiberty
-
 all-stage1-fixincludes: maybe-all-stage1-libiberty
 all-stage2-fixincludes: maybe-all-stage2-libiberty
 all-stage3-fixincludes: maybe-all-stage3-libiberty
@@ -56060,9 +56018,7 @@ all-stagefeedback-fixincludes: maybe-all-stagefeedback-libiberty
 all-stageautoprofile-fixincludes: maybe-all-stageautoprofile-libiberty
 all-stageautofeedback-fixincludes: maybe-all-stageautofeedback-libiberty
 all-gnattools: maybe-all-target-libada
-all-gnattools: maybe-all-target-libstdc++-v3
 all-lto-plugin: maybe-all-libiberty
-
 all-stage1-lto-plugin: maybe-all-stage1-libiberty
 all-stage2-lto-plugin: maybe-all-stage2-libiberty
 all-stage3-lto-plugin: maybe-all-stage3-libiberty
@@ -56073,7 +56029,6 @@ all-stagefeedback-lto-plugin: maybe-all-stagefeedback-libiberty
 all-stageautoprofile-lto-plugin: maybe-all-stageautoprofile-libiberty
 all-stageautofeedback-lto-plugin: maybe-all-stageautofeedback-libiberty
 all-lto-plugin: maybe-all-libiberty-linker-plugin
-
 all-stage1-lto-plugin: maybe-all-stage1-libiberty-linker-plugin
 all-stage2-lto-plugin: maybe-all-stage2-libiberty-linker-plugin
 all-stage3-lto-plugin: maybe-all-stage3-libiberty-linker-plugin
@@ -56083,12 +56038,8 @@ all-stagetrain-lto-plugin: maybe-all-stagetrain-libiberty-linker-plugin
 all-stagefeedback-lto-plugin: maybe-all-stagefeedback-libiberty-linker-plugin
 all-stageautoprofile-lto-plugin: maybe-all-stageautoprofile-libiberty-linker-plugin
 all-stageautofeedback-lto-plugin: maybe-all-stageautofeedback-libiberty-linker-plugin
-configure-libcc1: maybe-configure-gcc
-all-libcc1: maybe-all-gcc
 all-gotools: maybe-all-target-libgo
-all-utils: maybe-all-libiberty
 configure-intl: maybe-all-libiconv
-
 configure-stage1-intl: maybe-all-stage1-libiconv
 configure-stage2-intl: maybe-all-stage2-libiconv
 configure-stage3-intl: maybe-all-stage3-libiconv
@@ -56099,7 +56050,6 @@ configure-stagefeedback-intl: maybe-all-stagefeedback-libiconv
 configure-stageautoprofile-intl: maybe-all-stageautoprofile-libiconv
 configure-stageautofeedback-intl: maybe-all-stageautofeedback-libiconv
 configure-mpfr: maybe-all-gmp
-
 configure-stage1-mpfr: maybe-all-stage1-gmp
 configure-stage2-mpfr: maybe-all-stage2-gmp
 configure-stage3-mpfr: maybe-all-stage3-gmp
@@ -56110,7 +56060,6 @@ configure-stagefeedback-mpfr: maybe-all-stagefeedback-gmp
 configure-stageautoprofile-mpfr: maybe-all-stageautoprofile-gmp
 configure-stageautofeedback-mpfr: maybe-all-stageautofeedback-gmp
 configure-mpc: maybe-all-mpfr
-
 configure-stage1-mpc: maybe-all-stage1-mpfr
 configure-stage2-mpc: maybe-all-stage2-mpfr
 configure-stage3-mpc: maybe-all-stage3-mpfr
@@ -56121,7 +56070,6 @@ configure-stagefeedback-mpc: maybe-all-stagefeedback-mpfr
 configure-stageautoprofile-mpc: maybe-all-stageautoprofile-mpfr
 configure-stageautofeedback-mpc: maybe-all-stageautofeedback-mpfr
 configure-isl: maybe-all-gmp
-
 configure-stage1-isl: maybe-all-stage1-gmp
 configure-stage2-isl: maybe-all-stage2-gmp
 configure-stage3-isl: maybe-all-stage3-gmp
@@ -56132,7 +56080,6 @@ configure-stagefeedback-isl: maybe-all-stagefeedback-gmp
 configure-stageautoprofile-isl: maybe-all-stageautoprofile-gmp
 configure-stageautofeedback-isl: maybe-all-stageautofeedback-gmp
 all-intl: maybe-all-libiconv
-
 all-stage1-intl: maybe-all-stage1-libiconv
 all-stage2-intl: maybe-all-stage2-libiconv
 all-stage3-intl: maybe-all-stage3-libiconv
@@ -56142,17 +56089,10 @@ all-stagetrain-intl: maybe-all-stagetrain-libiconv
 all-stagefeedback-intl: maybe-all-stagefeedback-libiconv
 all-stageautoprofile-intl: maybe-all-stageautoprofile-libiconv
 all-stageautofeedback-intl: maybe-all-stageautofeedback-libiconv
-configure-gdb: maybe-all-intl
 configure-gdb: maybe-configure-sim
-configure-gdb: maybe-all-bfd
-configure-gdb: maybe-all-libiconv
-all-gdb: maybe-all-libiberty
-all-gdb: maybe-all-libiconv
-all-gdb: maybe-all-opcodes
 all-gdb: maybe-all-readline
 all-gdb: maybe-all-build-bison
 all-gdb: maybe-all-sim
-all-gdb: maybe-all-libdecnumber
 all-gdb: maybe-all-libtermcap
 configure-libgui: maybe-configure-tcl
 configure-libgui: maybe-configure-tk
@@ -56160,7 +56100,6 @@ all-libgui: maybe-all-tcl
 all-libgui: maybe-all-tk
 all-libgui: maybe-all-itcl
 configure-bfd: configure-libiberty
-
 configure-stage1-bfd: configure-stage1-libiberty
 configure-stage2-bfd: configure-stage2-libiberty
 configure-stage3-bfd: configure-stage3-libiberty
@@ -56171,7 +56110,6 @@ configure-stagefeedback-bfd: configure-stagefeedback-libiberty
 configure-stageautoprofile-bfd: configure-stageautoprofile-libiberty
 configure-stageautofeedback-bfd: configure-stageautofeedback-libiberty
 configure-bfd: maybe-configure-intl
-
 configure-stage1-bfd: maybe-configure-stage1-intl
 configure-stage2-bfd: maybe-configure-stage2-intl
 configure-stage3-bfd: maybe-configure-stage3-intl
@@ -56182,7 +56120,6 @@ configure-stagefeedback-bfd: maybe-configure-stagefeedback-intl
 configure-stageautoprofile-bfd: maybe-configure-stageautoprofile-intl
 configure-stageautofeedback-bfd: maybe-configure-stageautofeedback-intl
 all-bfd: maybe-all-libiberty
-
 all-stage1-bfd: maybe-all-stage1-libiberty
 all-stage2-bfd: maybe-all-stage2-libiberty
 all-stage3-bfd: maybe-all-stage3-libiberty
@@ -56193,7 +56130,6 @@ all-stagefeedback-bfd: maybe-all-stagefeedback-libiberty
 all-stageautoprofile-bfd: maybe-all-stageautoprofile-libiberty
 all-stageautofeedback-bfd: maybe-all-stageautofeedback-libiberty
 all-bfd: maybe-all-intl
-
 all-stage1-bfd: maybe-all-stage1-intl
 all-stage2-bfd: maybe-all-stage2-intl
 all-stage3-bfd: maybe-all-stage3-intl
@@ -56204,7 +56140,6 @@ all-stagefeedback-bfd: maybe-all-stagefeedback-intl
 all-stageautoprofile-bfd: maybe-all-stageautoprofile-intl
 all-stageautofeedback-bfd: maybe-all-stageautofeedback-intl
 all-bfd: maybe-all-zlib
-
 all-stage1-bfd: maybe-all-stage1-zlib
 all-stage2-bfd: maybe-all-stage2-zlib
 all-stage3-bfd: maybe-all-stage3-zlib
@@ -56215,7 +56150,6 @@ all-stagefeedback-bfd: maybe-all-stagefeedback-zlib
 all-stageautoprofile-bfd: maybe-all-stageautoprofile-zlib
 all-stageautofeedback-bfd: maybe-all-stageautofeedback-zlib
 configure-opcodes: configure-libiberty
-
 configure-stage1-opcodes: configure-stage1-libiberty
 configure-stage2-opcodes: configure-stage2-libiberty
 configure-stage3-opcodes: configure-stage3-libiberty
@@ -56226,7 +56160,6 @@ configure-stagefeedback-opcodes: configure-stagefeedback-libiberty
 configure-stageautoprofile-opcodes: configure-stageautoprofile-libiberty
 configure-stageautofeedback-opcodes: configure-stageautofeedback-libiberty
 all-opcodes: maybe-all-libiberty
-
 all-stage1-opcodes: maybe-all-stage1-libiberty
 all-stage2-opcodes: maybe-all-stage2-libiberty
 all-stage3-opcodes: maybe-all-stage3-libiberty
@@ -56237,7 +56170,6 @@ all-stagefeedback-opcodes: maybe-all-stagefeedback-libiberty
 all-stageautoprofile-opcodes: maybe-all-stageautoprofile-libiberty
 all-stageautofeedback-opcodes: maybe-all-stageautofeedback-libiberty
 configure-binutils: maybe-configure-intl
-
 configure-stage1-binutils: maybe-configure-stage1-intl
 configure-stage2-binutils: maybe-configure-stage2-intl
 configure-stage3-binutils: maybe-configure-stage3-intl
@@ -56248,7 +56180,6 @@ configure-stagefeedback-binutils: maybe-configure-stagefeedback-intl
 configure-stageautoprofile-binutils: maybe-configure-stageautoprofile-intl
 configure-stageautofeedback-binutils: maybe-configure-stageautofeedback-intl
 all-binutils: maybe-all-libiberty
-
 all-stage1-binutils: maybe-all-stage1-libiberty
 all-stage2-binutils: maybe-all-stage2-libiberty
 all-stage3-binutils: maybe-all-stage3-libiberty
@@ -56259,7 +56190,6 @@ all-stagefeedback-binutils: maybe-all-stagefeedback-libiberty
 all-stageautoprofile-binutils: maybe-all-stageautoprofile-libiberty
 all-stageautofeedback-binutils: maybe-all-stageautofeedback-libiberty
 all-binutils: maybe-all-opcodes
-
 all-stage1-binutils: maybe-all-stage1-opcodes
 all-stage2-binutils: maybe-all-stage2-opcodes
 all-stage3-binutils: maybe-all-stage3-opcodes
@@ -56270,7 +56200,6 @@ all-stagefeedback-binutils: maybe-all-stagefeedback-opcodes
 all-stageautoprofile-binutils: maybe-all-stageautoprofile-opcodes
 all-stageautofeedback-binutils: maybe-all-stageautofeedback-opcodes
 all-binutils: maybe-all-bfd
-
 all-stage1-binutils: maybe-all-stage1-bfd
 all-stage2-binutils: maybe-all-stage2-bfd
 all-stage3-binutils: maybe-all-stage3-bfd
@@ -56281,7 +56210,6 @@ all-stagefeedback-binutils: maybe-all-stagefeedback-bfd
 all-stageautoprofile-binutils: maybe-all-stageautoprofile-bfd
 all-stageautofeedback-binutils: maybe-all-stageautofeedback-bfd
 all-binutils: maybe-all-build-flex
-
 all-stage1-binutils: maybe-all-build-flex
 all-stage2-binutils: maybe-all-build-flex
 all-stage3-binutils: maybe-all-build-flex
@@ -56292,7 +56220,6 @@ all-stagefeedback-binutils: maybe-all-build-flex
 all-stageautoprofile-binutils: maybe-all-build-flex
 all-stageautofeedback-binutils: maybe-all-build-flex
 all-binutils: maybe-all-build-bison
-
 all-stage1-binutils: maybe-all-build-bison
 all-stage2-binutils: maybe-all-build-bison
 all-stage3-binutils: maybe-all-build-bison
@@ -56303,7 +56230,6 @@ all-stagefeedback-binutils: maybe-all-build-bison
 all-stageautoprofile-binutils: maybe-all-build-bison
 all-stageautofeedback-binutils: maybe-all-build-bison
 all-binutils: maybe-all-intl
-
 all-stage1-binutils: maybe-all-stage1-intl
 all-stage2-binutils: maybe-all-stage2-intl
 all-stage3-binutils: maybe-all-stage3-intl
@@ -56314,7 +56240,6 @@ all-stagefeedback-binutils: maybe-all-stagefeedback-intl
 all-stageautoprofile-binutils: maybe-all-stageautoprofile-intl
 all-stageautofeedback-binutils: maybe-all-stageautofeedback-intl
 all-binutils: maybe-all-gas
-
 all-stage1-binutils: maybe-all-stage1-gas
 all-stage2-binutils: maybe-all-stage2-gas
 all-stage3-binutils: maybe-all-stage3-gas
@@ -56329,7 +56254,6 @@ install-strip-binutils: maybe-install-strip-opcodes
 install-opcodes: maybe-install-bfd
 install-strip-opcodes: maybe-install-strip-bfd
 configure-gas: maybe-configure-intl
-
 configure-stage1-gas: maybe-configure-stage1-intl
 configure-stage2-gas: maybe-configure-stage2-intl
 configure-stage3-gas: maybe-configure-stage3-intl
@@ -56340,7 +56264,6 @@ configure-stagefeedback-gas: maybe-configure-stagefeedback-intl
 configure-stageautoprofile-gas: maybe-configure-stageautoprofile-intl
 configure-stageautofeedback-gas: maybe-configure-stageautofeedback-intl
 all-gas: maybe-all-libiberty
-
 all-stage1-gas: maybe-all-stage1-libiberty
 all-stage2-gas: maybe-all-stage2-libiberty
 all-stage3-gas: maybe-all-stage3-libiberty
@@ -56351,7 +56274,6 @@ all-stagefeedback-gas: maybe-all-stagefeedback-libiberty
 all-stageautoprofile-gas: maybe-all-stageautoprofile-libiberty
 all-stageautofeedback-gas: maybe-all-stageautofeedback-libiberty
 all-gas: maybe-all-opcodes
-
 all-stage1-gas: maybe-all-stage1-opcodes
 all-stage2-gas: maybe-all-stage2-opcodes
 all-stage3-gas: maybe-all-stage3-opcodes
@@ -56362,7 +56284,6 @@ all-stagefeedback-gas: maybe-all-stagefeedback-opcodes
 all-stageautoprofile-gas: maybe-all-stageautoprofile-opcodes
 all-stageautofeedback-gas: maybe-all-stageautofeedback-opcodes
 all-gas: maybe-all-bfd
-
 all-stage1-gas: maybe-all-stage1-bfd
 all-stage2-gas: maybe-all-stage2-bfd
 all-stage3-gas: maybe-all-stage3-bfd
@@ -56373,7 +56294,6 @@ all-stagefeedback-gas: maybe-all-stagefeedback-bfd
 all-stageautoprofile-gas: maybe-all-stageautoprofile-bfd
 all-stageautofeedback-gas: maybe-all-stageautofeedback-bfd
 all-gas: maybe-all-intl
-
 all-stage1-gas: maybe-all-stage1-intl
 all-stage2-gas: maybe-all-stage2-intl
 all-stage3-gas: maybe-all-stage3-intl
@@ -56383,14 +56303,7 @@ all-stagetrain-gas: maybe-all-stagetrain-intl
 all-stagefeedback-gas: maybe-all-stagefeedback-intl
 all-stageautoprofile-gas: maybe-all-stageautoprofile-intl
 all-stageautofeedback-gas: maybe-all-stageautofeedback-intl
-configure-gprof: maybe-configure-intl
-all-gprof: maybe-all-libiberty
-all-gprof: maybe-all-bfd
-all-gprof: maybe-all-opcodes
-all-gprof: maybe-all-intl
-all-gprof: maybe-all-gas
 configure-ld: maybe-configure-intl
-
 configure-stage1-ld: maybe-configure-stage1-intl
 configure-stage2-ld: maybe-configure-stage2-intl
 configure-stage3-ld: maybe-configure-stage3-intl
@@ -56401,7 +56314,6 @@ configure-stagefeedback-ld: maybe-configure-stagefeedback-intl
 configure-stageautoprofile-ld: maybe-configure-stageautoprofile-intl
 configure-stageautofeedback-ld: maybe-configure-stageautofeedback-intl
 all-ld: maybe-all-libiberty
-
 all-stage1-ld: maybe-all-stage1-libiberty
 all-stage2-ld: maybe-all-stage2-libiberty
 all-stage3-ld: maybe-all-stage3-libiberty
@@ -56412,7 +56324,6 @@ all-stagefeedback-ld: maybe-all-stagefeedback-libiberty
 all-stageautoprofile-ld: maybe-all-stageautoprofile-libiberty
 all-stageautofeedback-ld: maybe-all-stageautofeedback-libiberty
 all-ld: maybe-all-bfd
-
 all-stage1-ld: maybe-all-stage1-bfd
 all-stage2-ld: maybe-all-stage2-bfd
 all-stage3-ld: maybe-all-stage3-bfd
@@ -56423,7 +56334,6 @@ all-stagefeedback-ld: maybe-all-stagefeedback-bfd
 all-stageautoprofile-ld: maybe-all-stageautoprofile-bfd
 all-stageautofeedback-ld: maybe-all-stageautofeedback-bfd
 all-ld: maybe-all-opcodes
-
 all-stage1-ld: maybe-all-stage1-opcodes
 all-stage2-ld: maybe-all-stage2-opcodes
 all-stage3-ld: maybe-all-stage3-opcodes
@@ -56434,7 +56344,6 @@ all-stagefeedback-ld: maybe-all-stagefeedback-opcodes
 all-stageautoprofile-ld: maybe-all-stageautoprofile-opcodes
 all-stageautofeedback-ld: maybe-all-stageautofeedback-opcodes
 all-ld: maybe-all-build-bison
-
 all-stage1-ld: maybe-all-build-bison
 all-stage2-ld: maybe-all-build-bison
 all-stage3-ld: maybe-all-build-bison
@@ -56445,7 +56354,6 @@ all-stagefeedback-ld: maybe-all-build-bison
 all-stageautoprofile-ld: maybe-all-build-bison
 all-stageautofeedback-ld: maybe-all-build-bison
 all-ld: maybe-all-build-flex
-
 all-stage1-ld: maybe-all-build-flex
 all-stage2-ld: maybe-all-build-flex
 all-stage3-ld: maybe-all-build-flex
@@ -56456,7 +56364,6 @@ all-stagefeedback-ld: maybe-all-build-flex
 all-stageautoprofile-ld: maybe-all-build-flex
 all-stageautofeedback-ld: maybe-all-build-flex
 all-ld: maybe-all-intl
-
 all-stage1-ld: maybe-all-stage1-intl
 all-stage2-ld: maybe-all-stage2-intl
 all-stage3-ld: maybe-all-stage3-intl
@@ -56467,7 +56374,6 @@ all-stagefeedback-ld: maybe-all-stagefeedback-intl
 all-stageautoprofile-ld: maybe-all-stageautoprofile-intl
 all-stageautofeedback-ld: maybe-all-stageautofeedback-intl
 all-ld: maybe-all-gas
-
 all-stage1-ld: maybe-all-stage1-gas
 all-stage2-ld: maybe-all-stage2-gas
 all-stage3-ld: maybe-all-stage3-gas
@@ -56478,7 +56384,6 @@ all-stagefeedback-ld: maybe-all-stagefeedback-gas
 all-stageautoprofile-ld: maybe-all-stageautoprofile-gas
 all-stageautofeedback-ld: maybe-all-stageautofeedback-gas
 all-ld: maybe-all-binutils
-
 all-stage1-ld: maybe-all-stage1-binutils
 all-stage2-ld: maybe-all-stage2-binutils
 all-stage3-ld: maybe-all-stage3-binutils
@@ -56491,7 +56396,6 @@ all-stageautofeedback-ld: maybe-all-stageautofeedback-binutils
 install-ld: maybe-install-gold
 install-strip-ld: maybe-install-strip-gold
 configure-gold: maybe-configure-intl
-
 configure-stage1-gold: maybe-configure-stage1-intl
 configure-stage2-gold: maybe-configure-stage2-intl
 configure-stage3-gold: maybe-configure-stage3-intl
@@ -56502,7 +56406,6 @@ configure-stagefeedback-gold: maybe-configure-stagefeedback-intl
 configure-stageautoprofile-gold: maybe-configure-stageautoprofile-intl
 configure-stageautofeedback-gold: maybe-configure-stageautofeedback-intl
 all-gold: maybe-all-libiberty
-
 all-stage1-gold: maybe-all-stage1-libiberty
 all-stage2-gold: maybe-all-stage2-libiberty
 all-stage3-gold: maybe-all-stage3-libiberty
@@ -56513,7 +56416,6 @@ all-stagefeedback-gold: maybe-all-stagefeedback-libiberty
 all-stageautoprofile-gold: maybe-all-stageautoprofile-libiberty
 all-stageautofeedback-gold: maybe-all-stageautofeedback-libiberty
 all-gold: maybe-all-intl
-
 all-stage1-gold: maybe-all-stage1-intl
 all-stage2-gold: maybe-all-stage2-intl
 all-stage3-gold: maybe-all-stage3-intl
@@ -56524,7 +56426,6 @@ all-stagefeedback-gold: maybe-all-stagefeedback-intl
 all-stageautoprofile-gold: maybe-all-stageautoprofile-intl
 all-stageautofeedback-gold: maybe-all-stageautofeedback-intl
 all-gold: maybe-all-bfd
-
 all-stage1-gold: maybe-all-stage1-bfd
 all-stage2-gold: maybe-all-stage2-bfd
 all-stage3-gold: maybe-all-stage3-bfd
@@ -56535,7 +56436,6 @@ all-stagefeedback-gold: maybe-all-stagefeedback-bfd
 all-stageautoprofile-gold: maybe-all-stageautoprofile-bfd
 all-stageautofeedback-gold: maybe-all-stageautofeedback-bfd
 all-gold: maybe-all-build-bison
-
 all-stage1-gold: maybe-all-build-bison
 all-stage2-gold: maybe-all-build-bison
 all-stage3-gold: maybe-all-build-bison
@@ -56546,7 +56446,6 @@ all-stagefeedback-gold: maybe-all-build-bison
 all-stageautoprofile-gold: maybe-all-build-bison
 all-stageautofeedback-gold: maybe-all-build-bison
 all-gold: maybe-all-gas
-
 all-stage1-gold: maybe-all-stage1-gas
 all-stage2-gold: maybe-all-stage2-gas
 all-stage3-gold: maybe-all-stage3-gas
@@ -56557,7 +56456,6 @@ all-stagefeedback-gold: maybe-all-stagefeedback-gas
 all-stageautoprofile-gold: maybe-all-stageautoprofile-gas
 all-stageautofeedback-gold: maybe-all-stageautofeedback-gas
 check-gold: maybe-all-binutils
-
 check-stage1-gold: maybe-all-stage1-binutils
 check-stage2-gold: maybe-all-stage2-binutils
 check-stage3-gold: maybe-all-stage3-binutils
@@ -56568,7 +56466,6 @@ check-stagefeedback-gold: maybe-all-stagefeedback-binutils
 check-stageautoprofile-gold: maybe-all-stageautoprofile-binutils
 check-stageautofeedback-gold: maybe-all-stageautofeedback-binutils
 check-gold: maybe-all-gas
-
 check-stage1-gold: maybe-all-stage1-gas
 check-stage2-gold: maybe-all-stage2-gas
 check-stage3-gold: maybe-all-stage3-gas
@@ -56579,7 +56476,6 @@ check-stagefeedback-gold: maybe-all-stagefeedback-gas
 check-stageautoprofile-gold: maybe-all-stageautoprofile-gas
 check-stageautofeedback-gold: maybe-all-stageautofeedback-gas
 configure-opcodes: maybe-configure-intl
-
 configure-stage1-opcodes: maybe-configure-stage1-intl
 configure-stage2-opcodes: maybe-configure-stage2-intl
 configure-stage3-opcodes: maybe-configure-stage3-intl
@@ -56590,7 +56486,6 @@ configure-stagefeedback-opcodes: maybe-configure-stagefeedback-intl
 configure-stageautoprofile-opcodes: maybe-configure-stageautoprofile-intl
 configure-stageautofeedback-opcodes: maybe-configure-stageautofeedback-intl
 all-opcodes: maybe-all-bfd
-
 all-stage1-opcodes: maybe-all-stage1-bfd
 all-stage2-opcodes: maybe-all-stage2-bfd
 all-stage3-opcodes: maybe-all-stage3-bfd
@@ -56601,7 +56496,6 @@ all-stagefeedback-opcodes: maybe-all-stagefeedback-bfd
 all-stageautoprofile-opcodes: maybe-all-stageautoprofile-bfd
 all-stageautofeedback-opcodes: maybe-all-stageautofeedback-bfd
 all-opcodes: maybe-all-libiberty
-
 all-stage1-opcodes: maybe-all-stage1-libiberty
 all-stage2-opcodes: maybe-all-stage2-libiberty
 all-stage3-opcodes: maybe-all-stage3-libiberty
@@ -56612,7 +56506,6 @@ all-stagefeedback-opcodes: maybe-all-stagefeedback-libiberty
 all-stageautoprofile-opcodes: maybe-all-stageautoprofile-libiberty
 all-stageautofeedback-opcodes: maybe-all-stageautofeedback-libiberty
 all-opcodes: maybe-all-intl
-
 all-stage1-opcodes: maybe-all-stage1-intl
 all-stage2-opcodes: maybe-all-stage2-intl
 all-stage3-opcodes: maybe-all-stage3-intl
@@ -56637,42 +56530,27 @@ install-itcl: maybe-install-tcl
 install-strip-itcl: maybe-install-strip-tcl
 configure-tk: maybe-configure-tcl
 all-tk: maybe-all-tcl
-all-sid: maybe-all-libiberty
-all-sid: maybe-all-bfd
-all-sid: maybe-all-opcodes
 all-sid: maybe-all-tcl
 all-sid: maybe-all-tk
 install-sid: maybe-install-tcl
 install-strip-sid: maybe-install-strip-tcl
 install-sid: maybe-install-tk
 install-strip-sid: maybe-install-strip-tk
-configure-sim: maybe-configure-intl
-all-sim: maybe-all-intl
-all-sim: maybe-all-libiberty
-all-sim: maybe-all-bfd
-all-sim: maybe-all-opcodes
 all-sim: maybe-all-readline
 all-sim: maybe-configure-gdb
-all-fastjar: maybe-all-zlib
 all-fastjar: maybe-all-build-texinfo
-all-fastjar: maybe-all-libiberty
-all-bison: maybe-all-intl
 all-bison: maybe-all-build-texinfo
 all-flex: maybe-all-build-bison
-all-flex: maybe-all-intl
 all-flex: maybe-all-m4
 all-flex: maybe-all-build-texinfo
-all-m4: maybe-all-intl
 all-m4: maybe-all-build-texinfo
 configure-target-fastjar: maybe-configure-target-zlib
 all-target-fastjar: maybe-all-target-zlib
 configure-target-libgo: maybe-configure-target-libffi
-configure-target-libgo: maybe-all-target-libstdc++-v3
 all-target-libgo: maybe-all-target-libbacktrace
 all-target-libgo: maybe-all-target-libffi
 all-target-libgo: maybe-all-target-libatomic
 configure-target-libstdc++-v3: maybe-configure-target-libgomp
-
 configure-stage1-target-libstdc++-v3: maybe-configure-stage1-target-libgomp
 configure-stage2-target-libstdc++-v3: maybe-configure-stage2-target-libgomp
 configure-stage3-target-libstdc++-v3: maybe-configure-stage3-target-libgomp
@@ -56682,9 +56560,7 @@ configure-stagetrain-target-libstdc++-v3: maybe-configure-stagetrain-target-libg
 configure-stagefeedback-target-libstdc++-v3: maybe-configure-stagefeedback-target-libgomp
 configure-stageautoprofile-target-libstdc++-v3: maybe-configure-stageautoprofile-target-libgomp
 configure-stageautofeedback-target-libstdc++-v3: maybe-configure-stageautofeedback-target-libgomp
-configure-target-liboffloadmic: maybe-configure-target-libgomp
 configure-target-libsanitizer: maybe-all-target-libstdc++-v3
-
 configure-stage1-target-libsanitizer: maybe-all-stage1-target-libstdc++-v3
 configure-stage2-target-libsanitizer: maybe-all-stage2-target-libstdc++-v3
 configure-stage3-target-libsanitizer: maybe-all-stage3-target-libstdc++-v3
@@ -56695,7 +56571,6 @@ configure-stagefeedback-target-libsanitizer: maybe-all-stagefeedback-target-libs
 configure-stageautoprofile-target-libsanitizer: maybe-all-stageautoprofile-target-libstdc++-v3
 configure-stageautofeedback-target-libsanitizer: maybe-all-stageautofeedback-target-libstdc++-v3
 configure-target-libvtv: maybe-all-target-libstdc++-v3
-
 configure-stage1-target-libvtv: maybe-all-stage1-target-libstdc++-v3
 configure-stage2-target-libvtv: maybe-all-stage2-target-libstdc++-v3
 configure-stage3-target-libvtv: maybe-all-stage3-target-libstdc++-v3
@@ -56706,7 +56581,6 @@ configure-stagefeedback-target-libvtv: maybe-all-stagefeedback-target-libstdc++-
 configure-stageautoprofile-target-libvtv: maybe-all-stageautoprofile-target-libstdc++-v3
 configure-stageautofeedback-target-libvtv: maybe-all-stageautofeedback-target-libstdc++-v3
 all-target-libstdc++-v3: maybe-configure-target-libgomp
-
 all-stage1-target-libstdc++-v3: maybe-configure-stage1-target-libgomp
 all-stage2-target-libstdc++-v3: maybe-configure-stage2-target-libgomp
 all-stage3-target-libstdc++-v3: maybe-configure-stage3-target-libgomp
@@ -56716,7 +56590,6 @@ all-stagetrain-target-libstdc++-v3: maybe-configure-stagetrain-target-libgomp
 all-stagefeedback-target-libstdc++-v3: maybe-configure-stagefeedback-target-libgomp
 all-stageautoprofile-target-libstdc++-v3: maybe-configure-stageautoprofile-target-libgomp
 all-stageautofeedback-target-libstdc++-v3: maybe-configure-stageautofeedback-target-libgomp
-all-target-liboffloadmic: maybe-all-target-libgomp
 install-target-libgo: maybe-install-target-libatomic
 install-target-libgfortran: maybe-install-target-libquadmath
 install-target-libgfortran: maybe-install-target-libgcc
@@ -56731,12 +56604,62 @@ install-target-libobjc: maybe-install-target-libgcc
 install-target-libstdc++-v3: maybe-install-target-libgcc
 all-target-libgloss: maybe-all-target-newlib
 all-target-winsup: maybe-all-target-libtermcap
-configure-target-newlib: maybe-all-binutils
-configure-target-newlib: maybe-all-ld
 configure-target-libgfortran: maybe-all-target-libquadmath
 configure-target-libgfortran: maybe-all-target-libbacktrace
 
 
+@if gcc-bootstrap
+configure-gnattools: stage_last
+configure-libcc1: stage_last
+configure-utils: stage_last
+configure-gdb: stage_last
+configure-gprof: stage_last
+configure-sid: stage_last
+configure-sim: stage_last
+configure-fastjar: stage_last
+configure-bison: stage_last
+configure-flex: stage_last
+configure-m4: stage_last
+@endif gcc-bootstrap
+
+@unless gcc-bootstrap
+all-gnattools: maybe-all-target-libstdc++-v3
+configure-libcc1: maybe-configure-gcc
+all-libcc1: maybe-all-gcc
+all-utils: maybe-all-libiberty
+configure-gdb: maybe-all-intl
+configure-gdb: maybe-all-bfd
+configure-gdb: maybe-all-libiconv
+all-gdb: maybe-all-libiberty
+all-gdb: maybe-all-libiconv
+all-gdb: maybe-all-opcodes
+all-gdb: maybe-all-libdecnumber
+configure-gprof: maybe-configure-intl
+all-gprof: maybe-all-libiberty
+all-gprof: maybe-all-bfd
+all-gprof: maybe-all-opcodes
+all-gprof: maybe-all-intl
+all-gprof: maybe-all-gas
+all-sid: maybe-all-libiberty
+all-sid: maybe-all-bfd
+all-sid: maybe-all-opcodes
+configure-sim: maybe-configure-intl
+all-sim: maybe-all-intl
+all-sim: maybe-all-libiberty
+all-sim: maybe-all-bfd
+all-sim: maybe-all-opcodes
+all-fastjar: maybe-all-zlib
+all-fastjar: maybe-all-libiberty
+all-bison: maybe-all-intl
+all-flex: maybe-all-intl
+all-m4: maybe-all-intl
+configure-target-libgo: maybe-all-target-libstdc++-v3
+configure-target-liboffloadmic: maybe-configure-target-libgomp
+all-target-liboffloadmic: maybe-all-target-libgomp
+configure-target-newlib: maybe-all-binutils
+configure-target-newlib: maybe-all-ld
+@endunless gcc-bootstrap
+
 # Dependencies for target modules on other target modules are
 # described by lang_env_dependencies; the defaults apply to anything
 # not mentioned there.
diff --git a/Makefile.tpl b/Makefile.tpl
index b6077c9f125cf65784b3b584153f180b699ebdf3..447d324595fe0deb9151446f2ac8048c71333e13 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -1828,25 +1828,46 @@ configure-target-[+module+]: maybe-all-gcc[+
    (define dep-maybe (lambda ()
       (if (exist? "hard") "" "maybe-")))
 
-   ;; dep-kind returns "normal" if the dependency is on an "install" target,
-   ;; or if either module is not bootstrapped.  It returns "bootstrap" for
-   ;; configure or build dependencies between bootstrapped modules; it returns
-   ;; "prebootstrap" for configure or build dependencies of bootstrapped
-   ;; modules on a build module (e.g. all-gcc on all-build-bison).  All this
-   ;; is only necessary for host modules.
+   ;; dep-kind returns returns "prebootstrap" for configure or build
+   ;; dependencies of bootstrapped modules on a build module
+   ;; (e.g. all-gcc on all-build-bison); "normal" if the dependency is
+   ;; on an "install" target, or if the dependence module is not
+   ;; bootstrapped; otherwise, it returns "bootstrap" or
+   ;; "postbootstrap" depending on whether the dependent module is
+   ;; bootstrapped.  All this is only necessary for host and target
+   ;; modules.  It might seem like, in order to avoid build races, we
+   ;; might need more elaborate detection between prebootstrap and
+   ;; postbootstrap modules, but there are no host prebootstrap
+   ;; modules.  If there were any non-bootstrap host modules that
+   ;; bootstrap modules depended on, we'd get unsatisfied per-stage
+   ;; dependencies on them, which would be immediately noticed.
    (define dep-kind (lambda ()
-      (if (and (hash-ref boot-modules (dep-module "module"))
-	       (=* (dep-module "on") "build-"))
-	  "prebootstrap"
+      (cond
+       ((and (hash-ref boot-modules (dep-module "module"))
+	     (=* (dep-module "on") "build-"))
+	"prebootstrap")
 
-	  (if (or (= (dep-subtarget "on") "install-")
-		  (not (hash-ref boot-modules (dep-module "module")))
-		  (not (hash-ref boot-modules (dep-module "on"))))
-              "normal"
-	      "bootstrap"))))
+       ((or (= (dep-subtarget "on") "install-")
+	    (not (hash-ref boot-modules (dep-module "on"))))
+	"normal")
+
+       ((hash-ref boot-modules (dep-module "module"))
+	"bootstrap")
+
+       (1 "postbootstrap"))))
+
+   (define make-postboot-dep (lambda ()
+     (let ((target (dep-module "module")) (dep "stage_last"))
+       (unless (= (hash-ref postboot-targets target) dep)
+	 (hash-create-handle! postboot-targets target dep)
+	 ;; All non-bootstrap modules' configure target already
+	 ;; depend on dep.
+	 (unless (=* target "target-")
+           (string-append "configure-" target ": " dep "\n"))))))
 
    ;; We now build the hash table that is used by dep-kind.
    (define boot-modules (make-hash-table 113))
+   (define postboot-targets (make-hash-table 113))
 +]
 
 [+ FOR host_modules +][+
@@ -1863,18 +1884,23 @@ configure-target-[+module+]: maybe-all-gcc[+
 # to check for bootstrap/prebootstrap dependencies.  To resolve
 # prebootstrap dependencies, prebootstrap modules are gathered in
 # a hash table.
-[+ FOR dependencies +][+ (make-dep "" "") +]
-[+ CASE (dep-kind) +]
-[+ == "prebootstrap"
-     +][+ FOR bootstrap_stage +]
-[+ (make-dep (dep-stage) "") +][+
-       ENDFOR bootstrap_stage +]
-[+ == "bootstrap"
-     +][+ FOR bootstrap_stage +]
-[+ (make-dep (dep-stage) (dep-stage)) +][+
-       ENDFOR bootstrap_stage +]
-[+ ESAC +][+
-ENDFOR dependencies +]
+[+ FOR dependencies +][+ CASE (dep-kind) +]
+[+ == "prebootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +]
+[+ (make-dep (dep-stage) "") +][+ ENDFOR bootstrap_stage +]
+[+ == "bootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +]
+[+ (make-dep (dep-stage) (dep-stage)) +][+ ENDFOR bootstrap_stage +]
+[+ == "normal" +][+ (make-dep "" "") +]
+[+ ESAC +][+ ENDFOR dependencies +]
+
+@if gcc-bootstrap
+[+ FOR dependencies +][+ CASE (dep-kind) +]
+[+ == "postbootstrap" +][+ (make-postboot-dep) +][+ ESAC +][+
+ENDFOR dependencies +]@endif gcc-bootstrap
+
+@unless gcc-bootstrap
+[+ FOR dependencies +][+ CASE (dep-kind) +]
+[+ == "postbootstrap" +][+ (make-dep "" "") +]
+[+ ESAC +][+ ENDFOR dependencies +]@endunless gcc-bootstrap
 
 # Dependencies for target modules on other target modules are
 # described by lang_env_dependencies; the defaults apply to anything
diff --git a/configure b/configure
index fe8e0f63410cfaa8d7055f0cbefa5af3c5c6194f..dd9fbe4d3229095304913b7b13387314856a40dc 100755
--- a/configure
+++ b/configure
@@ -7130,7 +7130,9 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
 # extrasub-{build,host,target} not because there is any reason to split
 # the substitutions up that way, but only to remain below the limit of
 # 99 commands in a script, for HP-UX sed.
-# Do not nest @if/@endif pairs, because configure will not warn you at all.
+
+# Do not nest @if/@endif or @unless/@endunless pairs, because
+# configure will not warn you at all.
 
 case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
   yes:yes:*\ gold\ *:*,c++,*) ;;
@@ -7149,8 +7151,10 @@ for module in ${build_configdirs} ; do
   extrasub_build="$extrasub_build
 /^@if build-$module\$/d
 /^@endif build-$module\$/d
+/^@unless build-$module\$/,/^@endunless build-$module\$/d
 /^@if build-$module-$bootstrap_suffix\$/d
-/^@endif build-$module-$bootstrap_suffix\$/d"
+/^@endif build-$module-$bootstrap_suffix\$/d
+/^@unless build-$module-$bootstrap_suffix\$/,/^@endunless build-$module-$bootstrap_suffix\$/d"
 done
 extrasub_host=
 for module in ${configdirs} ; do
@@ -7169,8 +7173,10 @@ for module in ${configdirs} ; do
   extrasub_host="$extrasub_host
 /^@if $module\$/d
 /^@endif $module\$/d
+/^@unless $module\$/,/^@endunless $module\$/d
 /^@if $module-$host_bootstrap_suffix\$/d
-/^@endif $module-$host_bootstrap_suffix\$/d"
+/^@endif $module-$host_bootstrap_suffix\$/d
+/^@unless $module-$host_bootstrap_suffix\$/,/^@endunless $module-$host_bootstrap_suffix\$/d"
 done
 extrasub_target=
 for module in ${target_configdirs} ; do
@@ -7189,13 +7195,17 @@ for module in ${target_configdirs} ; do
   extrasub_target="$extrasub_target
 /^@if target-$module\$/d
 /^@endif target-$module\$/d
+/^@unless target-$module\$/,/^@endunless target-$module\$/d
 /^@if target-$module-$target_bootstrap_suffix\$/d
-/^@endif target-$module-$target_bootstrap_suffix\$/d"
+/^@endif target-$module-$target_bootstrap_suffix\$/d
+/^@unless target-$module-$target_bootstrap_suffix\$/,/^@endunless target-$module-$target_bootstrap_suffix\$/d"
 done
 
 # Do the final fixup along with target modules.
 extrasub_target="$extrasub_target
-/^@if /,/^@endif /d"
+/^@if /,/^@endif /d
+/^@unless /d
+/^@endunless /d"
 
 # Create the serialization dependencies.  This uses a temporary file.
 
diff --git a/configure.ac b/configure.ac
index 28155a0e593841be057cba149faece8996fab2a5..a0b0917dd556074b5983e8f89808482672bd63c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2719,7 +2719,9 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
 # extrasub-{build,host,target} not because there is any reason to split
 # the substitutions up that way, but only to remain below the limit of
 # 99 commands in a script, for HP-UX sed.
-# Do not nest @if/@endif pairs, because configure will not warn you at all.
+
+# Do not nest @if/@endif or @unless/@endunless pairs, because
+# configure will not warn you at all.
 
 case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
   yes:yes:*\ gold\ *:*,c++,*) ;;
@@ -2738,8 +2740,10 @@ for module in ${build_configdirs} ; do
   extrasub_build="$extrasub_build
 /^@if build-$module\$/d
 /^@endif build-$module\$/d
+/^@unless build-$module\$/,/^@endunless build-$module\$/d
 /^@if build-$module-$bootstrap_suffix\$/d
-/^@endif build-$module-$bootstrap_suffix\$/d"
+/^@endif build-$module-$bootstrap_suffix\$/d
+/^@unless build-$module-$bootstrap_suffix\$/,/^@endunless build-$module-$bootstrap_suffix\$/d"
 done
 extrasub_host=
 for module in ${configdirs} ; do
@@ -2758,8 +2762,10 @@ for module in ${configdirs} ; do
   extrasub_host="$extrasub_host
 /^@if $module\$/d
 /^@endif $module\$/d
+/^@unless $module\$/,/^@endunless $module\$/d
 /^@if $module-$host_bootstrap_suffix\$/d
-/^@endif $module-$host_bootstrap_suffix\$/d"
+/^@endif $module-$host_bootstrap_suffix\$/d
+/^@unless $module-$host_bootstrap_suffix\$/,/^@endunless $module-$host_bootstrap_suffix\$/d"
 done
 extrasub_target=
 for module in ${target_configdirs} ; do
@@ -2778,13 +2784,17 @@ for module in ${target_configdirs} ; do
   extrasub_target="$extrasub_target
 /^@if target-$module\$/d
 /^@endif target-$module\$/d
+/^@unless target-$module\$/,/^@endunless target-$module\$/d
 /^@if target-$module-$target_bootstrap_suffix\$/d
-/^@endif target-$module-$target_bootstrap_suffix\$/d"
+/^@endif target-$module-$target_bootstrap_suffix\$/d
+/^@unless target-$module-$target_bootstrap_suffix\$/,/^@endunless target-$module-$target_bootstrap_suffix\$/d"
 done
 
 # Do the final fixup along with target modules.
 extrasub_target="$extrasub_target
-/^@if /,/^@endif /d"
+/^@if /,/^@endif /d
+/^@unless /d
+/^@endunless /d"
 
 # Create the serialization dependencies.  This uses a temporary file.