X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=configure.ac;h=53ca32c3056d3af42d24b96306c37b2abc4516c7;hb=9037e078d45ef6c97475b74f46e017a33416f11c;hp=794a4191d56b2f6001385fd0f55257f0225fe1a1;hpb=16b1ad29eaa9451d7f0c8bf47df22578f98a1011;p=deliverable%2Fbinutils-gdb.git diff --git a/configure.ac b/configure.ac index 794a4191d5..53ca32c305 100644 --- a/configure.ac +++ b/configure.ac @@ -161,7 +161,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 @@ -235,6 +235,11 @@ fi # Find the build and target subdir names. GCC_TOPLEV_SUBDIRS +# Be sure to cover against remnants of an in-tree build. +if test $srcdir != . && test -d $srcdir/host-${host_noncanonical}; then + AC_MSG_ERROR([building out of tree but $srcdir contains host-${host_noncanonical}. +Use a pristine source tree when building in a separate tree]) +fi # Skipdirs are removed silently. skipdirs= @@ -255,6 +260,13 @@ if test x$with_gnu_as = xno ; then noconfigdirs="$noconfigdirs gas" fi +use_included_zlib= +# Make sure we don't let ZLIB be added if we didn't want it. +if test x$with_system_zlib = xyes ; then + use_included_zlib=no + noconfigdirs="$noconfigdirs zlib" +fi + # some tools are so dependent upon X11 that if we're not building with X, # it's not even worth trying to configure, much less build, that tool. @@ -729,14 +741,16 @@ 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*) target_configdirs="$target_configdirs target-libtermcap target-winsup" noconfigdirs="$noconfigdirs target-gperf target-libgloss" @@ -746,7 +760,7 @@ case "${target}" in elif test -d "$srcdir/newlib"; then echo "Warning: winsup/cygwin is missing so newlib can't be built." fi - ;; + ;; i[[3456789]]86-moss-msdos | i[[3456789]]86-*-moss* | \ i[[3456789]]86-*-uwin* | i[[3456789]]86-*-interix* ) ;; @@ -1214,12 +1228,9 @@ ENABLE_BUILD_WITH_CXX=$enableval, ENABLE_BUILD_WITH_CXX=no) # 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. @@ -1231,23 +1242,23 @@ AC_ARG_WITH(mpc_include, [ --with-mpc-include=PATH AC_ARG_WITH(mpc_lib, [ --with-mpc-lib=PATH specify directory for the installed MPC library]) 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/.libs -L$$r/$(HOST_SUBDIR)/mpc/src/_libs '"$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 @@ -1265,10 +1276,10 @@ AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH specify directory for the insta 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" @@ -1349,84 +1360,57 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then fi # Check for the MPC header version. - if test x"$have_mpc" != xyes ; then - CFLAGS="$CFLAGS $mpcinc" + if test x"$have_gmp" = xyes ; then AC_MSG_CHECKING([for the correct version of mpc.h]) AC_TRY_COMPILE([#include ],[ - #if MPC_VERSION < MPC_VERSION_NUM (0,6,0) + #if MPC_VERSION < MPC_VERSION_NUM (0,8,0) choke me #endif - ], [AC_MSG_RESULT([yes]); have_mpc=maybe], - [AC_MSG_RESULT([no]); have_mpc=no; mpclibs= ; mpcinc= ]) + ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no]) fi # Now check the MPFR library. if test x"$have_gmp" = xyes; then saved_LIBS="$LIBS" LIBS="$LIBS $gmplibs" - AC_MSG_CHECKING([for the correct version of the gmp/mpfr libraries]) - AC_TRY_LINK([#include - #include ],[ + AC_MSG_CHECKING([for the correct version of the gmp/mpfr/mpc libraries]) + AC_TRY_LINK([#include ],[ 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); ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no]) LIBS="$saved_LIBS" fi - if test x"$have_mpc" = xmaybe; then - saved_LIBS="$LIBS" - LIBS="$LIBS $mpclibs $gmplibs" - AC_MSG_CHECKING([for the correct version of the mpc library]) - AC_TRY_LINK([#include ],[ - 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_clear (n); - ], [AC_MSG_RESULT([yes]); have_mpc=yes], - [AC_MSG_RESULT([no]); have_mpc=no; mpclibs= ; mpcinc= ]) - LIBS="$saved_LIBS" - fi - CFLAGS="$saved_CFLAGS" if test x$have_gmp != xyes; then - AC_MSG_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.]) + AC_MSG_ERROR([Building GCC requires GMP 4.2+, MPFR 2.3.2+ 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.]) 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. AC_SUBST(gmplibs) AC_SUBST(gmpinc) @@ -1501,7 +1485,7 @@ pplinc= AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package Equivalent to --with-ppl-include=PATH/include - plus --with-ppl-lib=PATH/lib],, with_ppl=no) + plus --with-ppl-lib=PATH/lib]) AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files]) AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library]) @@ -1509,10 +1493,11 @@ case $with_ppl in no) ppllibs= ;; + "" | yes) + ;; *) ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx" pplinc="-I$with_ppl/include $pplinc" - LIBS="$ppllibs $LIBS" ;; esac if test "x$with_ppl_include" != x; then @@ -1520,12 +1505,11 @@ if test "x$with_ppl_include" != x; then fi if test "x$with_ppl_lib" != x; then ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx" - LIBS="$ppllibs $LIBS" 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 ' - LIBS="$ppllibs $LIBS" + 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 ' + pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C ' + enable_ppl_version_check=no fi AC_ARG_ENABLE(ppl-version-check, @@ -1533,7 +1517,7 @@ AC_ARG_ENABLE(ppl-version-check, ENABLE_PPL_CHECK=$enableval, ENABLE_PPL_CHECK=yes) -if test "${ENABLE_PPL_CHECK}" = "yes"; then +if test "x$with_ppl" != "xno" -a "${ENABLE_PPL_CHECK}" = "yes"; then saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pplinc $gmpinc" AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL]) @@ -1541,7 +1525,7 @@ if test "${ENABLE_PPL_CHECK}" = "yes"; then #if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version choke me #endif - ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ]) + ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ]) CFLAGS="$saved_CFLAGS" fi @@ -1556,19 +1540,24 @@ clooginc=" -DCLOOG_PPL_BACKEND " AC_ARG_WITH(cloog, [ --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package Equivalent to --with-cloog-include=PATH/include - plus --with-cloog-lib=PATH/lib],, with_cloog=no) + plus --with-cloog-lib=PATH/lib]) AC_ARG_WITH(cloog_include, [ --with-cloog-include=PATH Specify directory for installed CLooG include files]) AC_ARG_WITH(cloog_lib, [ --with-cloog-lib=PATH Specify the directory for the installed CLooG library]) +if test "x$with_ppl" = "xno"; then + with_cloog=no +fi + case $with_cloog in no) clooglibs= clooginc= ;; + "" | yes) + ;; *) clooglibs="-L$with_cloog/lib -lcloog" clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND " - LIBS="$clooglibs $LIBS" ;; esac if test "x$with_cloog_include" != x; then @@ -1576,12 +1565,11 @@ if test "x$with_cloog_include" != x; then fi if test "x$with_cloog_lib" != x; then clooglibs="-L$with_cloog_lib -lcloog" - LIBS="$clooglibs $LIBS" 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 ' clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -DCLOOG_PPL_BACKEND ' - LIBS="$clooglibs $LIBS" + enable_cloog_version_check=no fi AC_ARG_ENABLE(cloog-version-check, @@ -1589,7 +1577,7 @@ AC_ARG_ENABLE(cloog-version-check, ENABLE_CLOOG_CHECK=$enableval, ENABLE_CLOOG_CHECK=yes) -if test "${ENABLE_CLOOG_CHECK}" = "yes"; then +if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc" AC_MSG_CHECKING([for correct version of CLooG]) @@ -1605,6 +1593,130 @@ fi AC_SUBST(clooglibs) AC_SUBST(clooginc) +# Check for LTO support. +AC_ARG_ENABLE(lto, +[ --enable-lto enable link time optimization support], +enable_lto=$enableval, +enable_lto=yes; default_enable_lto=yes) + +if test x"$enable_lto" = x"yes" ; then + # Make sure that libelf.h and gelf.h are available. + AC_ARG_WITH(libelf, [ --with-libelf=PATH Specify prefix directory for the installed libelf package + Equivalent to --with-libelf-include=PATH/include + plus --with-libelf-lib=PATH/lib]) + + AC_ARG_WITH(libelf_include, [ --with-libelf-include=PATH Specify directory for installed libelf include files]) + + AC_ARG_WITH(libelf_lib, [ --with-libelf-lib=PATH Specify the directory for the installed libelf library]) + + saved_CFLAGS="$CFLAGS" + saved_CPPFLAGS="$CPPFLAGS" + saved_LIBS="$LIBS" + + case $with_libelf in + "") + libelflibs="-lelf" + libelfinc="-I/usr/include/libelf" + ;; + *) + libelflibs="-L$with_libelf/lib -lelf" + libelfinc="-I$with_libelf/include -I$with_libelf/include/libelf" + LIBS="$libelflibs $LIBS" + ;; + esac + + if test "x$with_libelf_include" != x; then + libelfinc="-I$with_libelf_include" + fi + + if test "x$with_libelf_lib" != x; then + libelflibs="-L$with_libelf_lib -lelf" + LIBS="$libelflibs $LIBS" + fi + + if test "x$with_libelf$with_libelf_include$with_libelf_lib" = x \ + && test -d ${srcdir}/libelf; then + 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" + + else + + CFLAGS="$CFLAGS $libelfinc" + CPPFLAGS="$CPPFLAGS $libelfinc" + LIBS="$LIBS $libelflibs" + + AC_CHECK_HEADERS(libelf.h, [have_libelf_h=yes]) + AC_CHECK_HEADERS(gelf.h, [have_gelf_h=yes]) + + AC_CHECK_HEADERS(libelf/libelf.h, [have_libelf_libelf_h=yes]) + AC_CHECK_HEADERS(libelf/gelf.h, [have_libelf_gelf_h=yes]) + + # If we couldn't find libelf.h and the user forced it, emit an error. + if test x"$have_libelf_h" != x"yes" \ + && test x"$have_libelf_libelf_h" != x"yes" ; then + if test x"$default_enable_lto" != x"yes" ; then + AC_MSG_ERROR([LTO support requires libelf.h or libelf/libelf.h.]) + else + enable_lto=no + libelflibs= + libelfinc= + fi + fi + + # If we couldn't find gelf.h and the user forced it, emit an error. + if test x"$have_gelf_h" != x"yes" \ + && test x"$have_libelf_gelf_h" != x"yes" ; then + if test x"$default_enable_lto" != x"yes" ; then + AC_MSG_ERROR([LTO support requires gelf.h or libelf/gelf.h.]) + else + enable_lto=no + libelflibs= + libelfinc= + fi + fi + + # Check that the detected libelf has the functions we need. We cannot + # rely on just detecting the headers since they do not include + # versioning information. Add functions, if needed. + if test x"$enable_lto" = x"yes" ; then + AC_MSG_CHECKING([for the correct version of libelf]) + AC_TRY_LINK( + [#include ],[ + elf_errmsg (0); + elf_getscn (0, 0); + 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); + ], + [AC_MSG_RESULT([yes]);], + [AC_MSG_RESULT([no]); enable_lto=no; libelflibs= ; libelfinc= ] + ) + + # 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 + AC_MSG_ERROR([To enable LTO, GCC requires libelf v0.8.12+. +Try the --with-libelf, --with-libelf-include and --with-libelf-lib options +to specify its location.]) + fi + fi + + CFLAGS="$saved_CFLAGS" + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + + fi + + # Flags needed for libelf. + AC_SUBST(libelflibs) + AC_SUBST(libelfinc) +fi + # By default, C is the only stage 1 language. stage1_languages=,c, @@ -1673,6 +1785,21 @@ if test -d ${srcdir}/gcc; then done new_enable_languages=,c, + + # If LTO is enabled, add the LTO front end. + extra_host_libiberty_configure_flags= + if test "$enable_lto" = "yes" ; then + case ,${enable_languages}, in + *,lto,*) ;; + *) enable_languages="${enable_languages},lto" ;; + esac + if test "${ENABLE_GOLD}" = "yes" ; then + configdirs="$configdirs lto-plugin" + extra_host_libiberty_configure_flags=--enable-shared + fi + fi + AC_SUBST(extra_host_libiberty_configure_flags) + missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` potential_languages=,c, @@ -1697,7 +1824,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 @@ -2082,7 +2210,7 @@ if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then fi fi -# Set with_gnu_as and with_gnu_ld as appropriate. +# Set with_gnu_as, with_gnu_ld, and with_system_zlib as appropriate. # # This is done by determining whether or not the appropriate directory # is available, and by checking whether or not specific configurations @@ -2093,7 +2221,9 @@ fi # # If the default for a toolchain is to use GNU as and ld, and you don't # want to do that, then you should use the --without-gnu-as and -# --without-gnu-ld options for the configure script. +# --without-gnu-ld options for the configure script. Similarly, if +# the default is to use the included zlib and you don't want to do that, +# you should use the --with-system-zlib option for the configure script. if test x${use_gnu_as} = x && echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then @@ -2107,6 +2237,14 @@ if test x${use_gnu_ld} = x && extra_host_args="$extra_host_args --with-gnu-ld" fi +if test x${use_included_zlib} = x && + echo " ${configdirs} " | grep " zlib " > /dev/null 2>&1 ; then + : +else + with_system_zlib=yes + extra_host_args="$extra_host_args --with-system-zlib" +fi + # If using newlib, add --with-newlib to the extra_host_args so that gcc/configure # can detect this case. @@ -2627,9 +2765,11 @@ AC_SUBST_FILE(serialization_dependencies) # Base args. Strip norecursion, cache-file, srcdir, host, build, # target, nonopt, and variable assignments. These are the ones we -# might not want to pass down to subconfigures. Also strip -# program-prefix, program-suffix, and program-transform-name, so that -# we can pass down a consistent program-transform-name. +# might not want to pass down to subconfigures. The exception being +# --cache-file=/dev/null, which is used to turn off the use of cache +# files altogether, and which should be passed on to subconfigures. +# Also strip program-prefix, program-suffix, and program-transform-name, +# so that we can pass down a consistent program-transform-name. baseargs= keep_next=no skip_next=no @@ -2668,6 +2808,13 @@ do esac case "$ac_arg" in + --cache-file=/dev/null | \ + -cache-file=/dev/null ) + # Handled here to avoid the test to skip args below. + baseargs="$baseargs '$ac_arg'" + # Assert: $separate_arg should always be no. + keep_next=$separate_arg + ;; --no*) continue ;; @@ -2787,8 +2934,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. @@ -2844,10 +2992,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 @@ -3188,6 +3343,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_SUBST(compare_exclusions) AC_CONFIG_FILES([Makefile],