X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=configure;h=1f58ba30b00ba7a16b3634c5e030aa8f41dfd49f;hp=db105a549b23a9900a031c02a25ba492664b2536;hb=abb1d0886d8dbbe9df6680e83061d3a9f20a5699;hpb=3a8cd7be492fb98cb25b6a7b09585dc1b05f4cff diff --git a/configure b/configure index db105a549b2..1f58ba30b00 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 @@ -683,8 +684,8 @@ clooginc clooglibs pplinc ppllibs -poststage1_libs poststage1_ldflags +poststage1_libs stage1_libs stage1_ldflags extra_mpc_mpfr_configure_flags @@ -796,8 +797,8 @@ with_gmp_lib with_host_libstdcxx with_stage1_ldflags with_stage1_libs -with_boot_ldflags with_boot_libs +with_boot_ldflags with_ppl with_ppl_include with_ppl_lib @@ -1531,8 +1532,8 @@ Optional Packages: when linking with PPL --with-stage1-ldflags=FLAGS Linker flags for stage1 -with-stage1-libs=LIBS Libraries for stage1 - --with-boot-ldflags=FLAGS Linker flags for stage2 and later --with-boot-libs=LIBS Libraries for stage2 and later + --with-boot-ldflags=FLAGS Linker flags for stage2 and later --with-ppl=PATH Specify prefix directory for the installed PPL package Equivalent to --with-ppl-include=PATH/include plus --with-ppl-lib=PATH/lib @@ -2893,7 +2894,7 @@ build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fix # these libraries are used by various programs built for the host environment # -host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr mpc ppl cloog libiconv" +host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr mpc ppl cloog libelf libiconv" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to @@ -3260,6 +3261,7 @@ case "${target}" in case "${target}" in i*86-*-*) ;; alpha*-*-*) ;; + x86_64-*-*) ;; *) noconfigdirs="$noconfigdirs ${libgcj}" ;; @@ -3509,12 +3511,14 @@ case "${target}" in # if the --with-newlib option has been given, because otherwise # 'target-newlib' will appear in skipdirs. ;; - i[3456789]86-*-mingw32*) + i[3456789]86-w64-mingw*) + noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}" + ;; + i[3456789]86-*-mingw*) target_configdirs="$target_configdirs target-winsup" noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}" ;; x86_64-*-mingw*) - target_configdirs="$target_configdirs target-winsup" noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}" ;; *-*-cygwin*) @@ -3855,7 +3859,7 @@ case "${host}" in { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if cat works as expected" >&5 $as_echo_n "checking to see if cat works as expected... " >&6; } echo a >cygwin-cat-check -if test `cat cygwin-cat-check` == a ; then +if test `cat cygwin-cat-check` = a ; then rm cygwin-cat-check { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -5282,13 +5286,40 @@ 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="-lmpfr -lgmp" +gmplibs="-lmpc -lmpfr -lgmp" gmpinc= have_gmp=no -mpclibs=-lmpc -mpcinc= -have_mpc=no # Specify a location for mpc # check for this first so it ends up on the link line before mpfr. @@ -5312,23 +5343,23 @@ fi if test "x$with_mpc" != x; then - mpclibs="-L$with_mpc/lib -lmpc" - mpcinc="-I$with_mpc/include $mpcinc" + gmplibs="-L$with_mpc/lib $gmplibs" + gmpinc="-I$with_mpc/include $gmpinc" fi if test "x$with_mpc_include" != x; then - mpcinc="-I$with_mpc_include $mpcinc" + gmpinc="-I$with_mpc_include $gmpinc" fi if test "x$with_mpc_lib" != x; then - mpclibs="-L$with_mpc_lib -lmpc" + gmplibs="-L$with_mpc_lib $gmplibs" fi if test "x$with_mpc$with_mpc_include$with_mpc_lib" = x && test -d ${srcdir}/mpc; then - mpclibs='-L$$r/$(HOST_SUBDIR)/mpc/src/.libs -L$$r/$(HOST_SUBDIR)/mpc/src/_libs -lmpc' - mpcinc='-I$$s/mpc/src '"$mpcinc" + 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 # but it would be included on the link line in the version check below # hence making the test fail. - have_mpc=yes + have_gmp=yes fi # Specify a location for mpfr @@ -5362,18 +5393,18 @@ fi if test "x$with_mpfr" != x; then gmplibs="-L$with_mpfr/lib $gmplibs" - gmpinc="-I$with_mpfr/include" + gmpinc="-I$with_mpfr/include $gmpinc" fi if test "x$with_mpfr_include" != x; then - gmpinc="-I$with_mpfr_include" + gmpinc="-I$with_mpfr_include $gmpinc" fi 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 @@ -5421,10 +5452,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 @@ -5436,18 +5467,38 @@ 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. */ +#include "gmp.h" +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,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 "gmp.h" +#include 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,3,2) choke me #endif @@ -5459,6 +5510,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 @@ -5466,8 +5522,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 @@ -5493,7 +5550,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,8 +5574,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # Check for the MPC header version. - if test x"$have_mpc" != xyes ; then - CFLAGS="$CFLAGS $mpcinc" + 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 @@ -5528,7 +5585,23 @@ int main () { - #if MPC_VERSION < MPC_VERSION_NUM (0,7,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,10 +5611,15 @@ main () _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; have_mpc=maybe +$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_mpc=no; mpclibs= ; mpcinc= +$as_echo "no" >&6; }; have_gmp=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -5550,24 +5628,32 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x"$have_gmp" = xyes; then saved_LIBS="$LIBS" LIBS="$LIBS $gmplibs" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of the gmp/mpfr libraries" >&5 -$as_echo_n "checking for the correct version of the gmp/mpfr libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of the gmp/mpfr/mpc libraries" >&5 +$as_echo_n "checking for the correct version of the gmp/mpfr/mpc libraries... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include +#include int main () { mpfr_t n; mpfr_t x; + mpc_t c; int t; mpfr_init (n); mpfr_init (x); mpfr_atan2 (n, n, x, GMP_RNDN); mpfr_erfc (n, x, GMP_RNDN); mpfr_subnormalize (x, t, GMP_RNDN); + mpfr_clear(n); + mpfr_clear(x); + mpc_init2 (c, 53); + mpc_set_ui_ui (c, 1, 1, MPC_RNDNN); + mpc_cosh (c, c, MPC_RNDNN); + mpc_pow (c, c, c, MPC_RNDNN); + mpc_acosh (c, c, MPC_RNDNN); + mpc_clear (c); ; return 0; @@ -5585,74 +5671,23 @@ rm -f core conftest.err conftest.$ac_objext \ LIBS="$saved_LIBS" fi - if test x"$have_mpc" = xmaybe; then - saved_LIBS="$LIBS" - LIBS="$LIBS $mpclibs $gmplibs" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of the mpc library" >&5 -$as_echo_n "checking for the correct version of the mpc library... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - mpc_t n; - mpc_init2 (n, 53); - mpc_set_ui_ui (n, 1, 1, MPC_RNDNN); - mpc_sin (n, n, MPC_RNDNN); - mpc_cos (n, n, MPC_RNDNN); - mpc_tan (n, n, MPC_RNDNN); - mpc_sinh (n, n, MPC_RNDNN); - mpc_cosh (n, n, MPC_RNDNN); - mpc_tanh (n, n, MPC_RNDNN); - mpc_exp (n, n, MPC_RNDNN); - mpc_log (n, n, MPC_RNDNN); - mpc_sqrt (n, n, MPC_RNDNN); - mpc_proj (n, n, MPC_RNDNN); - mpc_neg (n, n, MPC_RNDNN); - mpc_sqr (n, n, MPC_RNDNN); - mpc_pow (n, n, n, MPC_RNDNN); - mpc_clear (n); - - ; - 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; }; have_mpc=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; have_mpc=no; mpclibs= ; mpcinc= -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$saved_LIBS" - fi - 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+ and MPFR 2.3.2+. -Try the --with-gmp and/or --with-mpfr options to specify their locations. -Copies of these libraries' source code can be found at their respective -hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/. -See also http://gcc.gnu.org/install/prerequisites.html for additional info. -If you obtained GMP and/or MPFR from a vendor distribution package, make -sure that you have installed both the libraries and the header files. -They may be located in separate packages." "$LINENO" 5 + 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 +ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also +http://gcc.gnu.org/install/prerequisites.html for additional info. If +you obtained GMP, MPFR and/or MPC from a vendor distribution package, +make sure that you have installed both the libraries and the header +files. They may be located in separate packages." "$LINENO" 5 fi fi -if test x$have_mpc != xyes ; then - mpcinc= - mpclibs= -fi - -gmpinc="$mpcinc $gmpinc" -gmplibs="$mpclibs $gmplibs" - # Flags needed for both GMP, MPFR and/or MPC. @@ -5704,25 +5739,6 @@ fi -# Linker flags to use for stage2 and later builds. - -# Check whether --with-boot-ldflags was given. -if test "${with_boot_ldflags+set}" = set; then : - withval=$with_boot_ldflags; if test "$withval" = "no" -o "$withval" = "yes"; then - poststage1_ldflags= - else - poststage1_ldflags=$withval - fi -else - if test "$ENABLE_BUILD_WITH_CXX" = "yes"; then - poststage1_ldflags=-static-libstdc++ - else - poststage1_ldflags= - fi -fi - - - # Libraries to use for stage2 and later builds. This defaults to the # argument passed to --with-host-libstdcxx. @@ -5739,6 +5755,27 @@ fi +# Linker flags to use for stage2 and later builds. + +# Check whether --with-boot-ldflags was given. +if test "${with_boot_ldflags+set}" = set; then : + withval=$with_boot_ldflags; if test "$withval" = "no" -o "$withval" = "yes"; then + poststage1_ldflags= + else + poststage1_ldflags=$withval + fi +else + poststage1_ldflags= + # With --enable-build-with-cxx, default to linking libstdc++ and + # libgcc statically. But if the user explicitly specified the + # libraries to use, trust that they are doing what they want. + if test "$ENABLE_BUILD_WITH_CXX" = "yes" -a "$poststage1_libs" = ""; then + poststage1_ldflags="-static-libstdc++ -static-libgcc" + fi +fi + + + # Check for PPL ppl_major_version=0 ppl_minor_version=10 @@ -5749,8 +5786,6 @@ pplinc= # Check whether --with-ppl was given. if test "${with_ppl+set}" = set; then : withval=$with_ppl; -else - with_ppl=yes fi @@ -5770,7 +5805,7 @@ case $with_ppl in no) ppllibs= ;; - yes) + "" | yes) ;; *) ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx" @@ -5784,8 +5819,9 @@ 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/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx ' - pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include ' + 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 # Check whether --enable-ppl-version-check was given. @@ -5840,8 +5876,6 @@ clooginc=" -DCLOOG_PPL_BACKEND " # Check whether --with-cloog was given. if test "${with_cloog+set}" = set; then : withval=$with_cloog; -else - with_cloog=yes fi @@ -5866,7 +5900,7 @@ case $with_cloog in clooglibs= clooginc= ;; - yes) + "" | yes) ;; *) clooglibs="-L$with_cloog/lib -lcloog" @@ -5880,8 +5914,9 @@ 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 # Check whether --enable-cloog-version-check was given. @@ -5895,8 +5930,8 @@ fi if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct version of CLooG" >&5 -$as_echo_n "checking for correct version of CLooG... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.15.5 (or later revision) of CLooG" >&5 +$as_echo_n "checking for version 0.15.5 (or later revision) of CLooG... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "cloog/cloog.h" @@ -5904,7 +5939,7 @@ int main () { - #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 + #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 5 choke me #endif @@ -5936,6 +5971,35 @@ else fi + + + +target_elf=no +case $target in + *-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \ + *-msdosdjgpp* | *-netware* | *-vms* | *-wince* | *-*-pe* | \ + alpha*-dec-osf* | *-interix*) + 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. @@ -5986,10 +6050,11 @@ fi if test "x$with_libelf$with_libelf_include$with_libelf_lib" = x \ && test -d ${srcdir}/libelf; then - libelflibs='-L$$r/$(HOST_SUBDIR)/libelf/.libs -L$$r/$(HOST_SUBDIR)/libelf/_libs -lelf ' - libelfinc='-I$$r/$(HOST_SUBDIR)/libelf/include -I$$s/libelf/include' + libelflibs='-L$$r/$(HOST_SUBDIR)/libelf/lib -lelf ' + libelfinc='-D__LIBELF_INTERNAL__ -I$$r/$(HOST_SUBDIR)/libelf/lib -I$$s/libelf/lib' LIBS="$libelflibs $LIBS" - fi + + else CFLAGS="$CFLAGS $libelfinc" CPPFLAGS="$CPPFLAGS $libelfinc" @@ -6518,6 +6583,8 @@ to specify its location." "$LINENO" 5 CPPFLAGS="$saved_CPPFLAGS" LIBS="$saved_LIBS" + fi + # Flags needed for libelf. @@ -6630,7 +6697,8 @@ if test -d ${srcdir}/gcc; then exit 1 fi - if test "$language" = "c++" -a "$ENABLE_BUILD_WITH_CXX" = "yes"; then + if test "$language" = "c++" \ + && test "$ENABLE_BUILD_WITH_CXX" = "yes"; then boot_language=yes fi @@ -7376,6 +7444,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! @@ -7533,6 +7606,12 @@ for module in ${build_configdirs} ; do echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure" rm -f ${build_subdir}/${module}/Makefile fi + # PR 11238: Also remove config.cache files. + if test -z "${no_recursion}" \ + && test -f ${build_subdir}/${module}/config.cache; then + echo 1>&2 "*** removing ${build_subdir}/${module}/config.cache to allow reconfigure" + rm -f ${build_subdir}/${module}/config.cache + fi extrasub_build="$extrasub_build /^@if build-$module\$/d /^@endif build-$module\$/d @@ -7548,6 +7627,11 @@ for module in ${configdirs} ; do rm -f ${file} fi done + # PR 11238: Also remove config.cache files. + if test -f ${module}/config.cache; then + echo 1>&2 "*** removing ${module}/config.cache to allow reconfigure" + rm -f ${module}/config.cache + fi fi extrasub_host="$extrasub_host /^@if $module\$/d @@ -7562,6 +7646,12 @@ for module in ${target_configdirs} ; do echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure" rm -f ${target_subdir}/${module}/Makefile fi + # PR 11238: Also remove config.cache files. + if test -z "${no_recursion}" \ + && test -f ${target_subdir}/${module}/config.cache; then + echo 1>&2 "*** removing ${target_subdir}/${module}/config.cache to allow reconfigure" + rm -f ${target_subdir}/${module}/config.cache + fi # We only bootstrap target libraries listed in bootstrap_target_libs. case $bootstrap_target_libs in @@ -7801,8 +7891,9 @@ case " $target_configdirs " in case " $target_configargs " in *" --with-newlib "*) case "$target" in - *-cygwin*) - FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include' ;; + *-cygwin*) + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include' + ;; esac # If we're not building GCC, don't discard standard headers. @@ -7858,10 +7949,17 @@ case " $target_configdirs " in esac ;; esac + case "$target" in -*-mingw*) - # Can't be handled as Cygwin above since Mingw does not use newlib. - FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/mingw -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/mingw/include -isystem $$s/winsup/w32api/include' ;; + x86_64-*mingw* | *-w64-mingw*) + # MinGW-w64 does not use newlib, nor does it use winsup. It may, + # however, use a symlink named 'mingw' in ${prefix} . + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L${prefix}/${target}/lib -L${prefix}/mingw/lib -isystem ${prefix}/${target}/include -isystem ${prefix}/mingw/include' + ;; + *-mingw*) + # MinGW can't be handled as Cygwin above since it does not use newlib. + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/mingw -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/mingw/include -isystem $$s/winsup/w32api/include' + ;; esac # Allow the user to override the flags for @@ -7924,6 +8022,7 @@ done + # Target module lists & subconfigure args. @@ -14263,6 +14362,9 @@ case "$target" in hppa*64*-*-hpux*) ;; hppa*-*-hpux*) compare_exclusions="gcc/cc*-checksum\$(objext) | */libgcc/lib2funcs* | gcc/ada/*tools/*" ;; esac +case " $configdirs " in +*" ppl "*) compare_exclusions="$compare_exclusions | ppl/src/ppl-config.o" ;; +esac ac_config_files="$ac_config_files Makefile"