X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=4bb4865d84fa9cb003d450864d00db21c3201876;hb=10a93b604f84ef19c9a15656c3aaeefac82b4e58;hp=396c87b95a7d11166706f18e703fe35cb5b2019a;hpb=2e702c99c59f581594820852c607394c25bc9bd2;p=platform%2Fupstream%2Fbinutils.git diff --git a/configure.ac b/configure.ac index 396c87b..4bb4865 100644 --- a/configure.ac +++ b/configure.ac @@ -28,6 +28,7 @@ m4_include([ltoptions.m4]) m4_include([ltsugar.m4]) m4_include([ltversion.m4]) m4_include([lt~obsolete.m4]) +m4_include([config/isl.m4]) m4_include([config/cloog.m4]) AC_INIT(move-if-change) @@ -112,11 +113,11 @@ extra_host_args= ### or a host dependent tool. Then put it into the appropriate list ### (library or tools, host or target), doing a dependency sort. -# Subdirs will be configured in the order listed in build_configdirs, +# Subdirs will be configured in the order listed in build_configdirs, # configdirs, or target_configdirs; see the serialization section below. -# Dependency sorting is only needed when *configuration* must be done in -# a particular order. In all cases a dependency should be specified in +# Dependency sorting is only needed when *configuration* must be done in +# a particular order. In all cases a dependency should be specified in # the Makefile, whether or not it's implicitly specified here. # Double entries in build_configdirs, configdirs, or target_configdirs may @@ -132,7 +133,7 @@ build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes" # these libraries are used by various programs built for the host environment # -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr mpc ppl cloog libelf libiconv" +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl 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 @@ -151,12 +152,16 @@ libgcj="target-libffi \ # the host libraries and the host tools (which may be a cross compiler) # Note that libiberty is not a target library. target_libraries="target-libgcc \ + target-libbacktrace \ target-libgloss \ target-newlib \ target-libgomp \ + target-libcilkrts \ + target-libatomic \ target-libitm \ target-libstdc++-v3 \ - target-libmudflap \ + target-libsanitizer \ + target-libvtv \ target-libssp \ target-libquadmath \ target-libgfortran \ @@ -209,7 +214,7 @@ if test x"${host}" = x"${target}" ; then is_cross_compiler=no else is_cross_compiler=yes -fi +fi # Find the build and target subdir names. GCC_TOPLEV_SUBDIRS @@ -245,7 +250,7 @@ if test x$with_system_zlib = xyes ; then noconfigdirs="$noconfigdirs zlib" fi -# some tools are so dependent upon X11 that if we're not building with X, +# 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. case ${with_x} in @@ -253,7 +258,7 @@ case ${with_x} in no) skipdirs="${skipdirs} tk itcl libgui" # We won't be able to build gdbtk without X. - enable_gdbtk=no + enable_gdbtk=no ;; *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;; esac @@ -311,7 +316,7 @@ case "${ENABLE_GOLD}" in is_elf=no case "${target}" in *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \ - | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \ + | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \ | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \ | *-*-solaris2* | *-*-nto* | *-*-nacl*) case "${target}" in @@ -326,7 +331,8 @@ case "${ENABLE_GOLD}" in if test "$is_elf" = "yes"; then # Check for target supported by gold. case "${target}" in - i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*) + i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \ + | aarch64*-*-* | tilegx*-*-*) configdirs="$configdirs gold" if test x${ENABLE_GOLD} = xdefault; then default_ld=gold @@ -379,7 +385,7 @@ esac # Only spaces may be used in this macro; not newlines or tabs. unsupported_languages= -# Remove more programs from consideration, based on the host or +# Remove more programs from consideration, based on the host or # target this usually means that a port of the program doesn't # exist yet. @@ -424,6 +430,15 @@ AC_ARG_ENABLE(libssp, ENABLE_LIBSSP=$enableval, ENABLE_LIBSSP=yes) +AC_ARG_ENABLE(libstdcxx, +AS_HELP_STRING([--disable-libstdcxx], + [do not build libstdc++-v3 directory]), +ENABLE_LIBSTDCXX=$enableval, +ENABLE_LIBSTDCXX=default) +[if test "${ENABLE_LIBSTDCXX}" = "no" ; then + noconfigdirs="$noconfigdirs libstdc++-v3" +fi] + # Save it here so that, even in case of --enable-libgcj, if the Java # front-end isn't enabled, we still get libgcj disabled. libgcj_saved=$libgcj @@ -459,22 +474,6 @@ if test x$enable_static_libjava != xyes ; then fi AC_SUBST(EXTRA_CONFIGARGS_LIBJAVA) -# Disable libmudflap on some systems. -if test x$enable_libmudflap = x ; then - case "${target}" in - *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux* | *-*-kopensolaris*-gnu) - # Enable libmudflap by default in GNU and friends. - ;; - *-*-freebsd*) - # Enable libmudflap by default in FreeBSD. - ;; - *) - # Disable it by default everywhere else. - noconfigdirs="$noconfigdirs target-libmudflap" - ;; - esac -fi - # Disable libgomp on non POSIX hosted systems. if test x$enable_libgomp = x ; then # Enable libgomp by default on hosted POSIX systems. @@ -493,6 +492,38 @@ if test x$enable_libgomp = x ; then esac fi +# Disable libatomic on unsupported systems. +if test -d ${srcdir}/libatomic; then + if test x$enable_libatomic = x; then + AC_MSG_CHECKING([for libatomic support]) + if (srcdir=${srcdir}/libatomic; \ + . ${srcdir}/configure.tgt; \ + test -n "$UNSUPPORTED") + then + AC_MSG_RESULT([no]) + noconfigdirs="$noconfigdirs target-libatomic" + else + AC_MSG_RESULT([yes]) + fi + fi +fi + +# Disable libcilkrts on unsupported systems. +if test -d ${srcdir}/libcilkrts; then + if test x$enable_libcilkrts = x; then + AC_MSG_CHECKING([for libcilkrts support]) + if (srcdir=${srcdir}/libcilkrts; \ + . ${srcdir}/configure.tgt; \ + test -n "$UNSUPPORTED") + then + AC_MSG_RESULT([no]) + noconfigdirs="$noconfigdirs target-libcilkrts" + else + AC_MSG_RESULT([yes]) + fi + fi +fi + # Disable libitm on unsupported systems. if test -d ${srcdir}/libitm; then if test x$enable_libitm = x; then @@ -509,6 +540,50 @@ if test -d ${srcdir}/libitm; then fi fi +# Disable libsanitizer on unsupported systems. +if test -d ${srcdir}/libsanitizer; then + if test x$enable_libsanitizer = x; then + AC_MSG_CHECKING([for libsanitizer support]) + if (srcdir=${srcdir}/libsanitizer; \ + . ${srcdir}/configure.tgt; \ + test -n "$UNSUPPORTED") + then + AC_MSG_RESULT([no]) + noconfigdirs="$noconfigdirs target-libsanitizer" + else + AC_MSG_RESULT([yes]) + fi + fi +fi + +# Disable libvtv on unsupported systems. +if test -d ${srcdir}/libvtv; then + if test x$enable_libvtv = x; then + AC_MSG_CHECKING([for libvtv support]) + if (srcdir=${srcdir}/libvtv; \ + . ${srcdir}/configure.tgt; \ + test "$VTV_SUPPORTED" != "yes") + then + AC_MSG_RESULT([no]) + noconfigdirs="$noconfigdirs target-libvtv" + else + AC_MSG_RESULT([yes]) + fi + fi +fi + +# Disable libquadmath for some systems. +case "${target}" in + avr-*-*) + noconfigdirs="$noconfigdirs target-libquadmath" + ;; + # libquadmath is unused on AIX and libquadmath build process use of + # LD_LIBRARY_PATH can break AIX bootstrap. + powerpc-*-aix* | rs6000-*-aix*) + noconfigdirs="$noconfigdirs target-libquadmath" + ;; +esac + # Disable libssp for some systems. case "${target}" in avr-*-*) @@ -527,19 +602,22 @@ case "${target}" in esac # Disable libstdc++-v3 for some systems. -case "${target}" in - *-*-vxworks*) - # VxWorks uses the Dinkumware C++ library. - noconfigdirs="$noconfigdirs target-libstdc++-v3" - ;; - arm*-wince-pe*) - # the C++ libraries don't build on top of CE's C libraries - noconfigdirs="$noconfigdirs target-libstdc++-v3" - ;; - avr-*-*) - noconfigdirs="$noconfigdirs target-libstdc++-v3" - ;; -esac +# Allow user to override this if they pass --enable-libstdc++-v3 +if test "${ENABLE_LIBSTDCXX}" = "default" ; then + case "${target}" in + *-*-vxworks*) + # VxWorks uses the Dinkumware C++ library. + noconfigdirs="$noconfigdirs target-libstdc++-v3" + ;; + arm*-wince-pe*) + # the C++ libraries don't build on top of CE's C libraries + noconfigdirs="$noconfigdirs target-libstdc++-v3" + ;; + avr-*-*) + noconfigdirs="$noconfigdirs target-libstdc++-v3" + ;; + esac +fi # Disable Fortran for some systems. case "${target}" in @@ -551,6 +629,8 @@ esac # Disable Java if libffi is not supported. case "${target}" in + aarch64-*-*) + ;; alpha*-*-*) ;; arm*-*-*) @@ -689,9 +769,26 @@ case "${target}" in ;; *-*-lynxos*) noconfigdirs="$noconfigdirs ${libgcj}" - ;; + ;; esac +# Disable libgo for some systems where it is known to not work. +# For testing, you can easily override this with --enable-libgo. +if test x$enable_libgo = x; then + case "${target}" in + *-*-darwin*) + # PR 46986 + noconfigdirs="$noconfigdirs target-libgo" + ;; + *-*-cygwin* | *-*-mingw*) + noconfigdirs="$noconfigdirs target-libgo" + ;; + *-*-aix*) + noconfigdirs="$noconfigdirs target-libgo" + ;; + esac +fi + # Default libgloss CPU subdirectory. libgloss_dir="$target_cpu" @@ -699,6 +796,9 @@ case "${target}" in sh*-*-pe|mips*-*-pe|*arm-wince-pe) libgloss_dir=wince ;; + aarch64*-*-* ) + libgloss_dir=aarch64 + ;; arm*-*-*) libgloss_dir=arm ;; @@ -774,7 +874,7 @@ case "${target}" in ;; *-*-lynxos*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" - ;; + ;; *-*-mingw*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; @@ -832,6 +932,10 @@ case "${target}" in ;; *-*-rtems*) noconfigdirs="$noconfigdirs target-libgloss" + # this is not caught below because this stanza matches earlier + case $target in + or1k*-*-*) noconfigdirs="$noconfigdirs gdb" ;; + esac ;; # The tpf target doesn't support gdb yet. *-*-tpf*) @@ -857,7 +961,7 @@ case "${target}" in sh*-*-pe|mips*-*-pe|*arm-wince-pe) noconfigdirs="$noconfigdirs tcl tk itcl libgui sim" ;; - arc-*-*) + arc-*-*|arceb-*-*) noconfigdirs="$noconfigdirs target-libgloss" ;; arm-*-pe*) @@ -866,15 +970,19 @@ case "${target}" in arm-*-riscix*) noconfigdirs="$noconfigdirs ld target-libgloss" ;; + avr-*-rtems*) + ;; + avr-*-*) + if test x${with_avrlibc} != xno; then + noconfigdirs="$noconfigdirs target-newlib target-libgloss" + fi + ;; c4x-*-* | tic4x-*-*) noconfigdirs="$noconfigdirs target-libgloss" ;; tic54x-*-*) noconfigdirs="$noconfigdirs target-libgloss gdb" ;; - cr16-*-*) - noconfigdirs="$noconfigdirs gdb" - ;; d10v-*-*) noconfigdirs="$noconfigdirs target-libgloss" ;; @@ -924,7 +1032,8 @@ case "${target}" in noconfigdirs="$noconfigdirs libgui itcl ld" ;; ia64*-*-*vms*) - noconfigdirs="$noconfigdirs libgui itcl" + # No ld support yet. + noconfigdirs="$noconfigdirs libgui itcl ld" ;; i[[3456789]]86-w64-mingw*) ;; @@ -1002,7 +1111,7 @@ case "${target}" in microblaze*) noconfigdirs="$noconfigdirs gprof" ;; - mips*-sde-elf*) + mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*) if test x$with_newlib = xyes; then noconfigdirs="$noconfigdirs gprof" fi @@ -1014,13 +1123,23 @@ case "${target}" in noconfigdirs="$noconfigdirs gprof target-libgloss" ;; mips*-*-bsd*) - noconfigdirs="$noconfigdirs gprof target-libgloss" + noconfigdirs="$noconfigdirs ld gas gprof target-libgloss" ;; mips*-*-linux*) ;; + mips*-*-ultrix* | mips*-*-osf* | mips*-*-ecoff* | mips*-*-pe* \ + | mips*-*-irix* | mips*-*-lnews* | mips*-*-riscos*) + noconfigdirs="$noconfigdirs ld gas gprof" + ;; mips*-*-*) noconfigdirs="$noconfigdirs gprof" ;; + nds32*-*-*) + noconfigdirs="$noconfigdirs gdb" + ;; + or1k*-*-*) + noconfigdirs="$noconfigdirs gdb" + ;; sh-*-* | sh64-*-*) case "${target}" in sh*-*-elf) @@ -1037,7 +1156,7 @@ case "${target}" in tic6x-*-*) noconfigdirs="$noconfigdirs sim" ;; - tilepro-*-* | tilegx-*-*) + tilepro*-*-* | tilegx*-*-*) noconfigdirs="$noconfigdirs sim" ;; v810-*-*) @@ -1069,16 +1188,13 @@ case "${host}" in *-mingw*) host_makefile_frag="config/mh-mingw" ;; - *-interix*) - host_makefile_frag="config/mh-interix" - ;; hppa*-hp-hpux10*) host_makefile_frag="config/mh-pa-hpux10" ;; hppa*-hp-hpux*) host_makefile_frag="config/mh-pa" ;; - hppa*-*) + hppa*-*) host_makefile_frag="config/mh-pa" ;; *-*-darwin*) @@ -1145,6 +1261,26 @@ if test -z "$LD"; then fi fi +# Check whether -static-libstdc++ -static-libgcc is supported. +have_static_libs=no +if test "$GCC" = yes; then + saved_LDFLAGS="$LDFLAGS" + + LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc" + AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc]) + AC_LANG_PUSH(C++) + AC_LINK_IFELSE([ +#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) +#error -static-libstdc++ not implemented +#endif +int main() {}], + [AC_MSG_RESULT([yes]); have_static_libs=yes], + [AC_MSG_RESULT([no])]) + AC_LANG_POP(C++) + + LDFLAGS="$saved_LDFLAGS" +fi + ACX_PROG_GNAT ACX_PROG_CMP_IGNORE_INITIAL @@ -1191,20 +1327,6 @@ case "$have_compiler:$host:$target:$enable_bootstrap" in ;; esac -# See if we are building gcc with C++. -AC_ARG_ENABLE(build-with-cxx, -[AS_HELP_STRING([--enable-build-with-cxx], - [build with C++ compiler instead of C compiler])], -ENABLE_BUILD_WITH_CXX=$enableval, -ENABLE_BUILD_WITH_CXX=no) - -# Build stage1 with C and build stages 2 and 3 with C++. -AC_ARG_ENABLE(build-poststage1-with-cxx, -[AS_HELP_STRING([--enable-build-poststage1-with-cxx], - [build stages 2 and 3 with C++, not C])], -ENABLE_BUILD_POSTSTAGE1_WITH_CXX=$enableval, -ENABLE_BUILD_POSTSTAGE1_WITH_CXX=yes) - # Used for setting $lt_cv_objdir _LT_CHECK_OBJDIR @@ -1277,9 +1399,16 @@ 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/'"$lt_cv_objdir $gmplibs" - gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc" - extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir" + # MPFR v3.1.0 moved the sources into a src sub-directory. + if test -d ${srcdir}/mpfr/src; then + gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs" + gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc" + extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir" + else + 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 --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir" + fi # 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 @@ -1321,6 +1450,7 @@ if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc" extra_mpfr_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" extra_mpc_gmp_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/$(HOST_SUBDIR)/gmp/'"$lt_cv_objdir" + extra_isl_gmp_configure_flags='--with-gmp-builddir=$$r/$(HOST_SUBDIR)/gmp' # 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 @@ -1337,7 +1467,7 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then AC_TRY_COMPILE([#include "gmp.h"],[ #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) + #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,3) choke me #endif ], [AC_TRY_COMPILE([#include ],[ @@ -1355,7 +1485,7 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then AC_MSG_CHECKING([for the correct version of mpfr.h]) AC_TRY_COMPILE([#include #include ],[ - #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,1) + #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0) choke me #endif ], [AC_TRY_COMPILE([#include @@ -1415,7 +1545,7 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then # The library versions listed in the error message below should match # the HARD-minimums enforced above. if test x$have_gmp != xyes; then - AC_MSG_ERROR([Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+. + AC_MSG_ERROR([Building GCC requires GMP 4.2+, MPFR 2.4.0+ 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 @@ -1433,6 +1563,7 @@ AC_SUBST(gmpinc) AC_SUBST(extra_mpfr_configure_flags) AC_SUBST(extra_mpc_gmp_configure_flags) AC_SUBST(extra_mpc_mpfr_configure_flags) +AC_SUBST(extra_isl_gmp_configure_flags) # Allow host libstdc++ to be specified for static linking with PPL. AC_ARG_WITH(host-libstdcxx, @@ -1446,17 +1577,6 @@ case $with_host_libstdcxx in ;; esac -# Linker flags to use for stage1 or when not boostrapping. -AC_ARG_WITH(stage1-ldflags, -[AS_HELP_STRING([--with-stage1-ldflags=FLAGS], [linker flags for stage1])], -[if test "$withval" = "no" -o "$withval" = "yes"; then - stage1_ldflags= - else - stage1_ldflags=$withval - fi], -[stage1_ldflags=]) -AC_SUBST(stage1_ldflags) - # Libraries to use for stage1 or when not bootstrapping. AC_ARG_WITH(stage1-libs, [AS_HELP_STRING([--with-stage1-libs=LIBS], [libraries for stage1])], @@ -1468,6 +1588,23 @@ AC_ARG_WITH(stage1-libs, [stage1_libs=$with_host_libstdcxx]) AC_SUBST(stage1_libs) +# Linker flags to use for stage1 or when not bootstrapping. +AC_ARG_WITH(stage1-ldflags, +[AS_HELP_STRING([--with-stage1-ldflags=FLAGS], [linker flags for stage1])], +[if test "$withval" = "no" -o "$withval" = "yes"; then + stage1_ldflags= + else + stage1_ldflags=$withval + fi], +[stage1_ldflags= + # In stage 1, default to linking libstdc++ and libgcc statically with GCC + # if supported. But if the user explicitly specified the libraries to use, + # trust that they are doing what they want. + if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then + stage1_ldflags="-static-libstdc++ -static-libgcc" + fi]) +AC_SUBST(stage1_ldflags) + # Libraries to use for stage2 and later builds. This defaults to the # argument passed to --with-host-libstdcxx. AC_ARG_WITH(boot-libs, @@ -1498,118 +1635,76 @@ AC_ARG_WITH(boot-ldflags, fi]) AC_SUBST(poststage1_ldflags) -# Check for PPL -ppllibs= -pplinc= -pwllib= - -AC_ARG_WITH(ppl, -[AS_HELP_STRING([--with-ppl=PATH], - [specify prefix directory for the installed PPL package. - Equivalent to --with-ppl-include=PATH/include - plus --with-ppl-lib=PATH/lib])]) -AC_ARG_WITH(ppl-include, -[AS_HELP_STRING([--with-ppl-include=PATH], - [specify directory for installed PPL include files])]) -AC_ARG_WITH(ppl-lib, -[AS_HELP_STRING([--with-ppl-lib=PATH], - [specify directory for the installed PPL library])]) - -AC_ARG_ENABLE(ppl-version-check, -[AS_HELP_STRING([--disable-ppl-version-check], - [disable check for PPL version])]) - -case $with_ppl in - yes | no | "") - ;; - *) - ppllibs="-L$with_ppl/lib" - pplinc="-I$with_ppl/include $pplinc" - if test -d "$with_ppl/lib" && test -d "$with_ppl/include"; then - with_ppl=yes - else - AC_MSG_ERROR([cannot find directories "$with_ppl/lib" or "$with_ppl/include"]) +# GCC GRAPHITE dependences, ISL and CLOOG which in turn requires ISL. +# Basic setup is inlined here, actual checks are in config/cloog.m4 and +# config/isl.m4 + +AC_ARG_WITH(cloog, + [AS_HELP_STRING( + [--with-cloog=PATH], + [Specify prefix directory for the installed CLooG-ISL package. + Equivalent to --with-cloog-include=PATH/include + plus --with-cloog-lib=PATH/lib])]) +AC_ARG_WITH(isl, + [AS_HELP_STRING( + [--with-isl=PATH], + [Specify prefix directory for the installed ISL package. + Equivalent to --with-isl-include=PATH/include + plus --with-isl-lib=PATH/lib])]) + +# Treat either --without-cloog or --without-isl as a request to disable +# GRAPHITE support and skip all following checks. +if test "x$with_isl" != "xno" && + test "x$with_cloog" != "xno"; then + # Check for ISL + dnl Provide configure switches and initialize islinc & isllibs + dnl with user input. + ISL_INIT_FLAGS + dnl The versions of ISL that work for Graphite + ISL_CHECK_VERSION(0,10) + if test "${gcc_cv_isl}" = no ; then + ISL_CHECK_VERSION(0,11) + if test "${gcc_cv_isl}" = no ; then + ISL_CHECK_VERSION(0,12) fi - ;; -esac - -if test x"$with_ppl_include" != x; then - pplinc="-I$with_ppl_include $pplinc" - with_ppl=yes -fi - -if test "x$with_ppl_lib" != x; then - ppllibs="-L$with_ppl_lib" - with_ppl=yes -fi - -if test x"$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then - if test x"$enable_watchdog" = xyes; then - pwllib="-lpwl" - fi - ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir" - pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C ' - enable_ppl_version_check=no - with_ppl=yes -fi - -if test "x$with_ppl" != xno; then - if test "x$pwllib" = x; then - saved_LIBS="$LIBS" - LIBS="$LIBS $ppllibs -lstdc++ -lm" - AC_CHECK_LIB(pwl, PWL_handle_timeout, [pwllib="-lpwl"]) - LIBS="$saved_LIBS" fi + dnl Only execute fail-action, if ISL has been requested. + ISL_IF_FAILED([ + AC_MSG_ERROR([Unable to find a usable ISL. See config.log for details.])]) + + if test "x$gcc_cv_isl" != "xno"; then + # Check for CLOOG + dnl Provide configure switches and initialize clooginc & clooglibs + dnl with user input. + CLOOG_INIT_FLAGS + dnl The versions of CLooG that work for Graphite. + CLOOG_CHECK_VERSION(0,17,0) + if test "${gcc_cv_cloog}" = no ; then + CLOOG_CHECK_VERSION(0,18,0) + fi - ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx" - - if test "$enable_ppl_version_check" != no; then - saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $pplinc $gmpinc" - AC_MSG_CHECKING([for version 0.11 (revision 0 or later) of PPL]) - AC_TRY_COMPILE([#include "ppl_c.h"],[ - #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 11 - choke me - #endif - ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ]) - CFLAGS="$saved_CFLAGS" + dnl Only execute fail-action, if CLooG has been requested. + CLOOG_IF_FAILED([ + AC_MSG_ERROR([Unable to find a usable CLooG. See config.log for details.])]) fi fi -# Flags needed for PPL -AC_SUBST(ppllibs) -AC_SUBST(pplinc) - - -# Check for CLOOG - -dnl Provide configure switches and initialize clooginc & clooglibs -dnl with user input. -CLOOG_INIT_FLAGS -if test "x$with_ppl" = "xno"; then - dnl Only execute fail-action, if CLooG has been requested. - CLOOG_REQUESTED([graphite_requested=yes], [graphite_requested=no]) - if test "${graphite_requested}" = yes; then - AC_MSG_ERROR([Unable to find a usable PPL. See config.log for details.]) - fi - with_cloog=no -fi -if test "x${with_cloog}" = x && test "x${with_cloog_include}" = x \ - && test "x${with_cloog_lib}" = x && test -d ${srcdir}/cloog; then - clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/'"$lt_cv_objdir"' ' - clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include ' +# If either the ISL or the CLooG check failed, disable builds of in-tree +# variants of both +if test "x$with_isl" = xno || + test "x$with_cloog" = xno || + test "x$gcc_cv_cloog" = xno || + test "x$gcc_cv_isl" = xno; then + noconfigdirs="$noconfigdirs cloog isl" + islinc= + clooginc= + clooglibs= fi -if test "x$with_cloog" != "xno"; then - dnl The minimal version of CLooG required for Graphite. - dnl - dnl If we use CLooG-Legacy, the provided version information is - dnl ignored. - CLOOG_CHECK_VERSION(0,16,1) - dnl Only execute fail-action, if CLooG has been requested. - CLOOG_IF_FAILED([ - AC_MSG_ERROR([Unable to find a usable CLooG. See config.log for details.])]) -fi +AC_SUBST(islinc) +AC_SUBST(clooglibs) +AC_SUBST(clooginc) + # Check for LTO support. AC_ARG_ENABLE(lto, @@ -1648,7 +1743,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. ]) -# By default, C is the only stage 1 language. +# By default, C and C++ are the only stage 1 languages. stage1_languages=,c, # Target libraries that we bootstrap. @@ -1686,15 +1781,14 @@ if test -d ${srcdir}/gcc; then ;; esac - # If bootstrapping, then using --enable-build-with-cxx or - # --enable-build-poststage1-with-cxx requires enabling C++. - case ",$enable_languages,:,$ENABLE_BUILD_WITH_CXX,$ENABLE_BUILD_POSTSTAGE1_WITH_CXX,:$enable_bootstrap" in - *,c++,*:*:*) ;; - *:*,yes,*:yes) + # If bootstrapping, C++ must be enabled. + case ",$enable_languages,:$enable_bootstrap" in + *,c++,*:*) ;; + *:yes) if test -f ${srcdir}/gcc/cp/config-lang.in; then enable_languages="${enable_languages},c++" else - AC_MSG_ERROR([bootstrapping with --enable-build-with-cxx or --enable-build-poststage1-with-cxx requires c++ sources]) + AC_MSG_ERROR([bootstrapping requires c++ sources]) fi ;; esac @@ -1774,7 +1868,7 @@ if test -d ${srcdir}/gcc; then # an apparent bug in bash 1.12 on linux. ${srcdir}/gcc/[[*]]/config-lang.in) ;; *) - # From the config-lang.in, get $language, $target_libs, + # From the config-lang.in, get $language, $target_libs, # $lang_dirs, $boot_language, and $build_by_default language= target_libs= @@ -1789,23 +1883,23 @@ if test -d ${srcdir}/gcc; then fi if test "$language" = "c++"; then - if test "$ENABLE_BUILD_WITH_CXX" = "yes" \ - || test "$ENABLE_BUILD_POSTSTAGE1_WITH_CXX" = "yes"; then - boot_language=yes - fi + boot_language=yes fi + add_this_lang=no case ,${enable_languages}, in *,${language},*) - # Language was explicitly selected; include it. - add_this_lang=yes + # Language was explicitly selected; include it + # unless it is C, which is enabled by default. + if test "$language" != "c"; then + add_this_lang=yes + fi ;; *,all,*) # 'all' was selected, select it if it is a default language - add_this_lang=${build_by_default} - ;; - *) - add_this_lang=no + if test "$language" != "c"; then + add_this_lang=${build_by_default} + fi ;; esac @@ -1974,6 +2068,14 @@ case ,${enable_languages},:${enable_objc_gc} in ;; esac +# Disable libitm, libsanitizer, libvtv if we're not building C++ +case ,${enable_languages}, in + *,c++,*) ;; + *) + noconfigdirs="$noconfigdirs target-libcilkrts target-libitm target-libsanitizer target-libvtv" + ;; +esac + # Remove the entries in $skipdirs and $noconfigdirs from $configdirs, # $build_configdirs and $target_configdirs. # If we have the source for $noconfigdirs entries, add them to $notsupp. @@ -2019,7 +2121,7 @@ done build_configdirs_all="$build_configdirs" build_configdirs= for i in ${build_configdirs_all} ; do - j=`echo $i | sed -e s/build-//g` + j=`echo $i | sed -e s/build-//g` if test -f ${srcdir}/$j/configure ; then build_configdirs="${build_configdirs} $i" fi @@ -2036,7 +2138,7 @@ done target_configdirs_all="$target_configdirs" target_configdirs= for i in ${target_configdirs_all} ; do - j=`echo $i | sed -e s/target-//g` + j=`echo $i | sed -e s/target-//g` if test -f ${srcdir}/$j/configure ; then target_configdirs="${target_configdirs} $i" fi @@ -2087,7 +2189,7 @@ ACX_TOOL_DIRS copy_dirs= -AC_ARG_WITH([build-sysroot], +AC_ARG_WITH([build-sysroot], [AS_HELP_STRING([--with-build-sysroot=SYSROOT], [use sysroot as the system root during the build])], [if test x"$withval" != x ; then @@ -2118,11 +2220,11 @@ if test "x$CFLAGS_FOR_TARGET" = x; then CFLAGS_FOR_TARGET=$CFLAGS case " $CFLAGS " in *" -O2 "*) ;; - *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;; + *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;; esac case " $CFLAGS " in *" -g "* | *" -g3 "*) ;; - *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;; + *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;; esac fi AC_SUBST(CFLAGS_FOR_TARGET) @@ -2131,11 +2233,11 @@ if test "x$CXXFLAGS_FOR_TARGET" = x; then CXXFLAGS_FOR_TARGET=$CXXFLAGS case " $CXXFLAGS " in *" -O2 "*) ;; - *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;; + *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;; esac case " $CXXFLAGS " in *" -g "* | *" -g3 "*) ;; - *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;; + *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;; esac fi AC_SUBST(CXXFLAGS_FOR_TARGET) @@ -2178,11 +2280,11 @@ fi # This is done by determining whether or not the appropriate directory # is available, and by checking whether or not specific configurations # have requested that this magic not happen. -# -# The command line options always override the explicit settings in +# +# The command line options always override the explicit settings in # configure.in, and the settings in configure.in override this magic. # -# If the default for a toolchain is to use GNU as and ld, and you don't +# 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. Similarly, if # the default is to use the included zlib and you don't want to do that, @@ -2270,7 +2372,7 @@ case "${target}" in spu-*-*) target_makefile_frag="config/mt-spu" ;; - mips*-sde-elf*) + mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*) target_makefile_frag="config/mt-sde" ;; mipsisa*-*-elfoabi*) @@ -2279,20 +2381,19 @@ case "${target}" in mips*-*-*linux* | mips*-*-gnu*) target_makefile_frag="config/mt-mips-gnu" ;; + nios2-*-elf*) + target_makefile_frag="config/mt-nios2-elf" + ;; *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) target_makefile_frag="config/mt-gnu" ;; *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*) - # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm + # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm # commands to handle both 32-bit and 64-bit objects. These flags are # harmless if we're using GNU nm or ar. extra_arflags_for_target=" -X32_64" extra_nmflags_for_target=" -B -X32_64" ;; - *-*-darwin[[3-9]]*) - # ranlib before Darwin10 requires the -c flag to look at common symbols. - extra_ranlibflags_for_target=" -c" - ;; esac alphaieee_frag=/dev/null @@ -2357,7 +2458,7 @@ if test $? = 0 ; then if test -s conftest || test -s conftest.exe ; then we_are_ok=yes fi -fi +fi case $we_are_ok in no) echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed." @@ -2385,16 +2486,90 @@ else GCC_SHLIB_SUBDIR= fi +# Adjust the toplevel makefile according to whether bootstrap was selected. +case $enable_bootstrap in + yes) + bootstrap_suffix=bootstrap + BUILD_CONFIG=bootstrap-debug + ;; + no) + bootstrap_suffix=no-bootstrap + BUILD_CONFIG= + ;; +esac + +AC_MSG_CHECKING(for default BUILD_CONFIG) + +AC_ARG_WITH([build-config], + [AS_HELP_STRING([--with-build-config='NAME NAME2...'], + [use config/NAME.mk build configuration])], + [case $with_build_config in + yes) with_build_config= ;; + no) with_build_config= BUILD_CONFIG= ;; + esac]) + +if test "x${with_build_config}" != x; then + BUILD_CONFIG=$with_build_config +else + case $BUILD_CONFIG in + bootstrap-debug) + if echo "int f (void) { return 0; }" > conftest.c && + ${CC} -c conftest.c && + mv conftest.o conftest.o.g0 && + ${CC} -c -g conftest.c && + mv conftest.o conftest.o.g && + ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g > /dev/null 2>&1; then + : + else + BUILD_CONFIG= + fi + rm -f conftest.c conftest.o conftest.o.g0 conftest.o.g + ;; + esac +fi +AC_MSG_RESULT($BUILD_CONFIG) +AC_SUBST(BUILD_CONFIG) + +# Use same top-level configure hooks in libgcc/libstdc++/libvtv. +AC_MSG_CHECKING([for --enable-vtable-verify]) +AC_ARG_ENABLE(vtable-verify, +[ --enable-vtable-verify Enable vtable verification feature ], +[case "$enableval" in + yes) enable_vtable_verify=yes ;; + no) enable_vtable_verify=no ;; + *) enable_vtable_verify=no;; + esac], +[enable_vtable_verify=no]) +AC_MSG_RESULT($enable_vtable_verify) + # Record target_configdirs and the configure arguments for target and # build configuration in Makefile. target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'` +bootstrap_fixincludes=no # 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 +# If we are building libsanitizer and $BUILD_CONFIG contains bootstrap-asan +# or bootstrap-ubsan, bootstrap it. +if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1; then + case "$BUILD_CONFIG" in + *bootstrap-asan* | *bootstrap-ubsan* ) + bootstrap_target_libs=${bootstrap_target_libs}target-libsanitizer, + bootstrap_fixincludes=yes + ;; + esac +fi + +# If we are building libvtv and --enable-vtable-verify, bootstrap it. +if echo " ${target_configdirs} " | grep " libvtv " > /dev/null 2>&1 && + test "$enable_vtable_verify" != no; then + bootstrap_target_libs=${bootstrap_target_libs}target-libvtv, +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! @@ -2444,50 +2619,6 @@ case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in ;; esac -# Adjust the toplevel makefile according to whether bootstrap was selected. -case $enable_bootstrap in - yes) - bootstrap_suffix=bootstrap - BUILD_CONFIG=bootstrap-debug - ;; - no) - bootstrap_suffix=no-bootstrap - BUILD_CONFIG= - ;; -esac - -AC_MSG_CHECKING(for default BUILD_CONFIG) - -AC_ARG_WITH([build-config], - [AS_HELP_STRING([--with-build-config='NAME NAME2...'], - [use config/NAME.mk build configuration])], - [case $with_build_config in - yes) with_build_config= ;; - no) with_build_config= BUILD_CONFIG= ;; - esac]) - -if test "x${with_build_config}" != x; then - BUILD_CONFIG=$with_build_config -else - case $BUILD_CONFIG in - bootstrap-debug) - if echo "int f (void) { return 0; }" > conftest.c && - ${CC} -c conftest.c && - mv conftest.o conftest.o.g0 && - ${CC} -c -g conftest.c && - mv conftest.o conftest.o.g && - ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g > /dev/null 2>&1; then - : - else - BUILD_CONFIG= - fi - rm -f conftest.c conftest.o conftest.o.g0 conftest.o.g - ;; - esac -fi -AC_MSG_RESULT($BUILD_CONFIG) -AC_SUBST(BUILD_CONFIG) - extrasub_build= for module in ${build_configdirs} ; do if test -z "${no_recursion}" \ @@ -2511,11 +2642,15 @@ for module in ${configdirs} ; do fi done fi + case ${module},${bootstrap_fixincludes} in + fixincludes,no) host_bootstrap_suffix=no-bootstrap ;; + *) host_bootstrap_suffix=$bootstrap_suffix ;; + esac extrasub_host="$extrasub_host /^@if $module\$/d /^@endif $module\$/d -/^@if $module-$bootstrap_suffix\$/d -/^@endif $module-$bootstrap_suffix\$/d" +/^@if $module-$host_bootstrap_suffix\$/d +/^@endif $module-$host_bootstrap_suffix\$/d" done extrasub_target= for module in ${target_configdirs} ; do @@ -2658,7 +2793,7 @@ changequote(,) changequote([,]) case $lib in - mpc | mpfr | gmp | ppl | cloog) + mpc | mpfr | gmp | cloog) # If we're processing --with-$lib, --with-$lib-include or # --with-$lib-lib, for one of the libs above, and target is # different from host, don't pass the current argument to any @@ -2727,7 +2862,7 @@ baseargs=`echo "x$baseargs" | sed -e 's/^x *//' -e 's,\\$,$$,g'` # --program-suffix have been applied to it. Autoconf has already # doubled dollar signs and backslashes in program_transform_name; we want # the backslashes un-doubled, and then the entire thing wrapped in single -# quotes, because this will be expanded first by make and then by the shell. +# quotes, because this will be expanded first by make and then by the shell. # Also, because we want to override the logic in subdir configure scripts to # choose program_transform_name, replace any s,x,x, with s,y,y,. sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" < conftestsed.out @@ -2782,6 +2917,26 @@ if test x${is_cross_compiler} = xyes ; then target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}" fi +# Special user-friendly check for native x86_64-linux build, if +# multilib is not explicitly enabled. +case "$target:$have_compiler:$host:$target:$enable_multilib" in + x86_64-*linux*:yes:$build:$build:) + # Make sure we have a developement environment that handles 32-bit + dev64=no + echo "int main () { return 0; }" > conftest.c + ${CC} -m32 -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c + if test $? = 0 ; then + if test -s conftest || test -s conftest.exe ; then + dev64=yes + fi + fi + rm -f conftest* + if test x${dev64} != xyes ; then + AC_MSG_ERROR([I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.]) + fi + ;; +esac + # Default to --enable-multilib. if test x${enable_multilib} = x ; then target_configargs="--enable-multilib ${target_configargs}" @@ -2814,7 +2969,7 @@ case " $target_configdirs " 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' + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -isystem $$s/winsup/cygwin/include' ;; esac @@ -3052,7 +3207,7 @@ AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) # Target tools. -AC_ARG_WITH([build-time-tools], +AC_ARG_WITH([build-time-tools], [AS_HELP_STRING([--with-build-time-tools=PATH], [use given path to find target tools during the build])], [case x"$withval" in @@ -3091,10 +3246,10 @@ GCC_TARGET_TOOL(as, AS_FOR_TARGET, AS, [gas/as-new]) GCC_TARGET_TOOL(cc, CC_FOR_TARGET, CC, [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/]) dnl see comments for CXX_FOR_TARGET_FLAG_TO_PASS GCC_TARGET_TOOL(c++, CXX_FOR_TARGET, CXX, - [gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `if test -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags; then $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes; else echo -funconfigured-libstdc++-v3 ; fi` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs], + [gcc/xg++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `if test -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags; then $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes; else echo -funconfigured-libstdc++-v3 ; fi` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs], c++) GCC_TARGET_TOOL(c++ for libstdc++, RAW_CXX_FOR_TARGET, CXX, - [gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs], + [gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs], c++) GCC_TARGET_TOOL(dlltool, DLLTOOL_FOR_TARGET, DLLTOOL, [binutils/dlltool]) GCC_TARGET_TOOL(gcc, GCC_FOR_TARGET, , [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/]) @@ -3157,7 +3312,7 @@ if test "$USE_MAINTAINER_MODE" = yes; then else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= -fi +fi MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl @@ -3175,26 +3330,6 @@ case $build in esac ;; esac -# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. -if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then - saved_CFLAGS="$CFLAGS" - - # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it. - CFLAGS="$CFLAGS -fkeep-inline-functions" - AC_MSG_CHECKING([whether -fkeep-inline-functions is supported]) - AC_TRY_COMPILE([ -#if (__GNUC__ < 3) \ - || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \ - || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1))) -#error http://gcc.gnu.org/PR29382 -#endif - ],, - [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"], - [AC_MSG_RESULT([no])]) - - CFLAGS="$saved_CFLAGS" -fi - AC_SUBST(stage1_cflags) # Enable --enable-checking in stage1 of the compiler. @@ -3224,14 +3359,12 @@ case ${enable_werror} in esac AC_SUBST(stage2_werror_flag) -# If using ENABLE_BUILD_POSTSTAGE1_WITH_CXX, pass -# --enable-build-with-cxx after stage1. -if test "$ENABLE_BUILD_POSTSTAGE1_WITH_CXX" = "yes"; then - POSTSTAGE1_CONFIGURE_FLAGS=--enable-build-with-cxx -else - POSTSTAGE1_CONFIGURE_FLAGS= -fi -AC_SUBST(POSTSTAGE1_CONFIGURE_FLAGS) +# Enable --enable-host-shared. +AC_ARG_ENABLE(host-shared, +[AS_HELP_STRING([--enable-host-shared], + [build host code as shared libraries])], +[host_shared=$enableval], [host_shared=no]) +AC_SUBST(host_shared) # Specify what files to not compare during bootstrap. @@ -3239,9 +3372,7 @@ compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*" 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" ;; + powerpc*-ibm-aix*) compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/* | *libgomp*\$(objext)" ;; esac AC_SUBST(compare_exclusions)