aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2004-08-30 08:02:34 +0000
committerPaolo Bonzini <bonzini@gcc.gnu.org>2004-08-30 08:02:34 +0000
commitce521a9c85bfb120a9904293897a256e83477eca (patch)
tree9ce7fd6fd94fdc65bcbf337852b6d557c2381718 /configure.in
parentafa396ff844ccc8a377adf637307535ca60a1abe (diff)
downloadgcc-ce521a9c85bfb120a9904293897a256e83477eca.zip
gcc-ce521a9c85bfb120a9904293897a256e83477eca.tar.gz
gcc-ce521a9c85bfb120a9904293897a256e83477eca.tar.bz2
Makefile.def (bootstrap stages): Add 'lean' parameter.
2004-08-26 Paolo Bonzini <bonzini@gnu.org> * Makefile.def (bootstrap stages): Add 'lean' parameter. * Makefile.tpl (configure-stageN-*, all-stageN-*): Turned into phony targets; do not generate timestamp files. (distclean-stageN): Remove references to their timestamp files. (restageN, touch-stageN): Remove. (stageN-bubble): Rewritten. (compare): Support lean bootstraps. * Makefile.in: Regenerate. * configure.in: Only warn when bootstrapping but build != host or build != target. Support lean bootstraps. * configure: Regenerate. From-SVN: r86754
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in62
1 files changed, 48 insertions, 14 deletions
diff --git a/configure.in b/configure.in
index b6c046b..080ac0d 100644
--- a/configure.in
+++ b/configure.in
@@ -1695,28 +1695,62 @@ esac
# not to nest @if/@endif pairs, because configure will not warn you at all.
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
+[ --enable-bootstrap[=lean] Enable bootstrapping [no]],,
+enable_bootstrap=default)
+# Issue errors and warnings for invalid/strange bootstrap combinations.
+case "$configdirs" in
+ *gcc*) have_compiler=yes ;;
+ *) have_compiler=no ;;
+esac
+
+case "$have_compiler:$host:$target:$enable_bootstrap" in
+ *:*:*:no) ;;
+
+ # Default behavior. (We'll) enable bootstrap if we have a compiler
+ # and we are in a native configuration.
+ yes:$build:$build:default)
+ # This will become 'yes'
+ enable_bootstrap=no ;;
+
+ *:*:*:default)
+ enable_bootstrap=no ;;
+
+ # We have a compiler and we are in a native configuration, bootstrap is ok
+ yes:$build:$build:yes | yes:$build:$build:lean)
+ ;;
+
+ # Other configurations, but we have a compiler. Assume the user knows
+ # what he's doing.
+ yes:*:*:yes | yes:*:*:lean)
+ AC_MSG_WARN([trying to bootstrap a cross compiler])
+ ;;
+
+ # No compiler: if they passed --enable-bootstrap explicitly, fail
+ no:*:*:yes | no:*:*:lean)
+ AC_MSG_ERROR([cannot bootstrap without a compiler]) ;;
+
+ # Fail if wrong command line
+ *)
+ AC_MSG_ERROR([invalid option for --enable-bootstrap])
+ ;;
+esac
+
+# Adjust the toplevel makefile according to whether bootstrap was selected.
case "$enable_bootstrap" in
yes)
+ bootstrap_lean='#'
+ default_target=bootstrap
+ bootstrap_suffix=bootstrap ;;
+ lean)
+ bootstrap_lean=''
default_target=bootstrap
bootstrap_suffix=bootstrap ;;
no)
default_target=all
bootstrap_suffix=no-bootstrap ;;
esac
+AC_SUBST(bootstrap_lean)
AC_SUBST(default_target)
for module in ${build_configdirs} ; do
@@ -2240,7 +2274,7 @@ esac
AC_SUBST(stage1_cflags)
# It makes debugging easier if we create as symlinks the stage directories
-# gcc for stageN-gcc and stage-prev for stage(N-1). In case this is not
+# gcc for stageN-gcc and stagePREV-gcc for stage(N-1). In case this is not
# possible, however, we can resort to mv.
AC_CACHE_CHECK([if symbolic links between directories work],
[gcc_cv_prog_ln_s_dir],