diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-30 08:02:34 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-30 08:02:34 +0000 |
commit | 3c7825844aa985429774a0d9e0f4d10bece86b79 (patch) | |
tree | 9ce7fd6fd94fdc65bcbf337852b6d557c2381718 /configure.in | |
parent | 089492e0cfd5af3c52bbe7c9bea30ffe6d52405e (diff) | |
download | gcc-3c7825844aa985429774a0d9e0f4d10bece86b79.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86754 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 62 |
1 files changed, 48 insertions, 14 deletions
diff --git a/configure.in b/configure.in index b6c046b3ade..080ac0d2a0f 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], |