X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure;h=87677bc2169f9dda29db68a358857fd802771066;hb=8fa234ceed4ff050d6073e7e49f23600e50f7133;hp=4d9fc2a4e0e37e769f333c9fcf45038d880636f6;hpb=a882be685b00546c352592a4e7a17472fea8e7f8;p=platform%2Fupstream%2Fbinutils.git diff --git a/configure b/configure index 4d9fc2a..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 @@ -749,6 +750,7 @@ enable_libquadmath enable_libquadmath_support enable_libada enable_libssp +enable_libstdcxx enable_static_libjava enable_bootstrap with_mpc @@ -781,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 @@ -1464,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] @@ -1477,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 @@ -1488,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] @@ -2767,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 \ @@ -2947,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*) ;; @@ -2962,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 @@ -3073,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 @@ -3110,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. @@ -3163,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 @@ -3182,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*) @@ -3208,27 +3273,23 @@ case "${target}" in ;; esac -# Disable libquadmath for some systems. -case "${target}" in - avr-*-*) - noconfigdirs="$noconfigdirs target-libquadmath" - ;; -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 @@ -3240,6 +3301,8 @@ esac # Disable Java if libffi is not supported. case "${target}" in + aarch64-*-*) + ;; alpha*-*-*) ;; arm*-*-*) @@ -3381,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" @@ -3388,6 +3468,9 @@ case "${target}" in sh*-*-pe|mips*-*-pe|*arm-wince-pe) libgloss_dir=wince ;; + aarch64*-*-* ) + libgloss_dir=aarch64 + ;; arm*-*-*) libgloss_dir=arm ;; @@ -3521,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*) @@ -3546,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*) @@ -3696,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 @@ -3708,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) @@ -3731,7 +3828,7 @@ case "${target}" in tic6x-*-*) noconfigdirs="$noconfigdirs sim" ;; - tilepro-*-* | tilegx-*-*) + tilepro*-*-* | tilegx*-*-*) noconfigdirs="$noconfigdirs sim" ;; v810-*-*) @@ -5787,6 +5884,8 @@ 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 @@ -5799,14 +5898,10 @@ fi 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 @@ -5832,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 +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 "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5 $as_echo "$gcc_cv_isl" >&6; } CFLAGS=$_isl_saved_CFLAGS @@ -5842,6 +5984,56 @@ $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 @@ -5915,10 +6107,13 @@ 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}" @@ -5937,10 +6132,7 @@ fi { $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 @@ -5961,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 @@ -5970,6 +6203,7 @@ $as_echo "$gcc_cv_cloog" >&6; } fi + fi @@ -6405,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 @@ -6760,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*) @@ -6769,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" ;; @@ -6871,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! @@ -6930,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}" \ @@ -7001,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 @@ -7269,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}" @@ -7301,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 @@ -13596,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 @@ -13641,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 @@ -14345,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/*"