diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2006-12-29 17:09:59 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2006-12-29 17:09:59 +0000 |
commit | 9b134994af00aa5ea49f4af20b3f35f2d935c2a8 (patch) | |
tree | 7d96b51f14b3b42cfefc7f7e26cda3d001c1c775 /configure.in | |
parent | cab8ac940abc1c0a2e9d8aaf978e6da54f582bdc (diff) | |
download | gdb-9b134994af00aa5ea49f4af20b3f35f2d935c2a8.zip gdb-9b134994af00aa5ea49f4af20b3f35f2d935c2a8.tar.gz gdb-9b134994af00aa5ea49f4af20b3f35f2d935c2a8.tar.bz2 |
2006-12-29 Paolo Bonzini <bonzini@gnu.org>
Sync with gcc:
2006-12-29 Paolo Bonzini <bonzini@gnu.org>
* configure.in: Reorganize recognition of languages. Add
--enable-stage1-languages. Show supported languages for the chosen
target rather than all recognized languages.
* configure: Regenerate.
2006-12-29 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl (GCC_STRAP_TARGETS, all-prebootstrap): Remove.
* Makefile.in: Regenerate.
2006-12-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in: Warn that MPFR 2.2.0 is buggy.
* configure: Regenerate.
config:
2006-12-29 Paolo Bonzini <bonzini@gnu.org>
* acx.m4: Sync with gcc.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 127 |
1 files changed, 90 insertions, 37 deletions
diff --git a/configure.in b/configure.in index d307bcf..6cae156 100644 --- a/configure.in +++ b/configure.in @@ -1117,14 +1117,22 @@ choke me if test x"$have_gmp" = xyes; then saved_LIBS="$LIBS" LIBS="$LIBS $gmplibs" + dnl MPFR 2.2.0 is acceptable but buggy, MPFR 2.2.1 is better. AC_MSG_CHECKING([for correct version of mpfr.h]) AC_TRY_LINK([#include <gmp.h> #include <mpfr.h>],[ -#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2) +#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,0) choke me #endif mpfr_t n; mpfr_init(n); -], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no]) +], [AC_TRY_LINK([#include <gmp.h> +#include <mpfr.h>],[ +#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1) + choke me +#endif + mpfr_t n; mpfr_init(n); +], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])], + [AC_MSG_RESULT([no]); have_gmp=no]) LIBS="$saved_LIBS" fi CFLAGS="$saved_CFLAGS" @@ -1145,8 +1153,7 @@ AC_SUBST(gmplibs) AC_SUBST(gmpinc) # By default, C is the only stage 1 language. -stage1_languages=c -AC_SUBST(stage1_languages) +stage1_languages=,c, # Figure out what language subdirectories are present. # Look if the user specified --enable-languages="..."; if not, use @@ -1208,9 +1215,9 @@ if test -d ${srcdir}/gcc; then esac done - new_enable_languages=c + new_enable_languages=,c, missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` - potential_languages=c + potential_languages=,c, for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do case ${lang_frag} in @@ -1225,32 +1232,22 @@ if test -d ${srcdir}/gcc; then target_libs= lang_dirs= subdir_requires= - boot_language= - build_by_default= + boot_language=no + build_by_default=yes . ${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 - ;; - *,${language},*:*:*:*) + if test x${language} = x; then + echo "${lang_frag} doesn't set \$language." 1>&2 + exit 1 + fi + + case ,${enable_languages}, in + *,${language},*) # Language was explicitly selected; include it. add_this_lang=yes ;; - *,all,*:*:*:no) - # 'all' was selected, but this is not a default language - # 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 + *,all,*) + # 'all' was selected, select it if it is a default language + add_this_lang=${build_by_default} ;; *) add_this_lang=no @@ -1267,30 +1264,48 @@ if test -d ${srcdir}/gcc; then ;; *) # Silently disable. - add_this_lang=no + add_this_lang=unsupported ;; esac done + # Disable Ada if no preexisting GNAT is available. + case ,${enable_languages},:${language}:${have_gnat} in + *,${language},*:ada:no) + # Specifically requested language; tell them. + AC_MSG_ERROR([GNAT is required to build $language]) + ;; + *:ada:no) + # Silently disable. + add_this_lang=unsupported + ;; + esac + # Disable a language that is unsupported by the target. case " $unsupported_languages " in *" $language "*) - add_this_lang=no + add_this_lang=unsupported ;; esac case $add_this_lang in - no) + unsupported) # Remove language-dependent dirs. eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\" ;; - *) - new_enable_languages="$new_enable_languages,$language" + no) + # Remove language-dependent dirs; still show language as supported. + eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\" + potential_languages="${potential_languages}${language}," + ;; + yes) + new_enable_languages="${new_enable_languages}${language}," + potential_languages="${potential_languages}${language}," missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"` case ${boot_language} in yes) # Add to (comma-separated) list of stage 1 languages. - stage1_languages="${stage1_languages},${language}" + stage1_languages="${stage1_languages}${language}," ;; esac ;; @@ -1299,17 +1314,55 @@ if test -d ${srcdir}/gcc; then esac done + AC_ARG_ENABLE(stage1-languages, +[ --enable-stage1-languages[=all] choose additional languages to build during + stage1. Mostly useful for compiler development.], + [case ,${enable_stage1_languages}, in + ,no,|,,) + # Set it to something that will have no effect in the loop below + enable_stage1_languages=c ;; + ,yes,) + enable_stage1_languages=`echo $new_enable_languages | \ + sed -e "s/^,//" -e "s/,$//" ` ;; + *,all,*) + enable_stage1_languages=`echo ,$enable_stage1_languages, | \ + sed -e "s/,all,/$new_enable_languages/" -e "s/^,//" -e "s/,$//" ` ;; + esac + + # Add "good" languages from enable_stage1_languages to stage1_languages, + # while "bad" languages go in missing_languages. Leave no duplicates. + for i in `echo $enable_stage1_languages | sed 's/,/ /g' `; do + case $potential_languages in + *,$i,*) + case $stage1_languages in + *,$i,*) ;; + *) stage1_languages="$stage1_languages$i," ;; + esac ;; + *) + case $missing_languages in + *,$i,*) ;; + *) missing_languages="$missing_languages$i," ;; + esac ;; + esac + done]) + + # Remove leading/trailing commas that were added for simplicity + potential_languages=`echo "$potential_languages" | sed -e "s/^,//" -e "s/,$//"` missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"` + stage1_languages=`echo "$stage1_languages" | sed -e "s/^,//" -e "s/,$//"` + new_enable_languages=`echo "$new_enable_languages" | sed -e "s/^,//" -e "s/,$//"` + if test "x$missing_languages" != x; then AC_MSG_ERROR([ The following requested languages could not be built: ${missing_languages} -Recognised languages are: ${potential_languages}]) +Supported languages are: ${potential_languages}]) fi - if test "x$new_enable_languages" != "x$enable_languages"; then echo The following languages will be built: ${new_enable_languages} + enable_languages="$new_enable_languages" fi - enable_languages="$new_enable_languages" + + AC_SUBST(stage1_languages) ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[[^ ]]*//' -e 's/$/ --enable-languages='"$enable_languages"/ ` fi |