X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=configure;h=60a82b6cb64d6a27ba40ce470f5ea2fede5a80c0;hp=022368379820129b0f2c914d0007568a6f21b992;hb=d68451393afcbe8f25b843d0dd8d30a5d9ea78d6;hpb=16de6a81f2fdae928c7358b497f16fb5610d8f54 diff --git a/configure b/configure index 02236837982..60a82b6cb64 100755 --- a/configure +++ b/configure @@ -656,6 +656,7 @@ CC_FOR_BUILD AS_FOR_BUILD AR_FOR_BUILD target_configargs +target_configdirs configdirs host_configargs build_configdirs @@ -3260,6 +3261,7 @@ case "${target}" in case "${target}" in i*86-*-*) ;; alpha*-*-*) ;; + x86_64-*-*) ;; *) noconfigdirs="$noconfigdirs ${libgcj}" ;; @@ -3308,7 +3310,7 @@ case "${target}" in noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss" ;; alpha*-*-*vms*) - noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}" + noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" ;; alpha*-*-linux*) # newlib is not 64 bit ready @@ -3701,6 +3703,9 @@ case "${target}" in ;; sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*) ;; + tic6x-*-*) + noconfigdirs="$noconfigdirs gdb sim ${libgcj}" + ;; v810-*-*) noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}" ;; @@ -5284,6 +5289,36 @@ else fi +# Used for setting $lt_cv_objdir +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if test "${lt_cv_objdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + # Check for GMP, MPFR and MPC gmplibs="-lmpc -lmpfr -lgmp" gmpinc= @@ -5321,7 +5356,7 @@ if test "x$with_mpc_lib" != x; then gmplibs="-L$with_mpc_lib $gmplibs" fi if test "x$with_mpc$with_mpc_include$with_mpc_lib" = x && test -d ${srcdir}/mpc; then - gmplibs='-L$$r/$(HOST_SUBDIR)/mpc/src/.libs -L$$r/$(HOST_SUBDIR)/mpc/src/_libs '"$gmplibs" + gmplibs='-L$$r/$(HOST_SUBDIR)/mpc/src/'"$lt_cv_objdir $gmplibs" gmpinc='-I$$s/mpc/src '"$gmpinc" # Do not test the mpc version. Assume that it is sufficient, since # it is in the source tree, and the library has not been built yet @@ -5370,9 +5405,9 @@ if test "x$with_mpfr_lib" != x; then gmplibs="-L$with_mpfr_lib $gmplibs" fi if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then - gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/.libs -L$$r/$(HOST_SUBDIR)/mpfr/_libs '"$gmplibs" + gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs" gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc" - extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr' + extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir" # Do not test the mpfr version. Assume that it is sufficient, since # it is in the source tree, and the library has not been built yet # but it would be included on the link line in the version check below @@ -5420,10 +5455,10 @@ if test "x$with_gmp_lib" != x; then gmplibs="-L$with_gmp_lib $gmplibs" fi if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then - gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/gmp/_libs '"$gmplibs" + gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir $gmplibs" gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc" extra_mpfr_configure_flags='--with-gmp-build=$$r/$(HOST_SUBDIR)/gmp' - extra_mpc_gmp_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp' + extra_mpc_gmp_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" # Do not test the gmp version. Assume that it is sufficient, since # it is in the source tree, and the library has not been built yet # but it would be included on the link line in the version check below @@ -5435,9 +5470,9 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then have_gmp=yes saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $gmpinc" - # Check GMP actually works - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct version of gmp.h" >&5 -$as_echo_n "checking for correct version of gmp.h... " >&6; } + # Check for the recommended and required versions of GMP. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of gmp.h" >&5 +$as_echo_n "checking for the correct version of gmp.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5446,7 +5481,27 @@ int main () { - #if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 2) + #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) + #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL) + #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,0) + choke me + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) + #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL) + #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,3,2) choke me #endif @@ -5458,6 +5513,11 @@ if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5 +$as_echo "buggy but acceptable" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; have_gmp=no fi @@ -5465,8 +5525,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # If we have GMP, check the MPFR version. if test x"$have_gmp" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct version of mpfr.h" >&5 -$as_echo_n "checking for correct version of mpfr.h... " >&6; } + # Check for the recommended and required versions of MPFR. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of mpfr.h" >&5 +$as_echo_n "checking for the correct version of mpfr.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -5492,7 +5553,7 @@ int main () { - #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,2) + #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,2) choke me #endif @@ -5517,6 +5578,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Check for the MPC header version. if test x"$have_gmp" = xyes ; then + # Check for the recommended and required versions of MPC. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of mpc.h" >&5 $as_echo_n "checking for the correct version of mpc.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5526,7 +5588,23 @@ int main () { - #if MPC_VERSION < MPC_VERSION_NUM (0,8,0) + #if MPC_VERSION < MPC_VERSION_NUM(0,8,0) + choke me + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + #if MPC_VERSION < MPC_VERSION_NUM(0,8,1) choke me #endif @@ -5538,6 +5616,11 @@ if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5 +$as_echo "buggy but acceptable" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; have_gmp=no fi @@ -5593,8 +5676,10 @@ rm -f core conftest.err conftest.$ac_objext \ CFLAGS="$saved_CFLAGS" +# The library versions listed in the error message below should match +# the HARD-minimums enforced above. if test x$have_gmp != xyes; then - as_fn_error "Building GCC requires GMP 4.2+, MPFR 2.3.2+ and MPC 0.8.0+. + as_fn_error "Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+. Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations. Source code for these libraries can be found at their respective hosting sites as well as at @@ -5737,7 +5822,7 @@ if test "x$with_ppl_lib" != x; then ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx" fi if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then - ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/.libs -L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/_libs -L$$r/$(HOST_SUBDIR)/ppl/src/.libs -L$$r/$(HOST_SUBDIR)/ppl/src/_libs -lppl_c -lppl -lgmpxx ' + ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir"' -lppl_c -lppl -lgmpxx ' pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C ' enable_ppl_version_check=no fi @@ -5832,7 +5917,7 @@ if test "x$with_cloog_lib" != x; then clooglibs="-L$with_cloog_lib -lcloog" fi if test "x$with_cloog$with_cloog_include$with_cloog_lib" = x && test -d ${srcdir}/cloog; then - clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/.libs -L$$r/$(HOST_SUBDIR)/cloog/_libs -lcloog ' + clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/'"$lt_cv_objdir"' -lcloog ' clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -DCLOOG_PPL_BACKEND ' enable_cloog_version_check=no fi @@ -5866,9 +5951,30 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "cloog/cloog.h" +int +main () +{ + + #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 9 + choke me + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5 +$as_echo "buggy but acceptable" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; clooglibs= ; clooginc= fi @@ -5889,6 +5995,35 @@ else fi + + + +target_elf=no +case $target in + *-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \ + *-msdosdjgpp* | *-netware* | *-vms* | *-wince* | *-*-pe* | \ + alpha*-dec-osf* | *-interix* | hppa[12]*-*-hpux*) + target_elf=no + ;; + *) + target_elf=yes + ;; +esac + +if test $target_elf = yes; then : + +else + if test x"$default_enable_lto" = x"yes" ; then + enable_lto=no +else + if test x"$enable_lto" = x"yes"; then + as_fn_error "LTO support requires an ELF target." "$LINENO" 5 + fi +fi +default_enable_lto=no +fi + + if test x"$enable_lto" = x"yes" ; then # Make sure that libelf.h and gelf.h are available. @@ -6439,7 +6574,6 @@ main () elf_nextscn (0, 0); elf_strptr (0, 0, 0); elf_getident (0, 0); - elf_getshdrstrndx (0, 0); elf_begin (0, 0, 0); elf_ndxscn (0); elf_end (0); @@ -6459,6 +6593,61 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + # Check for elf_getshdrstrndx or elf_getshstrndx. The latter's flavor + # is determined in gcc/configure.ac. + if test x"$enable_lto" = x"yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_getshdrstrndx" >&5 +$as_echo_n "checking for elf_getshdrstrndx... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + elf_getshdrstrndx (0, 0); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; }; +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_getshstrndx" >&5 +$as_echo_n "checking for elf_getshstrndx... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + elf_getshstrndx (0, 0); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; }; +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; enable_lto=no; libelflibs= ; libelfinc= + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + # If we couldn't enable LTO and the user forced it, emit an error. if test x"$enable_lto" = x"no" \ && test x"$default_enable_lto" != x"yes" ; then @@ -7181,8 +7370,8 @@ case "${target}" in extra_arflags_for_target=" -X32_64" extra_nmflags_for_target=" -B -X32_64" ;; - *-*-darwin*) - # ranlib from Darwin requires the -c flag to look at common symbols. + *-*-darwin[3-9]*) + # ranlib before Darwin10 requires the -c flag to look at common symbols. extra_ranlibflags_for_target=" -c" ;; mips*-*-pe | sh*-*-pe | *arm-wince-pe) @@ -7333,6 +7522,11 @@ fi target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'` +# If we are building libgomp, bootstrap it. +if echo " ${target_configdirs} " | grep " libgomp " > /dev/null 2>&1 ; then + bootstrap_target_libs=${bootstrap_target_libs}target-libgomp, +fi + # Determine whether gdb needs tk/tcl or not. # Use 'maybe' since enable_gdbtk might be true even if tk isn't available # and in that case we want gdb to be built without tk. Ugh! @@ -7889,6 +8083,7 @@ done + # Target module lists & subconfigure args. @@ -9298,7 +9493,7 @@ fi done if test -z "$ac_cv_prog_RANLIB" ; then - RANLIB=":" + RANLIB="true" fi @@ -9434,7 +9629,7 @@ fi done if test -z "$ac_cv_prog_STRIP" ; then - STRIP=":" + STRIP="true" fi