diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2004-08-30 08:05:42 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2004-08-30 08:05:42 +0000 |
commit | 9cb3fa6fd242b34da6824ce77783b730ae34c353 (patch) | |
tree | 69a002c6676455883ebea818e13e36a0984ce8d7 /configure.in | |
parent | 80f57dfaa0d4ae844d30824fc87ad9e87f67530d (diff) | |
download | gdb-9cb3fa6fd242b34da6824ce77783b730ae34c353.zip gdb-9cb3fa6fd242b34da6824ce77783b730ae34c353.tar.gz gdb-9cb3fa6fd242b34da6824ce77783b730ae34c353.tar.bz2 |
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.
Sync from gcc:
2004-08-26 Phil Edwards <phil@codesourcery.com>
* configure.in: Give a better error message if GMP/MPFR are missing
and a language needing them has been requested.
* configure: Regenerated.
2004-08-25 Phil Edwards <phil@codesourcery.com>
* configure.in: Print a list of available language front-ends if
a requested one is missing. Tidy stray tab characters.
* configure: Regenerated.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 90 |
1 files changed, 67 insertions, 23 deletions
diff --git a/configure.in b/configure.in index c84dc42..080ac0d 100644 --- a/configure.in +++ b/configure.in @@ -1161,6 +1161,7 @@ if test -d ${srcdir}/gcc; then new_enable_languages=c missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` + potential_languages=c for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do case ${lang_frag} in @@ -1176,14 +1177,15 @@ if test -d ${srcdir}/gcc; then lang_dirs= boot_language= build_by_default= - need_gmp= + need_gmp= . ${lang_frag} + potential_languages="${potential_languages},${language}" # This is quite sensitive to the ordering of the case statement arms. case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in *::*:*) echo "${lang_frag} doesn't set \$language." 1>&2 exit 1 - ;; + ;; *:ada:no:*) # Ada was requested with no preexisting GNAT. Disable unconditionally. add_this_lang=no @@ -1194,9 +1196,9 @@ if test -d ${srcdir}/gcc; then ;; *,all,*:*:*:no) # 'all' was selected, but this is not a default language - # so do not include it. + # so do not include it. add_this_lang=no - ;; + ;; *,all,*:*:*:*) # 'all' was selected and this is a default language; include it. add_this_lang=yes @@ -1206,10 +1208,17 @@ if test -d ${srcdir}/gcc; then ;; esac - # Disable language that need GMP if it isn't available. - if test x"$need_gmp" = xyes && test x"$have_gmp" = xno; then - add_this_lang=no - fi + # Disable languages that need GMP if it isn't available. + case ,${enable_languages},:${have_gmp}:${need_gmp} in + *,${language},*:no:yes) + # Specifically requested language; tell them. + AC_MSG_ERROR([GMP with MPFR support is required to build $language]) + ;; + *:no:yes) + # Silently disable. + add_this_lang=no + ;; + esac case $add_this_lang in no) @@ -1234,7 +1243,8 @@ if test -d ${srcdir}/gcc; then missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"` if test "x$missing_languages" != x; then AC_MSG_ERROR([ -The following requested languages were not found: ${missing_languages}]) +The following requested languages were not found: ${missing_languages} +The available languages are: ${potential_languages}]) fi if test "x$new_enable_languages" != "x$enable_languages"; then @@ -1685,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 @@ -2230,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], |