X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=configure;h=28f0913bdd4a5909b9ce60cb06f72cc9d4f7b8c1;hb=546bf79bd72df0e024323345a5d08f9ceba513f6;hp=8899a67040b35fce0abf81153d6fd0dd14001b1b;hpb=04711f5189a72c2fcaeed520d65582704adca042;p=thirdparty%2Fgcc.git diff --git a/configure b/configure index 8899a67040b3..28f0913bdd4a 100755 --- a/configure +++ b/configure @@ -613,12 +613,16 @@ DSYMUTIL_FOR_TARGET DLLTOOL_FOR_TARGET AS_FOR_TARGET AR_FOR_TARGET +GM2_FOR_TARGET GDC_FOR_TARGET GOC_FOR_TARGET GFORTRAN_FOR_TARGET GCC_FOR_TARGET CXX_FOR_TARGET CC_FOR_TARGET +RANLIB_PLUGIN_OPTION +AR_PLUGIN_OPTION +PKG_CONFIG_PATH GDCFLAGS READELF OTOOL @@ -685,7 +689,11 @@ get_gcc_base_ver extra_host_zlib_configure_flags extra_host_libiberty_configure_flags stage1_languages +host_libs_picflag +PICFLAG host_shared +gcc_host_pie +host_pie extra_linker_plugin_flags extra_linker_plugin_configure_flags islinc @@ -793,15 +801,20 @@ ac_user_opts=' enable_option_checking with_build_libsubdir with_system_zlib +with_zstd enable_as_accelerator_for enable_offload_targets enable_offload_defaulted enable_gold enable_ld +enable_gprofng enable_compressed_debug_sections +enable_default_compressed_debug_sections_algorithm +enable_year2038 enable_libquadmath enable_libquadmath_support enable_libada +enable_libgm2 enable_libssp enable_libstdcxx enable_bootstrap @@ -827,6 +840,7 @@ enable_isl_version_check enable_lto enable_linker_plugin_configure_flags enable_linker_plugin_flags +enable_host_pie enable_host_shared enable_stage1_languages enable_objc_gc @@ -879,6 +893,7 @@ GCC_FOR_TARGET GFORTRAN_FOR_TARGET GOC_FOR_TARGET GDC_FOR_TARGET +GM2_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET @@ -1532,13 +1547,19 @@ Optional Features: --enable-gold[=ARG] build gold [ARG={default,yes,no}] --enable-ld[=ARG] build ld [ARG={default,yes,no}] + --enable-gprofng[=ARG] build gprofng [ARG={yes,no}] --enable-compressed-debug-sections={all,gas,gold,ld,none} Enable compressed debug sections for gas, gold or ld by default + --enable-default-compressed-debug-sections-algorithm={zlib,zstd} + Default compression algorithm for + --enable-compressed-debug-sections. + --enable-year2038 enable support for timestamps past the year 2038 --disable-libquadmath do not build libquadmath directory --disable-libquadmath-support disable libquadmath support for Fortran --enable-libada build libada directory + --enable-libgm2 build libgm2 directory --enable-libssp build libssp directory --disable-libstdcxx do not build libstdc++-v3 directory --enable-bootstrap enable bootstrapping [yes if native build] @@ -1553,6 +1574,7 @@ Optional Features: --enable-linker-plugin-flags=FLAGS additional flags for configuring and building linker plugins [none] + --enable-host-pie build position independent host executables --enable-host-shared build host code as shared libraries --enable-stage1-languages[=all] choose additional languages to build during stage1. @@ -1577,6 +1599,8 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-build-libsubdir=DIR Directory where to find libraries for build system --with-system-zlib use installed libz + --with-zstd Support zstd compressed debug sections + (default=auto) --with-mpc=PATH specify prefix directory for installed MPC package. Equivalent to --with-mpc-include=PATH/include plus --with-mpc-lib=PATH/lib @@ -1673,6 +1697,8 @@ Some influential environment variables: GOC for the target GDC_FOR_TARGET GDC for the target + GM2_FOR_TARGET + GM2 for the target AR_FOR_TARGET AR for the target AS_FOR_TARGET @@ -2803,7 +2829,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 #f -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libiconv libctf" +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libiconv libctf libsframe" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to @@ -2811,7 +2837,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr # binutils, gas and ld appear in that order because it makes sense to run # "make check" in that particular order. # If --enable-gold is used, "gold" may replace "ld". -host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools c++tools" +host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gm2tools gotools c++tools" # these libraries are built for the target environment, and are built after # the host libraries and the host tools (which may be a cross compiler) @@ -2832,6 +2858,7 @@ target_libraries="target-libgcc \ target-libffi \ target-libobjc \ target-libada \ + target-libgm2 \ target-libgo \ target-libphobos \ target-zlib" @@ -2947,6 +2974,13 @@ if test x$with_system_readline = xyes ; then noconfigdirs="$noconfigdirs readline" fi + +# Check whether --with-zstd was given. +if test "${with_zstd+set}" = set; then : + withval=$with_zstd; +fi + + # some tools are so dependent upon X11 that if we're not building with X, # it's not even worth trying to configure, much less build, that tool. @@ -3043,7 +3077,7 @@ case "${ENABLE_GOLD}" in *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \ | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \ | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \ - | *-*-solaris2* | *-*-nto* | *-*-nacl*) + | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-haiku*) case "${target}" in *-*-linux*aout* | *-*-linux*oldld*) ;; @@ -3057,7 +3091,7 @@ case "${ENABLE_GOLD}" in # Check for target supported by gold. case "${target}" in i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \ - | aarch64*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*) + | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*) configdirs="$configdirs gold" if test x${ENABLE_GOLD} = xdefault; then default_ld=gold @@ -3102,6 +3136,22 @@ $as_echo "$as_me: WARNING: neither ld nor gold are enabled" >&2;} ;; esac +# Check whether --enable-gprofng was given. +if test "${enable_gprofng+set}" = set; then : + enableval=$enable_gprofng; enable_gprofng=$enableval +else + enable_gprofng=yes +fi + +if test "$enable_gprofng" = "yes"; then + case "${target}" in + x86_64-*-linux* | i?86-*-linux* | aarch64-*-linux*) + configdirs="$configdirs gprofng" + ;; + esac +fi + + # PR gas/19109 # Decide the default method for compressing debug sections. # Provide a configure time option to override our default. @@ -3117,6 +3167,15 @@ else fi +# Select default compression algorithm. +# Check whether --enable-default_compressed_debug_sections_algorithm was given. +if test "${enable_default_compressed_debug_sections_algorithm+set}" = set; then : + enableval=$enable_default_compressed_debug_sections_algorithm; +else + default_compressed_debug_sections_algorithm= +fi + + # Configure extra directories which are host specific case "${host}" in @@ -3138,6 +3197,20 @@ case "${host}" in ;; esac +# Default to --disable-year2038 until we can handle differences between +# projects that use gnulib (which understands year 2038) and projects that +# do not (like BFD). +# Check whether --enable-year2038 was given. +if test "${enable_year2038+set}" = set; then : + enableval=$enable_year2038; ENABLE_YEAR2038=$enableval +else + ENABLE_YEAR2038=no +fi + +enable_year2038= +if test "${ENABLE_YEAR2038}" = "no" ; then + enable_year2038=no +fi # Check whether --enable-libquadmath was given. if test "${enable_libquadmath+set}" = set; then : @@ -3175,6 +3248,17 @@ if test "${ENABLE_LIBADA}" != "yes" ; then noconfigdirs="$noconfigdirs gnattools" fi +# Check whether --enable-libgm2 was given. +if test "${enable_libgm2+set}" = set; then : + enableval=$enable_libgm2; ENABLE_LIBGM2=$enableval +else + ENABLE_LIBGM2=no +fi + +if test "${ENABLE_LIBGM2}" != "yes" ; then + noconfigdirs="$noconfigdirs gm2tools" +fi + # Check whether --enable-libssp was given. if test "${enable_libssp+set}" = set; then : enableval=$enable_libssp; ENABLE_LIBSSP=$enableval @@ -3488,6 +3572,11 @@ case "${target}" in hppa*64*-*-hpux*) noconfigdirs="$noconfigdirs target-libffi" ;; + hppa*-hp-hpux11*) + ;; + hppa*-*-hpux*) + noconfigdirs="$noconfigdirs target-libffi" + ;; ia64*-*-*vms*) noconfigdirs="$noconfigdirs target-libffi" ;; @@ -3794,9 +3883,14 @@ case "${target}" in h8500-*-*) noconfigdirs="$noconfigdirs target-libgloss" ;; + hppa1.1-*-osf* | hppa1.1-*-bsd* ) + ;; hppa*64*-*-hpux*) noconfigdirs="$noconfigdirs gdb" ;; + hppa*-*-hpux11*) + noconfigdirs="$noconfigdirs gdb ld" + ;; hppa*64*-*-linux*) ;; hppa*-*-linux*) @@ -3951,6 +4045,9 @@ case "${target}" in tic6x-*-*) noconfigdirs="$noconfigdirs sim" ;; + tilepro*-*-* | tilegx*-*-*) + noconfigdirs="$noconfigdirs sim" + ;; v810-*-*) noconfigdirs="$noconfigdirs bfd binutils gas gdb ld opcodes target-libgloss" ;; @@ -7887,7 +7984,22 @@ _ACEOF # Check for GMP, MPFR and MPC -gmplibs="-lmpc -lmpfr -lgmp" +require_gmp=no +require_mpc=no +if test -d ${srcdir}/gcc ; then + require_gmp=yes + require_mpc=yes +fi +if test -d ${srcdir}/gdb ; then + if test "x$enable_gdb" != xno; then + require_gmp=yes + fi +fi + +gmplibs="-lmpfr -lgmp" +if test x"$require_mpc" = "xyes" ; then + gmplibs="-lmpc $gmplibs" +fi gmpinc= have_gmp=no @@ -8022,7 +8134,7 @@ if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; have_gmp=yes fi -if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then +if test "x$require_gmp" = xyes && test "x$have_gmp" = xno; then have_gmp=yes saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $gmpinc" @@ -8132,7 +8244,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # Check for the MPC header version. - if test x"$have_gmp" = xyes ; then + if test "x$require_mpc" = xyes && test x"$have_gmp" = xyes ; then # Check for the recommended and required versions of MPC. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of mpc.h" >&5 $as_echo_n "checking for the correct version of mpc.h... " >&6; } @@ -8186,18 +8298,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x"$have_gmp" = xyes; then saved_LIBS="$LIBS" LIBS="$LIBS $gmplibs" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of the gmp/mpfr/mpc libraries" >&5 -$as_echo_n "checking for the correct version of the gmp/mpfr/mpc libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of the gmp/mpfr libraries" >&5 +$as_echo_n "checking for the correct version of the gmp/mpfr libraries... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int main () { mpfr_t n; mpfr_t x; - mpc_t c; int t; mpfr_init (n); mpfr_init (x); @@ -8206,6 +8317,37 @@ main () mpfr_subnormalize (x, t, MPFR_RNDN); mpfr_clear(n); mpfr_clear(x); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; have_gmp=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$saved_LIBS" + fi + + # Now check the MPC library + if test "x$require_mpc" = xyes && test x"$have_gmp" = xyes; then + saved_LIBS="$LIBS" + LIBS="$LIBS $gmplibs" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of the mpc libraries" >&5 +$as_echo_n "checking for the correct version of the mpc libraries... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + mpc_t c; mpc_init2 (c, 53); mpc_set_ui_ui (c, 1, 1, MPC_RNDNN); mpc_cosh (c, c, MPC_RNDNN); @@ -8234,7 +8376,8 @@ rm -f core conftest.err conftest.$ac_objext \ # The library versions listed in the error message below should match # the HARD-minimums enforced above. if test x$have_gmp != xyes; then - as_fn_error $? "Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+. + if test -d ${srcdir}/gcc ; then + as_fn_error $? "Building GCC requires GMP 4.2+, MPFR 3.1.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 @@ -8243,6 +8386,13 @@ http://gcc.gnu.org/install/prerequisites.html for additional info. If you obtained GMP, MPFR and/or MPC from a vendor distribution package, make sure that you have installed both the libraries and the header files. They may be located in separate packages." "$LINENO" 5 + else + as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. +Try the --with-gmp and/or --with-mpfr options to specify +their locations. If you obtained GMP and/or MPFR from a vendor +distribution package, make sure that you have installed both the libraries +and the header files. They may be located in separate packages." "$LINENO" 5 + fi fi fi @@ -8573,6 +8723,39 @@ fi +# Handle --enable-host-pie +# If host PIE executables are the default (or must be forced on) for some host, +# we must pass that configuration to the gcc directory. +gcc_host_pie= +# Check whether --enable-host-pie was given. +if test "${enable_host_pie+set}" = set; then : + enableval=$enable_host_pie; host_pie=$enableval + case $host in + *-*-darwin2*) + if test x$host_pie != xyes ; then + # for Darwin20+ this is required. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIE executables are required for the configured host, host-pie setting ignored." >&5 +$as_echo "$as_me: WARNING: PIE executables are required for the configured host, host-pie setting ignored." >&2;} + host_pie=yes + gcc_host_pie=--enable-host-pie + fi ;; + *) ;; + esac +else + case $host in + *-*-darwin2*) + # Default to PIE (mandatory for aarch64). + host_pie=yes + gcc_host_pie=--enable-host-pie + ;; + *) host_pie=no ;; + esac +fi + + + + + # Enable --enable-host-shared. # Checked early to determine whether jit is an 'all' language # Check whether --enable-host-shared was given. @@ -8582,20 +8765,61 @@ if test "${enable_host_shared+set}" = set; then : x86_64-*-darwin* | aarch64-*-darwin*) if test x$host_shared != xyes ; then # PIC is the default, and actually cannot be switched off. - echo configure.ac: warning: PIC code is required for the configured target, host-shared setting ignored. 1>&2 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIC code is required for the configured host; host-shared setting ignored." >&5 +$as_echo "$as_me: WARNING: PIC code is required for the configured host; host-shared setting ignored." >&2;} + host_shared=yes + fi ;; + *-*-darwin*) + if test x$host_pie = xyes -a x$host_shared != xyes ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PIC code is required for PIE host executables host-shared setting ignored." >&5 +$as_echo "$as_me: WARNING: PIC code is required for PIE host executables host-shared setting ignored." >&2;} host_shared=yes fi ;; *) ;; esac else case $host in + # 64B x86_64 and Aarch64 Darwin default to PIC. x86_64-*-darwin* | aarch64-*-darwin*) host_shared=yes ;; - *) host_shared=no ;; + # 32B and powerpc64 Darwin must use PIC to link PIE exes. + *-*-darwin*) host_shared=$host_pie ;; + *) host_shared=no;; esac fi + +if test x$host_shared = xyes; then + case $host in + *-*-darwin*) + # Since host shared is the default for 64b Darwin, and also enabled for + # host_pie, ensure that we present the PIE flag when host_pie is active. + if test x$host_pie = xyes; then + PICFLAG=-fPIE + fi + ;; + *) + PICFLAG=-fPIC + ;; + esac +elif test x$host_pie = xyes; then + PICFLAG=-fPIE +else + PICFLAG= +fi + + + +# If we are building PIC/PIE host executables, and we are building dependent +# libs (e.g. GMP) in-tree those libs need to be configured to generate PIC +# code. +host_libs_picflag= +if test "$host_shared" = "yes" -o "$host_pie" = "yes"; then +host_libs_picflag='--with-pic' +fi + + # By default, C and C++ are the only stage 1 languages. stage1_languages=,c, @@ -9836,7 +10060,9 @@ esac # These force 'configure's to be done one at a time, to avoid problems # with contention over a shared config.cache. rm -f serdep.tmp +if test "x${enable_serial_build_configure}" = xyes || test "x${enable_serial_host_configure}" = xyes || test "x${enable_serial_target_configure}" = xyes; then echo '# serdep.tmp' > serdep.tmp +fi olditem= test "x${enable_serial_build_configure}" = xyes && for item in ${build_configdirs} ; do @@ -10016,9 +10242,15 @@ if test "$silent" = yes; then baseargs="$baseargs --silent" tbaseargs="$tbaseargs --silent" fi + baseargs="$baseargs --disable-option-checking" tbaseargs="$tbaseargs --disable-option-checking" +if test "$enable_year2038" = no; then + baseargs="$baseargs --disable-year2038" + tbaseargs="$tbaseargs --disable-year2038" +fi + # Record and document user additions to sub configure arguments. @@ -12794,6 +13026,148 @@ fi +GDCFLAGS=${GDCFLAGS-${CFLAGS}} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } + +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test "${AR}" = "" ; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 +fi +touch conftest.c +${AR} $plugin_option rc conftest.a conftest.c +if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= +fi +rm -f conftest.* +if test -n "$plugin_option"; then + PLUGIN_OPTION="$plugin_option" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +AR_PLUGIN_OPTION= +RANLIB_PLUGIN_OPTION= +if test -n "$PLUGIN_OPTION"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR_PLUGIN_OPTION="$PLUGIN_OPTION" + fi + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION" + fi +fi + + # Target tools. @@ -13775,6 +14149,167 @@ fi +if test -n "$GM2_FOR_TARGET"; then + ac_cv_prog_GM2_FOR_TARGET=$GM2_FOR_TARGET +elif test -n "$ac_cv_prog_GM2_FOR_TARGET"; then + GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET +fi + +if test -n "$ac_cv_prog_GM2_FOR_TARGET"; then + for ncn_progname in gm2; do + # Extract the first word of "${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_progname}; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GM2_FOR_TARGET"; then + ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET +if test -n "$GM2_FOR_TARGET"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5 +$as_echo "$GM2_FOR_TARGET" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + done +fi + +if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test -n "$with_build_time_tools"; then + for ncn_progname in gm2; do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5 +$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; } + if test -x $with_build_time_tools/${ncn_progname}; then + ac_cv_prog_GM2_FOR_TARGET=$with_build_time_tools/${ncn_progname} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + break + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + done +fi + +if test -z "$ac_cv_prog_GM2_FOR_TARGET"; then + for ncn_progname in gm2; do + if test -n "$ncn_target_tool_prefix"; then + # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GM2_FOR_TARGET"; then + ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GM2_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET +if test -n "$GM2_FOR_TARGET"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5 +$as_echo "$GM2_FOR_TARGET" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test $build = $target ; then + # Extract the first word of "${ncn_progname}", so it can be a program name with args. +set dummy ${ncn_progname}; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GM2_FOR_TARGET"; then + ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET +if test -n "$GM2_FOR_TARGET"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5 +$as_echo "$GM2_FOR_TARGET" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + test -n "$ac_cv_prog_GM2_FOR_TARGET" && break + done +fi + +if test -z "$ac_cv_prog_GM2_FOR_TARGET" ; then + set dummy gm2 + if test $build = $target ; then + GM2_FOR_TARGET="$2" + else + GM2_FOR_TARGET="${ncn_target_tool_prefix}$2" + fi +else + GM2_FOR_TARGET="$ac_cv_prog_GM2_FOR_TARGET" +fi + + + cat > conftest.c << \EOF #ifdef __GNUC__ gcc_yay; @@ -17707,6 +18242,51 @@ $as_echo "pre-installed" >&6; } fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gm2" >&5 +$as_echo_n "checking where to find the target gm2... " >&6; } +if test "x${build}" != "x${host}" ; then + if expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + ac_dir=`dirname $GM2_FOR_TARGET` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5 +$as_echo "pre-installed in $ac_dir" >&6; } + else + # Canadian cross, just use what we found + { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5 +$as_echo "pre-installed" >&6; } + fi +else + ok=yes + case " ${configdirs} " in + *" gcc "*) ;; + *) ok=no ;; + esac + case ,${enable_languages}, in + *,m2,*) ;; + *) ok=no ;; + esac + if test $ok = yes; then + # An in-tree tool is available and we can use it + GM2_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gm2 -B$$r/$(HOST_SUBDIR)/gcc/' + { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5 +$as_echo "just compiled" >&6; } + elif expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then + # We already found the complete path + ac_dir=`dirname $GM2_FOR_TARGET` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5 +$as_echo "pre-installed in $ac_dir" >&6; } + elif test "x$target" = "x$host"; then + # We can use an host tool + GM2_FOR_TARGET='$(GM2)' + { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5 +$as_echo "host tool" >&6; } + else + # We need a cross tool + { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5 +$as_echo "pre-installed" >&6; } + fi +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ld" >&5 $as_echo_n "checking where to find the target ld... " >&6; } if test "x${build}" != "x${host}" ; then @@ -18268,6 +18848,9 @@ fi # Specify what files to not compare during bootstrap. compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*" +compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*" +compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*" +compare_exclusions="$compare_exclusions | gcc/m2/gm2version*" case "$target" in hppa*64*-*-hpux*) ;; powerpc*-ibm-aix*) compare_exclusions="$compare_exclusions | *libgomp*\$(objext)" ;;