summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2004-06-01 07:42:22 +0000
committerPaolo Bonzini <bonzini@gnu.org>2004-06-01 07:42:22 +0000
commitf980e2d3459b86917d2647453a6da485d679761b (patch)
tree9bb83dc4e791811d68a37a93271e994c05a0347b /configure.in
parentd810ab12bf34d56daccf987cb8eb5873207f4c97 (diff)
downloadgdb-f980e2d3459b86917d2647453a6da485d679761b.tar.gz
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.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 3d7538459c1..bb6e8d7b2d1 100644
--- a/configure.in
+++ b/configure.in
@@ -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"