diff --git a/ChangeLog b/ChangeLog
index 9c9b68f76cd3778b533824ed5fd9edb63c670580..69f1c0459879f2feda94fb0ec3cf8be6bae7a108 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-05  Paolo Bonzini  <bonzini@gnu.org>
+
+	* Makefile.tpl (all) [gcc-no-bootstrap]: Make prebootstrap packages
+	before other host packages.
+
 2005-10-05  Kaz Kojima  <kkojima@gcc.gnu.org>
 
 	* MAINTAINERS: Add self as sh libraries/configury maintainer.
diff --git a/Makefile.in b/Makefile.in
index 98c0ca98ca4fa6808c168d612ad793ceabb4f504..a99eff47cd496f33106eafbe7ecec3a4bb1d97ce 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -856,6 +856,11 @@ all:
 	fi
 @endif gcc-bootstrap
 	@$(unstage)
+@if gcc-no-bootstrap
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-prebootstrap
+@endif gcc-no-bootstrap
 	@r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	if [ -f stage_last ]; then \
diff --git a/Makefile.tpl b/Makefile.tpl
index 889552d6e95ecf6ca3d8d428444a3c0fddb69762..8c19bbfaab502be3b6aa402b8c406f6c7668f98d 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -709,6 +709,11 @@ all:
 	fi
 @endif gcc-bootstrap
 	@$(unstage)
+@if gcc-no-bootstrap
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-prebootstrap
+@endif gcc-no-bootstrap
 	@r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	if [ -f stage_last ]; then \