X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure;h=87677bc2169f9dda29db68a358857fd802771066;hb=cfd4e875aeacf565f945c2818dbfff47807b6199;hp=77397f386f305fbcf04e22877b1373ed969fc1a0;hpb=d09bbf000469737045fd17ef5b12fdd25db0b989;p=platform%2Fupstream%2Fbinutils.git diff --git a/configure b/configure index 77397f3..87677bc 100755 --- a/configure +++ b/configure @@ -556,6 +556,7 @@ enable_option_checking=no ac_subst_vars='LTLIBOBJS LIBOBJS compare_exclusions +host_shared stage2_werror_flag stage1_checking stage1_cflags @@ -646,11 +647,10 @@ extra_host_libiberty_configure_flags clooginc clooglibs islinc -isllibs poststage1_ldflags poststage1_libs -stage1_libs stage1_ldflags +stage1_libs extra_isl_gmp_configure_flags extra_mpc_mpfr_configure_flags extra_mpc_gmp_configure_flags @@ -750,6 +750,7 @@ enable_libquadmath enable_libquadmath_support enable_libada enable_libssp +enable_libstdcxx enable_static_libjava enable_bootstrap with_mpc @@ -764,15 +765,15 @@ with_gmp with_gmp_include with_gmp_lib with_host_libstdcxx -with_stage1_ldflags with_stage1_libs +with_stage1_ldflags with_boot_libs with_boot_ldflags +with_cloog with_isl with_isl_include with_isl_lib enable_isl_version_check -with_cloog with_cloog_include with_cloog_lib enable_cloog_version_check @@ -782,11 +783,13 @@ enable_objc_gc with_build_sysroot with_debug_prefix_map with_build_config +enable_vtable_verify enable_serial_configure with_build_time_tools enable_maintainer_mode enable_stage1_checking enable_werror +enable_host_shared ' ac_precious_vars='build_alias host_alias @@ -1465,6 +1468,7 @@ Optional Features: disable libquadmath support for Fortran --enable-libada build libada directory --enable-libssp build libssp directory + --disable-libstdcxx do not build libstdc++-v3 directory --enable-static-libjava[=ARG] build static libjava [default=no] --enable-bootstrap enable bootstrapping [yes if native build] @@ -1478,6 +1482,7 @@ Optional Features: Mostly useful for compiler development --enable-objc-gc enable use of Boehm's garbage collector with the GNU Objective-C runtime + --enable-vtable-verify Enable vtable verification feature --enable-serial-[{host,target,build}-]configure force sequential configuration of sub-packages for the host, target or build machine, or all @@ -1489,6 +1494,7 @@ Optional Features: choose additional checking for stage1 of the compiler --enable-werror enable -Werror in bootstrap stage2 and later + --enable-host-shared build host code as shared libraries Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1515,22 +1521,22 @@ Optional Packages: --with-gmp-lib=PATH specify directory for the installed GMP library --with-host-libstdcxx=L use linker arguments L to link with libstdc++ when linking with PPL + --with-stage1-libs=LIBS libraries for stage1 --with-stage1-ldflags=FLAGS linker flags for stage1 - --with-stage1-libs=LIBS libraries for stage1 --with-boot-libs=LIBS libraries for stage2 and later --with-boot-ldflags=FLAGS linker flags for stage2 and later + --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 --with-isl=PATH Specify prefix directory for the installed ISL package. Equivalent to --with-isl-include=PATH/include plus --with-isl-lib=PATH/lib --with-isl-include=PATH Specify directory for installed ISL include files --with-isl-lib=PATH Specify the directory for the installed ISL library - --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-include=PATH Specify directory for installed CLooG include files --with-cloog-lib=PATH Specify the directory for the installed CLooG @@ -1766,6 +1772,52 @@ fi } # ac_fn_cxx_try_compile +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_cxx_try_link + # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -2722,10 +2774,12 @@ target_libraries="target-libgcc \ 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 \ @@ -2902,9 +2956,9 @@ 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*) + | *-*-solaris2* | *-*-nto* | *-*-nacl*) case "${target}" in *-*-linux*aout* | *-*-linux*oldld*) ;; @@ -2917,7 +2971,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*-*-* | tilegx*-*-*) + i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \ + | aarch64*-*-* | tilegx*-*-*) configdirs="$configdirs gold" if test x${ENABLE_GOLD} = xdefault; then default_ld=gold @@ -3028,6 +3083,17 @@ else fi +# Check whether --enable-libstdcxx was given. +if test "${enable_libstdcxx+set}" = set; then : + enableval=$enable_libstdcxx; ENABLE_LIBSTDCXX=$enableval +else + ENABLE_LIBSTDCXX=default +fi + +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 @@ -3065,22 +3131,6 @@ if test x$enable_static_libjava != xyes ; then fi -# 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. @@ -3118,6 +3168,25 @@ $as_echo "yes" >&6; } fi fi +# Disable libcilkrts on unsupported systems. +if test -d ${srcdir}/libcilkrts; then + if test x$enable_libcilkrts = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcilkrts support" >&5 +$as_echo_n "checking for libcilkrts support... " >&6; } + if (srcdir=${srcdir}/libcilkrts; \ + . ${srcdir}/configure.tgt; \ + test -n "$UNSUPPORTED") + then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + noconfigdirs="$noconfigdirs target-libcilkrts" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + fi +fi + # Disable libitm on unsupported systems. if test -d ${srcdir}/libitm; then if test x$enable_libitm = x; then @@ -3137,8 +3206,49 @@ $as_echo "yes" >&6; } fi fi +# Disable libsanitizer on unsupported systems. +if test -d ${srcdir}/libsanitizer; then + if test x$enable_libsanitizer = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsanitizer support" >&5 +$as_echo_n "checking for libsanitizer support... " >&6; } + if (srcdir=${srcdir}/libsanitizer; \ + . ${srcdir}/configure.tgt; \ + test -n "$UNSUPPORTED") + then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + noconfigdirs="$noconfigdirs target-libsanitizer" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + fi +fi + +# Disable libvtv on unsupported systems. +if test -d ${srcdir}/libvtv; then + if test x$enable_libvtv = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libvtv support" >&5 +$as_echo_n "checking for libvtv support... " >&6; } + if (srcdir=${srcdir}/libvtv; \ + . ${srcdir}/configure.tgt; \ + test "$VTV_SUPPORTED" != "yes") + then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + noconfigdirs="$noconfigdirs target-libvtv" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + 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*) @@ -3164,19 +3274,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 @@ -3188,6 +3301,8 @@ esac # Disable Java if libffi is not supported. case "${target}" in + aarch64-*-*) + ;; alpha*-*-*) ;; arm*-*-*) @@ -3329,6 +3444,23 @@ case "${target}" in ;; 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" @@ -3336,6 +3468,9 @@ case "${target}" in sh*-*-pe|mips*-*-pe|*arm-wince-pe) libgloss_dir=wince ;; + aarch64*-*-* ) + libgloss_dir=aarch64 + ;; arm*-*-*) libgloss_dir=arm ;; @@ -3469,6 +3604,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*) @@ -3494,7 +3633,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*) @@ -3503,6 +3642,13 @@ 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" ;; @@ -3637,7 +3783,7 @@ case "${target}" in microblaze*) noconfigdirs="$noconfigdirs gprof" ;; - mips*-sde-elf* | mips*-mti-elf*) + mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*) if test x$with_newlib = xyes; then noconfigdirs="$noconfigdirs gprof" fi @@ -3649,13 +3795,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) @@ -3672,7 +3828,7 @@ case "${target}" in tic6x-*-*) noconfigdirs="$noconfigdirs sim" ;; - tilepro-*-* | tilegx-*-*) + tilepro*-*-* | tilegx*-*-*) noconfigdirs="$noconfigdirs sim" ;; v810-*-*) @@ -4816,6 +4972,48 @@ 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" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5 +$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) +#error -static-libstdc++ not implemented +#endif +int main() {} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; }; have_static_libs=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + LDFLAGS="$saved_LDFLAGS" +fi + @@ -5315,7 +5513,7 @@ 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) + #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,3) choke me #endif @@ -5545,32 +5743,38 @@ case $with_host_libstdcxx in ;; esac -# Linker flags to use for stage1 or when not boostrapping. +# Libraries to use for stage1 or when not bootstrapping. -# Check whether --with-stage1-ldflags was given. -if test "${with_stage1_ldflags+set}" = set; then : - withval=$with_stage1_ldflags; if test "$withval" = "no" -o "$withval" = "yes"; then - stage1_ldflags= +# Check whether --with-stage1-libs was given. +if test "${with_stage1_libs+set}" = set; then : + withval=$with_stage1_libs; if test "$withval" = "no" -o "$withval" = "yes"; then + stage1_libs= else - stage1_ldflags=$withval + stage1_libs=$withval fi else - stage1_ldflags= + stage1_libs=$with_host_libstdcxx fi -# Libraries to use for stage1 or when not bootstrapping. +# Linker flags to use for stage1 or when not bootstrapping. -# Check whether --with-stage1-libs was given. -if test "${with_stage1_libs+set}" = set; then : - withval=$with_stage1_libs; if test "$withval" = "no" -o "$withval" = "yes"; then - stage1_libs= +# Check whether --with-stage1-ldflags was given. +if test "${with_stage1_ldflags+set}" = set; then : + withval=$with_stage1_ldflags; if test "$withval" = "no" -o "$withval" = "yes"; then + stage1_ldflags= else - stage1_libs=$withval + stage1_ldflags=$withval fi else - stage1_libs=$with_host_libstdcxx + 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 fi @@ -5612,7 +5816,15 @@ fi -# Check for ISL +# 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 + + +# Check whether --with-cloog was given. +if test "${with_cloog+set}" = set; then : + withval=$with_cloog; +fi # Check whether --with-isl was given. @@ -5621,6 +5833,13 @@ if test "${with_isl+set}" = set; then : fi +# 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 + + # Check whether --with-isl-include was given. if test "${with_isl_include+set}" = set; then : withval=$with_isl_include; @@ -5665,16 +5884,12 @@ fi isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' ' islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include' ENABLE_ISL_CHECK=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree ISL, disabling version check" >&5 +$as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;} fi - isllibs="${isllibs} -lisl" - - - -if test "x$with_isl" != "xno"; then - if test "${ENABLE_ISL_CHECK}" = yes ; then _isl_saved_CFLAGS=$CFLAGS _isl_saved_LDFLAGS=$LDFLAGS @@ -5683,14 +5898,10 @@ if test "x$with_isl" != "xno"; then CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}" LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" LIBS="${_isl_saved_LIBS} -lisl" - echo $CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.10 of ISL" >&5 $as_echo_n "checking for version 0.10 of ISL... " >&6; } -if test "${gcc_cv_isl+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : gcc_cv_isl=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5716,8 +5927,55 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5 +$as_echo "$gcc_cv_isl" >&6; } + + CFLAGS=$_isl_saved_CFLAGS + LDFLAGS=$_isl_saved_LDFLAGS + LIBS=$_isl_saved_LIBS + fi + + + if test "${gcc_cv_isl}" = no ; then + + if test "${ENABLE_ISL_CHECK}" = yes ; then + _isl_saved_CFLAGS=$CFLAGS + _isl_saved_LDFLAGS=$LDFLAGS + _isl_saved_LIBS=$LIBS + + CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}" + LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" + LIBS="${_isl_saved_LIBS} -lisl" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.11 of ISL" >&5 +$as_echo_n "checking for version 0.11 of ISL... " >&6; } + if test "$cross_compiling" = yes; then : + gcc_cv_isl=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ +if (strncmp (isl_version (), "isl-0.11", strlen ("isl-0.11")) != 0) + return 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gcc_cv_isl=yes +else + gcc_cv_isl=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5 $as_echo "$gcc_cv_isl" >&6; } CFLAGS=$_isl_saved_CFLAGS @@ -5726,8 +5984,57 @@ $as_echo "$gcc_cv_isl" >&6; } fi + if test "${gcc_cv_isl}" = no ; then + + if test "${ENABLE_ISL_CHECK}" = yes ; then + _isl_saved_CFLAGS=$CFLAGS + _isl_saved_LDFLAGS=$LDFLAGS + _isl_saved_LIBS=$LIBS + + CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}" + LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" + LIBS="${_isl_saved_LIBS} -lisl" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.12 of ISL" >&5 +$as_echo_n "checking for version 0.12 of ISL... " >&6; } + if test "$cross_compiling" = yes; then : + gcc_cv_isl=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ +if (strncmp (isl_version (), "isl-0.12", strlen ("isl-0.12")) != 0) + return 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gcc_cv_isl=yes +else + gcc_cv_isl=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5 +$as_echo "$gcc_cv_isl" >&6; } + + CFLAGS=$_isl_saved_CFLAGS + LDFLAGS=$_isl_saved_LDFLAGS + LIBS=$_isl_saved_LIBS + fi + fi + fi + @@ -5756,15 +6063,9 @@ $as_echo "$gcc_cv_isl" >&6; } fi -fi - -# Check for CLOOG - -# Check whether --with-cloog was given. -if test "${with_cloog+set}" = set; then : - withval=$with_cloog; -fi + if test "x$gcc_cv_isl" != "xno"; then + # Check for CLOOG # Check whether --with-cloog-include was given. @@ -5806,23 +6107,19 @@ fi if test "x${with_cloog_lib}" != x; then clooglibs="-L$with_cloog_lib" fi - if test "x${clooginc}" = x && test "x${clooglibs}" = x \ + if test "x${clooginc}" = x && test "x${clooglibs}" = 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 -I'${srcdir}'/cloog/include ' + ENABLE_CLOOG_CHECK=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree CLooG, disabling version check" >&5 +$as_echo "$as_me: WARNING: using in-tree CLooG, disabling version check" >&2;} fi clooginc="-DCLOOG_INT_GMP ${clooginc}" - clooglibs="${clooglibs} -lcloog-isl ${isllibs}" - - - + clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl" -if test "x$isllibs" = x && test "x$islinc" = x; then - clooglibs= - clooginc= -elif test "x$with_cloog" != "xno"; then @@ -5835,10 +6132,7 @@ elif test "x$with_cloog" != "xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.17.0 of CLooG" >&5 $as_echo_n "checking for version 0.17.0 of CLooG... " >&6; } -if test "${gcc_cv_cloog+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "cloog/version.h" int @@ -5859,8 +6153,49 @@ else gcc_cv_cloog=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog" >&5 +$as_echo "$gcc_cv_cloog" >&6; } + + CFLAGS=$_cloog_saved_CFLAGS + LDFLAGS=$_cloog_saved_LDFLAGS + fi + + + if test "${gcc_cv_cloog}" = no ; then + + + + if test "${ENABLE_CLOOG_CHECK}" = yes ; then + _cloog_saved_CFLAGS=$CFLAGS + _cloog_saved_LDFLAGS=$LDFLAGS + + CFLAGS="${_cloog_saved_CFLAGS} ${clooginc} ${islinc} ${gmpinc}" + LDFLAGS="${_cloog_saved_LDFLAGS} ${clooglibs} ${isllibs} ${gmplib}" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.18.0 of CLooG" >&5 +$as_echo_n "checking for version 0.18.0 of CLooG... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "cloog/version.h" +int +main () +{ +#if CLOOG_VERSION_MAJOR != 0 \ + || CLOOG_VERSION_MINOR != 18 \ + || CLOOG_VERSION_REVISION < 0 + choke me + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gcc_cv_cloog=yes +else + gcc_cv_cloog=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog" >&5 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog" >&5 $as_echo "$gcc_cv_cloog" >&6; } CFLAGS=$_cloog_saved_CFLAGS @@ -5868,6 +6203,7 @@ $as_echo "$gcc_cv_cloog" >&6; } fi + fi @@ -5894,18 +6230,30 @@ $as_echo "$gcc_cv_cloog" >&6; } && test "x${clooglibs}" = x \ && test "x${clooginc}" = x ; then - as_fn_error "Unable to find a usable CLooG. See config.log for details." "$LINENO" 5 + as_fn_error "Unable to find a usable CLooG. See config.log for details." "$LINENO" 5 fi + fi fi # If either the ISL or the CLooG check failed, disable builds of in-tree # variants of both -if test "x$clooglibs" = x && test "x$clooginc" = x; then +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 + + + + + # Check for LTO support. # Check whether --enable-lto was given. if test "${enable_lto+set}" = set; then : @@ -6109,6 +6457,7 @@ if test -d ${srcdir}/gcc; then boot_language=yes fi + add_this_lang=no case ,${enable_languages}, in *,${language},*) # Language was explicitly selected; include it @@ -6119,10 +6468,9 @@ if test -d ${srcdir}/gcc; then ;; *,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 @@ -6291,11 +6639,11 @@ case ,${enable_languages},:${enable_objc_gc} in ;; esac -# Disable libitm if we're not building C++ +# Disable libitm, libsanitizer, libvtv if we're not building C++ case ,${enable_languages}, in *,c++,*) ;; *) - noconfigdirs="$noconfigdirs target-libitm" + noconfigdirs="$noconfigdirs target-libcilkrts target-libitm target-libsanitizer target-libvtv" ;; esac @@ -6646,7 +6994,7 @@ case "${target}" in spu-*-*) target_makefile_frag="config/mt-spu" ;; - mips*-sde-elf* | mips*-mti-elf*) + mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*) target_makefile_frag="config/mt-sde" ;; mipsisa*-*-elfoabi*) @@ -6655,6 +7003,9 @@ 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" ;; @@ -6757,16 +7108,99 @@ 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 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default BUILD_CONFIG" >&5 +$as_echo_n "checking for default BUILD_CONFIG... " >&6; } + + +# Check whether --with-build-config was given. +if test "${with_build_config+set}" = set; then : + withval=$with_build_config; case $with_build_config in + yes) with_build_config= ;; + no) with_build_config= BUILD_CONFIG= ;; + esac +fi + + +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CONFIG" >&5 +$as_echo "$BUILD_CONFIG" >&6; } + + +# Use same top-level configure hooks in libgcc/libstdc++/libvtv. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-vtable-verify" >&5 +$as_echo_n "checking for --enable-vtable-verify... " >&6; } +# Check whether --enable-vtable-verify was given. +if test "${enable_vtable_verify+set}" = set; then : + enableval=$enable_vtable_verify; case "$enableval" in + yes) enable_vtable_verify=yes ;; + no) enable_vtable_verify=no ;; + *) enable_vtable_verify=no;; + esac +else + enable_vtable_verify=no +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_vtable_verify" >&5 +$as_echo "$enable_vtable_verify" >&6; } + # 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! @@ -6816,54 +7250,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 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default BUILD_CONFIG" >&5 -$as_echo_n "checking for default BUILD_CONFIG... " >&6; } - - -# Check whether --with-build-config was given. -if test "${with_build_config+set}" = set; then : - withval=$with_build_config; case $with_build_config in - yes) with_build_config= ;; - no) with_build_config= BUILD_CONFIG= ;; - esac -fi - - -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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CONFIG" >&5 -$as_echo "$BUILD_CONFIG" >&6; } - - extrasub_build= for module in ${build_configdirs} ; do if test -z "${no_recursion}" \ @@ -6887,11 +7273,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 @@ -7155,6 +7545,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 + as_fn_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." "$LINENO" 5 + fi + ;; +esac + # Default to --enable-multilib. if test x${enable_multilib} = x ; then target_configargs="--enable-multilib ${target_configargs}" @@ -7187,7 +7597,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 @@ -13482,7 +13892,7 @@ else esac if test $ok = yes; then # An in-tree tool is available and we can use it - CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/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' + CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/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' { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5 $as_echo "just compiled" >&6; } elif expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then @@ -13527,7 +13937,7 @@ else esac if test $ok = yes; then # An in-tree tool is available and we can use it - RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/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' + RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/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' { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5 $as_echo "just compiled" >&6; } elif expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then @@ -14231,6 +14641,16 @@ case ${enable_werror} in esac +# Enable --enable-host-shared. +# Check whether --enable-host-shared was given. +if test "${enable_host_shared+set}" = set; then : + enableval=$enable_host_shared; host_shared=$enableval +else + host_shared=no +fi + + + # Specify what files to not compare during bootstrap. compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"