X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fconfigure;h=2da771427d77ae65791597f1e83469f9709cc122;hb=e6013c28be3801b34d7a1b6f95b42f2544375b28;hp=27962d5402f3a35044e686a1af5039caa6f10824;hpb=f3f006ad3e96de5657e8032c14fcb4f7eaf5e931;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/configure b/gcc/configure index 27962d5402f..2da771427d7 100755 --- a/gcc/configure +++ b/gcc/configure @@ -602,8 +602,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS enable_plugin pluginlibs -LIBELFINC -LIBELFLIBS CLOOGINC CLOOGLIBS PPLINC @@ -623,7 +621,8 @@ tm_p_file_list tm_defines tm_include_list tm_file_list -thread_file +common_out_object_file +common_out_file out_object_file out_file objc_boehm_gc @@ -643,7 +642,6 @@ gcc_config_arguments float_h_file extra_programs extra_passes -extra_parts extra_objs extra_headers_list user_headers_inc_next_post @@ -669,11 +667,8 @@ all_gtfiles all_compilers srcdir subdirs -slibdir dollar gcc_tooldir -LTO_USE_LIBELF -LTO_BINARY_READER enable_lto MAINT zlibinc @@ -692,7 +687,6 @@ ORIGINAL_AS_FOR_TARGET gcc_cv_as enable_fast_install objdir -CXXCPP OTOOL64 OTOOL LIPO @@ -729,15 +723,17 @@ LIBINTL USE_NLS extra_opt_files extra_modes_file -gthread_flags +NATIVE_SYSTEM_HEADER_DIR objext manext LIBICONV_DEP LTLIBICONV LIBICONV LDEXP_LIB +EXTRA_GCC_LIBS GNAT_LIBEXC COLLECT2_LIBS +CXXCPP AR NM BISON @@ -763,6 +759,7 @@ CONFIGURE_SPECS CROSS_SYSTEM_HEADER_DIR TARGET_SYSTEM_ROOT_DEFINE TARGET_SYSTEM_ROOT +SYSROOT_CFLAGS_FOR_TARGET enable_shared enable_fixed_point enable_decimal_float @@ -774,6 +771,7 @@ valgrind_path_defines valgrind_path TREEBROWSER nocommon_flag +noexception_flags warn_cxxflags warn_cflags c_strict_warn @@ -783,6 +781,7 @@ loose_warn EGREP GREP CPP +PICFLAG_FOR_TARGET OUTPUT_OPTION NO_MINUS_C_MINUS_O GNATMAKE @@ -853,7 +852,8 @@ PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' -ac_subst_files='language_hooks' +ac_subst_files='option_includes +language_hooks' ac_user_opts=' enable_option_checking with_build_libsubdir @@ -866,6 +866,7 @@ with_ld with_demangler_in_ld with_gnu_as with_as +enable_largefile enable_werror_always enable_checking enable_coverage @@ -881,6 +882,7 @@ enable_tls enable_objc_gc with_dwarf2 enable_shared +with_native_system_header_dir with_build_sysroot with_sysroot with_specs @@ -892,7 +894,6 @@ enable_rpath with_libiconv_prefix enable_initfini_array enable_sjlj_exceptions -with_system_libunwind enable_secureplt enable_leading_mingw64_underscores enable_cld @@ -912,8 +913,9 @@ with_gc with_system_zlib enable_maintainer_mode enable_version_specific_runtime_libs -with_slibdir enable_plugin +enable_libquadmath_support +with_linker_hash_style ' ac_precious_vars='build_alias host_alias @@ -933,9 +935,7 @@ GMPINC PPLLIBS PPLINC CLOOGLIBS -CLOOGINC -LIBELFLIBS -LIBELFINC' +CLOOGINC' # Initialize some variables set by options. @@ -1555,23 +1555,24 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-generated-files-in-srcdir - put copies of generated files in source dir - intended for creating source tarballs for users - without texinfo bison or flex. + put copies of generated files in source dir intended + for creating source tarballs for users without + texinfo bison or flex + --disable-largefile omit support for large files --enable-werror-always enable -Werror despite compiler version - --enable-checking=LIST - enable expensive run-time checks. With LIST, - enable only specific categories of checks. - Categories are: yes,no,all,none,release. - Flags are: assert,df,fold,gc,gcac,gimple,misc, - rtlflag,rtl,runtime,tree,valgrind,types. - --enable-coverage=LEVEL - enable compiler's code coverage collection. - Use to measure compiler performance and locate - unused parts of the compiler. With LEVEL, specify - optimization. Values are opt, noopt, - default is noopt - --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering + --enable-checking[=LIST] + enable expensive run-time checks. With LIST, enable + only specific categories of checks. Categories are: + yes,no,all,none,release. Flags are: + assert,df,fold,gc,gcac,gimple,misc, + rtlflag,rtl,runtime,tree,valgrind,types + --enable-coverage[=LEVEL] + enable compiler's code coverage collection. Use to + measure compiler performance and locate unused parts + of the compiler. With LEVEL, specify optimization. + Values are opt, noopt, default is noopt + --enable-gather-detailed-mem-stats + enable detailed memory allocation stats gathering --enable-build-with-cxx build with C++ compiler instead of C compiler --enable-multilib enable library support for multiple ABIs --enable-__cxa_atexit enable __cxa_atexit for C++ @@ -1580,12 +1581,12 @@ Optional Features: or 'dpd' choses which decimal floating point format to use --enable-fixed-point enable fixed-point arithmetic extension to C - --enable-threads enable thread usage for target GCC - --enable-threads=LIB use LIB thread package for target GCC - --enable-tls enable or disable generation of tls code - overriding the assembler check for tls support - --enable-objc-gc enable the use of Boehm's garbage collector with - the GNU Objective-C runtime + --enable-threads[=LIB] enable thread usage for target GCC, using LIB thread + package + --enable-tls enable or disable generation of tls code overriding + the assembler check for tls support + --enable-objc-gc enable the use of Boehm's garbage collector with the + GNU Objective-C runtime --disable-shared don't provide a shared libgcc --enable-languages=LIST specify which front-ends to build --disable-rpath do not hardcode runtime library paths @@ -1594,12 +1595,13 @@ Optional Features: arrange to use setjmp/longjmp exception handling --enable-secureplt enable -msecure-plt by default for PowerPC --enable-leading-mingw64-underscores - Enable leading underscores on 64 bit mingw targets + enable leading underscores on 64 bit mingw targets --enable-cld enable -mcld by default for 32bit x86 - --enable-frame-pointer enable -fno-omit-frame-pointer by default for 32bit x86 + --enable-frame-pointer enable -fno-omit-frame-pointer by default for 32bit + x86 --disable-win32-registry - disable lookup of installation paths in the - Registry on Windows hosts + disable lookup of installation paths in the Registry + on Windows hosts --enable-win32-registry enable registry lookup (default) --enable-win32-registry=KEY use KEY instead of GCC version as the last portion @@ -1613,17 +1615,20 @@ Optional Features: enable the use of the @gnu_indirect_function to glibc systems --enable-comdat enable COMDAT group support - --enable-gnu-unique-object enable the use of the @gnu_unique_object ELF extension on - glibc systems + --enable-gnu-unique-object + enable the use of the @gnu_unique_object ELF + extension on glibc systems --enable-linker-build-id compiler will always pass --build-id to linker --enable-maintainer-mode - enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer --enable-version-specific-runtime-libs - specify that runtime libraries should be - installed in a compiler-specific directory + specify that runtime libraries should be installed + in a compiler-specific directory --enable-plugin enable plugin support + --disable-libquadmath-support + disable libquadmath support for Fortran Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1635,33 +1640,36 @@ Optional Packages: --with-cpp-install-dir=DIR install the user visible C preprocessor in DIR (relative to PREFIX) as well as PREFIX/bin - --with-gnu-ld arrange to work with GNU ld. + --with-gnu-ld arrange to work with GNU ld --with-ld arrange to use the specified ld (full pathname) - --with-demangler-in-ld try to use demangler in GNU ld. + --with-demangler-in-ld try to use demangler in GNU ld --with-gnu-as arrange to work with GNU as --with-as arrange to use the specified as (full pathname) --with-stabs arrange to use stabs instead of host debug format --with-dwarf2 force the default debug format to be DWARF 2 + --with-native-system-header-dir=dir + use dir as the directory to look for standard + system header files in. Defaults to /usr/include. --with-build-sysroot=sysroot use sysroot as the system root during the build - --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. + --with-sysroot[=DIR] search for usr/lib, usr/include, et al, within DIR --with-specs=SPECS add SPECS to driver command-line processing --with-pkgversion=PKG Use PKG in the version string in place of "GCC" --with-bugurl=URL Direct users to URL to report a bug - --with-multilib-list Select multilibs (SH only) + --with-multilib-list select multilibs (SH and x86-64 only) --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir - --with-system-libunwind use installed libunwind --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-plugin-ld=[ARG] specify the plugin linker - --with-long-double-128 Use 128-bit long double by default. - --with-gc={page,zone} choose the garbage collection mechanism to use - with the compiler + --with-long-double-128 use 128-bit long double by default + --with-gc={page,zone} choose the garbage collection mechanism to use with + the compiler --with-system-zlib use installed libz - --with-slibdir=DIR shared libraries in DIR [LIBDIR] + --with-linker-hash-style={sysv,gnu,both} + specify the linker hash style Some influential environment variables: CC C compiler command @@ -1681,8 +1689,6 @@ Some influential environment variables: PPLINC How to find PPL include files CLOOGLIBS How to link CLOOG CLOOGINC How to find CLOOG include files - LIBELFLIBS How to link libelf - LIBELFINC How to find libelf include files Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -2467,6 +2473,72 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_header_preproc +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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; } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_check_header_preproc LINENO HEADER VAR +# ------------------------------------------------ +# Tests whether HEADER is present, setting the cache variable VAR accordingly. +ac_fn_cxx_check_header_preproc () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_cxx_check_header_preproc + # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -2534,43 +2606,6 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -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_cpp conftest.$ac_ext") 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; } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval - -} # ac_fn_cxx_try_cpp - # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -3377,7 +3412,7 @@ fi if test "${with_demangler_in_ld+set}" = set; then : withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld" else - demangler_in_ld=no + demangler_in_ld=yes fi @@ -4838,6 +4873,88 @@ case "$CC" in esac +# Determine PICFLAG for target gnatlib. + + + + +case "${target}" in + # PIC is the default on some targets or must not be used. + *-*-darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + PICFLAG_FOR_TARGET=-fno-common + ;; + alpha*-dec-osf5*) + # PIC is the default. + ;; + hppa*64*-*-hpux*) + # PIC is the default for 64-bit PA HP-UX. + ;; + i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*) + ;; + i[34567]86-*-interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + i[34567]86-*-nto-qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + PICFLAG_FOR_TARGET='-fPIC -shared' + ;; + i[34567]86-pc-msdosdjgpp*) + # DJGPP does not support shared libraries at all. + ;; + ia64*-*-hpux*) + # On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + PICFLAG_FOR_TARGET=-fPIC + ;; + mips-sgi-irix6*) + # PIC is the default. + ;; + rs6000-ibm-aix* | powerpc-ibm-aix*) + # All AIX code is PIC. + ;; + + # Some targets support both -fPIC and -fpic, but prefer the latter. + # FIXME: Why? + i[34567]86-*-* | x86_64-*-*) + PICFLAG_FOR_TARGET=-fpic + ;; + m68k-*-*) + PICFLAG_FOR_TARGET=-fpic + ;; + s390*-*-*) + PICFLAG_FOR_TARGET=-fpic + ;; + # FIXME: Override -fPIC default in libgcc only? + sh-*-linux* | sh[2346lbe]*-*-linux*) + PICFLAG_FOR_TARGET=-fpic + ;; + # FIXME: Simplify to sh*-*-netbsd*? + sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ + sh64-*-netbsd* | sh64l*-*-netbsd*) + PICFLAG_FOR_TARGET=-fpic + ;; + # Default to -fPIC unless specified otherwise. + *) + PICFLAG_FOR_TARGET=-fPIC + ;; +esac + +# If the user explicitly uses -fpic/-fPIC, keep that. +case "${CFLAGS_FOR_TARGET}" in + *-fpic*) + PICFLAG_FOR_TARGET=-fpic + ;; + *-fPIC*) + PICFLAG_FOR_TARGET=-fPIC + ;; +esac + + + # ------------------------- # Check C compiler features # ------------------------- @@ -5482,6 +5599,205 @@ _ACEOF esac +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi +fi + + # sizeof(char) is 1 by definition. # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects @@ -6079,11 +6395,12 @@ fi # * 'long long' # * variadic macros # * overlong strings +# * C++11 narrowing conversions in { } # So, we only use -pedantic if we can disable those warnings. loose_warn= save_CFLAGS="$CFLAGS" -for option in -W -Wall -Wwrite-strings -Wcast-qual; do +for option in -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual; do as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 @@ -6297,18 +6614,59 @@ fi -# Enable expensive internal checks -is_release= -if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then - is_release=yes -fi - -# Check whether --enable-checking was given. -if test "${enable_checking+set}" = set; then : - enableval=$enable_checking; ac_checking_flags="${enableval}" -else +# Disable exceptions and RTTI if building with g++ +noexception_flags= +save_CFLAGS="$CFLAGS" +for option in -fno-exceptions -fno-rtti; do + as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` -# Determine the default checks. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 +$as_echo_n "checking whether $CC supports $option... " >&6; } +if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + CFLAGS="$option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_acx_Woption=yes" +else + eval "$as_acx_Woption=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +eval ac_res=\$$as_acx_Woption + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : + noexception_flags="$noexception_flags${noexception_flags:+ }$option" +fi + done +CFLAGS="$save_CFLAGS" + + +# Enable expensive internal checks +is_release= +if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then + is_release=yes +fi + +# Check whether --enable-checking was given. +if test "${enable_checking+set}" = set; then : + enableval=$enable_checking; ac_checking_flags="${enableval}" +else + +# Determine the default checks. if test x$is_release = x ; then ac_checking_flags=yes else @@ -6621,6 +6979,11 @@ else fi +if test "$ENABLE_BUILD_WITH_CXX" = "yes"; then + +$as_echo "#define ENABLE_BUILD_WITH_CXX 1" >>confdefs.h + +fi # With stabs @@ -6722,10 +7085,13 @@ _ACEOF # Check whether --enable-fixed-point was given. if test "${enable_fixed_point+set}" = set; then : enableval=$enable_fixed_point; - else case $target in + arm*) + enable_fixed_point=yes + ;; + mips*-*-*) case $host in mips*-sgi-irix*) @@ -6826,13 +7192,34 @@ fi +# Check whether --with-native-system-header-dir was given. +if test "${with_native_system_header_dir+set}" = set; then : + withval=$with_native_system_header_dir; + case ${with_native_system_header_dir} in + yes|no) as_fn_error "bad value ${withval} given for --with-native-system-header-dir" "$LINENO" 5 ;; + /* | [A-Za-z]:[\\/]*) ;; + *) as_fn_error "--with-native-system-header-dir argument ${withval} must be an absolute directory" "$LINENO" 5 ;; + esac + configured_native_system_header_dir="${withval}" + +else + configured_native_system_header_dir= +fi + + + # Check whether --with-build-sysroot was given. if test "${with_build_sysroot+set}" = set; then : - withval=$with_build_sysroot; + withval=$with_build_sysroot; if test x"$withval" != x ; then + SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval" + fi +else + SYSROOT_CFLAGS_FOR_TARGET= fi + # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; @@ -7210,17 +7597,7 @@ else RANLIB="$ac_cv_prog_RANLIB" fi -case "${host}" in -*-*-darwin*) - # By default, the Darwin ranlib will not treat common symbols as - # definitions when building the archive table of contents. Other - # ranlibs do that; pass an option to the Darwin ranlib that makes - # it behave similarly. - ranlib_flags="-c" - ;; -*) - ranlib_flags="" -esac +ranlib_flags="" # Find a good install program. We prefer a C program (faster), @@ -8196,6 +8573,196 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac +# ---------------------- +# Checks for C++ headers +# ---------------------- + +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: WARNING: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;}; } +fi + +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 + + +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 + + + + +for ac_header in unordered_map +do : + ac_fn_cxx_check_header_preproc "$LINENO" "unordered_map" "ac_cv_header_unordered_map" +if test "x$ac_cv_header_unordered_map" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UNORDERED_MAP 1 +_ACEOF + +fi +done + +for ac_header in tr1/unordered_map +do : + ac_fn_cxx_check_header_preproc "$LINENO" "tr1/unordered_map" "ac_cv_header_tr1_unordered_map" +if test "x$ac_cv_header_tr1_unordered_map" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_TR1_UNORDERED_MAP 1 +_ACEOF + +fi +done + +for ac_header in ext/hash_map +do : + ac_fn_cxx_check_header_preproc "$LINENO" "ext/hash_map" "ac_cv_header_ext_hash_map" +if test "x$ac_cv_header_ext_hash_map" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_EXT_HASH_MAP 1 +_ACEOF + +fi +done + + +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 + + # -------- # UNSORTED # -------- @@ -8313,13 +8880,12 @@ GNAT_LIBEXC="$LIBS" LIBS="$save_LIBS" -# Some systems put ldexp and frexp in libm instead of libc; assume -# they're both in the same place. jcf-dump needs them. +# To support -mcpu=native on Solaris/SPARC, we need libkstat. save_LIBS="$LIBS" LIBS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldexp" >&5 -$as_echo_n "checking for library containing ldexp... " >&6; } -if test "${ac_cv_search_ldexp+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kstat_open" >&5 +$as_echo_n "checking for library containing kstat_open... " >&6; } +if test "${ac_cv_search_kstat_open+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -8332,16 +8898,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char ldexp (); +char kstat_open (); int main () { -return ldexp (); +return kstat_open (); ; return 0; } _ACEOF -for ac_lib in '' m; do +for ac_lib in '' kstat; do if test -z "$ac_lib"; then ac_res="none required" else @@ -8349,35 +8915,99 @@ for ac_lib in '' m; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_ldexp=$ac_res + ac_cv_search_kstat_open=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_ldexp+set}" = set; then : + if test "${ac_cv_search_kstat_open+set}" = set; then : break fi done -if test "${ac_cv_search_ldexp+set}" = set; then : +if test "${ac_cv_search_kstat_open+set}" = set; then : else - ac_cv_search_ldexp=no + ac_cv_search_kstat_open=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldexp" >&5 -$as_echo "$ac_cv_search_ldexp" >&6; } -ac_res=$ac_cv_search_ldexp +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kstat_open" >&5 +$as_echo "$ac_cv_search_kstat_open" >&6; } +ac_res=$ac_cv_search_kstat_open if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -LDEXP_LIB="$LIBS" +EXTRA_GCC_LIBS="$LIBS" LIBS="$save_LIBS" -# Use only if it exists, +# Some systems put ldexp and frexp in libm instead of libc; assume +# they're both in the same place. jcf-dump needs them. +save_LIBS="$LIBS" +LIBS= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldexp" >&5 +$as_echo_n "checking for library containing ldexp... " >&6; } +if test "${ac_cv_search_ldexp+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ldexp (); +int +main () +{ +return ldexp (); + ; + return 0; +} +_ACEOF +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_ldexp=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ldexp+set}" = set; then : + break +fi +done +if test "${ac_cv_search_ldexp+set}" = set; then : + +else + ac_cv_search_ldexp=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldexp" >&5 +$as_echo "$ac_cv_search_ldexp" >&6; } +ac_res=$ac_cv_search_ldexp +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +LDEXP_LIB="$LIBS" +LIBS="$save_LIBS" + + +# Use only if it exists, # doesn't clash with , and declares intmax_t. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } @@ -8416,8 +9046,8 @@ fi for ac_func in times clock kill getrlimit setrlimit atoll atoq \ sysconf strsignal getrusage nl_langinfo \ - gettimeofday mbstowcs wcswidth mmap mincore setlocale \ - clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked + gettimeofday mbstowcs wcswidth mmap setlocale \ + clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked madvise do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -8431,59 +9061,6 @@ fi done -save_CPPFLAGS="$CPPFLAGS" -save_LIBS="$LIBS" -LIBS="$LIBS $LIBELFLIBS" -for ac_func in elf_getshdrstrndx -do : - ac_fn_c_check_func "$LINENO" "elf_getshdrstrndx" "ac_cv_func_elf_getshdrstrndx" -if test "x$ac_cv_func_elf_getshdrstrndx" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ELF_GETSHDRSTRNDX 1 -_ACEOF - -else - for ac_func in elf_getshstrndx -do : - ac_fn_c_check_func "$LINENO" "elf_getshstrndx" "ac_cv_func_elf_getshstrndx" -if test "x$ac_cv_func_elf_getshstrndx" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ELF_GETSHSTRNDX 1 -_ACEOF - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int main() -{ - return elf_getshstrndx (NULL, 0) == 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -$as_echo "#define HAVE_ELF_GETSHSTRNDX_GABI 1" >>confdefs.h - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -done - - -fi -done - -LIBS="$save_LIBS" -CPPFLAGS="$save_CPPFLAGS" - if test x$ac_cv_func_mbstowcs = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbstowcs works" >&5 $as_echo_n "checking whether mbstowcs works... " >&6; } @@ -8918,6 +9495,8 @@ $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi +# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which exposes a different +# iconv() prototype. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" @@ -9459,6 +10038,175 @@ fi fi +if test "$ENABLE_BUILD_WITH_CXX" = "yes"; then : + 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 + + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if test "${am_cv_func_iconv+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + +$as_echo "#define HAVE_ICONV 1" >>confdefs.h + + fi + if test "$am_cv_lib_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + if test "$am_cv_func_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 +$as_echo_n "checking for iconv declaration... " >&6; } + if test "${am_cv_proto_iconv+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + am_cv_proto_iconv_arg1="" +else + am_cv_proto_iconv_arg1="const" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" +fi + + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- + }$am_cv_proto_iconv" >&5 +$as_echo "${ac_t:- + }$am_cv_proto_iconv" >&6; } + +cat >>confdefs.h <<_ACEOF +#define ICONV_CONST $am_cv_proto_iconv_arg1 +_ACEOF + + fi + + 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 + +else @@ -9614,6 +10362,8 @@ _ACEOF fi +fi + # Until we have in-tree GNU iconv: LIBICONV_DEP= @@ -9664,36 +10414,174 @@ else int main () { -char* cs = nl_langinfo(CODESET); +char* cs = nl_langinfo(CODESET); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_langinfo_codeset=yes +else + am_cv_langinfo_codeset=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 +$as_echo "$am_cv_langinfo_codeset" >&6; } + if test $am_cv_langinfo_codeset = yes; then + +$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h + + fi + + +# We will need to find libiberty.h and ansidecl.h +saved_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" +saved_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include" +for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ + strsignal strstr stpcpy strverscmp \ + errno snprintf vsnprintf vasprintf malloc realloc calloc \ + free basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked +do + ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 +$as_echo_n "checking whether $ac_func is declared... " >&6; } +if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#undef $ac_tr_decl +#define $ac_tr_decl 1 + +#include "ansidecl.h" +#include "system.h" + +int +main () +{ +#ifndef $ac_func +char *(*pfn) = (char *(*)) $ac_func ; +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "gcc_cv_have_decl_$ac_func=yes" +else + eval "gcc_cv_have_decl_$ac_func=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF +#define $ac_tr_decl 1 +_ACEOF + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF +#define $ac_tr_decl 0 +_ACEOF + +fi + +done + + +for ac_func in getrlimit setrlimit getrusage +do + ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 +$as_echo_n "checking whether $ac_func is declared... " >&6; } +if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#undef $ac_tr_decl +#define $ac_tr_decl 1 + +#include "ansidecl.h" +#include "system.h" +#ifdef HAVE_SYS_RESOURCE_H +#include +#endif + + +int +main () +{ +#ifndef $ac_func +char *(*pfn) = (char *(*)) $ac_func ; +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "gcc_cv_have_decl_$ac_func=yes" +else + eval "gcc_cv_have_decl_$ac_func=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; cat >>confdefs.h <<_ACEOF +#define $ac_tr_decl 1 +_ACEOF + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; cat >>confdefs.h <<_ACEOF +#define $ac_tr_decl 0 +_ACEOF + +fi + +done + + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "ansidecl.h" +#include "system.h" +#ifdef HAVE_SYS_RESOURCE_H +#include +#endif + +int +main () +{ +rlim_t l = 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - am_cv_langinfo_codeset=yes -else - am_cv_langinfo_codeset=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 -$as_echo "$am_cv_langinfo_codeset" >&6; } - if test $am_cv_langinfo_codeset = yes; then +if ac_fn_c_try_compile "$LINENO"; then : -$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h +else - fi +$as_echo "#define rlim_t long" >>confdefs.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# We will need to find libiberty.h and ansidecl.h -saved_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" -for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ - strsignal strstr strverscmp \ - errno snprintf vsnprintf vasprintf malloc realloc calloc \ - free basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked +# On AIX 5.2, conflicts with , as both define incompatible +# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname +# in collect2.c, isn't visible, but the configure test below needs +# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. +for ac_func in ldgetname do ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 @@ -9708,6 +10596,12 @@ else #include "ansidecl.h" #include "system.h" +#ifdef HAVE_LDFCN_H +#undef FREAD +#undef FWRITE +#include +#endif + int main () @@ -9744,7 +10638,7 @@ fi done -for ac_func in getrlimit setrlimit getrusage +for ac_func in times do ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 @@ -9759,8 +10653,8 @@ else #include "ansidecl.h" #include "system.h" -#ifdef HAVE_SYS_RESOURCE_H -#include +#ifdef HAVE_SYS_TIMES_H +#include #endif @@ -9799,37 +10693,7 @@ fi done -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include "ansidecl.h" -#include "system.h" -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif - -int -main () -{ -rlim_t l = 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - -$as_echo "#define rlim_t long" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -# On AIX 5.2, conflicts with , as both define incompatible -# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname -# in collect2.c, isn't visible, but the configure test below needs -# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. -for ac_func in ldgetname +for ac_func in sigaltstack do ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 @@ -9844,11 +10708,7 @@ else #include "ansidecl.h" #include "system.h" -#ifdef HAVE_LDFCN_H -#undef FREAD -#undef FWRITE -#include -#endif +#include int @@ -9886,7 +10746,16 @@ fi done -for ac_func in times +# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which hides the madvise() +# prototype. +if test "$ENABLE_BUILD_WITH_CXX" = "yes"; then : + 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 + + for ac_func in madvise do ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 @@ -9899,11 +10768,8 @@ else #undef $ac_tr_decl #define $ac_tr_decl 1 -#include "ansidecl.h" -#include "system.h" -#ifdef HAVE_SYS_TIMES_H -#include -#endif + #include "ansidecl.h" + #include "system.h" int @@ -9916,7 +10782,7 @@ char *(*pfn) = (char *(*)) $ac_func ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : eval "gcc_cv_have_decl_$ac_func=yes" else eval "gcc_cv_have_decl_$ac_func=no" @@ -9940,8 +10806,14 @@ fi done + 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 -for ac_func in sigaltstack +else + for ac_func in madvise do ac_tr_decl=`$as_echo "HAVE_DECL_$ac_func" | $as_tr_cpp` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func is declared" >&5 @@ -9954,9 +10826,8 @@ else #undef $ac_tr_decl #define $ac_tr_decl 1 -#include "ansidecl.h" -#include "system.h" -#include + #include "ansidecl.h" + #include "system.h" int @@ -9994,6 +10865,8 @@ fi done +fi + # More time-related stuff. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct tms" >&5 $as_echo_n "checking for struct tms... " >&6; } @@ -10070,8 +10943,9 @@ $as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h fi -# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. +# Restore CFLAGS, CXXFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. CFLAGS="$saved_CFLAGS" +CXXFLAGS="$saved_CXXFLAGS" # Check whether --enable-initfini-array was given. if test "${enable_initfini_array+set}" = set; then : @@ -10083,16 +10957,119 @@ $as_echo_n "checking for .preinit_array/.init_array/.fini_array support... " >&6 if test "${gcc_cv_initfini_array+set}" = set; then : $as_echo_n "(cached) " >&6 else + if test "x${build}" = "x${target}" && test "x${build}" = "x${host}"; then if test "$cross_compiling" = yes; then : gcc_cv_initfini_array=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#ifndef __ELF__ +#error Not an ELF OS +#endif +#ifdef __ia64__ +/* We turn on .preinit_array/.init_array/.fini_array support for ia64 + if it can be used. */ static int x = -1; int main (void) { return x; } int foo (void) { x = 0; } int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; +#else +extern void abort (); +static int count; + +static void +init1005 () +{ + if (count != 0) + abort (); + count = 1005; +} +void (*const init_array1005) () + __attribute__ ((section (".init_array.01005"), aligned (sizeof (void *)))) + = { init1005 }; +static void +fini1005 () +{ + if (count != 1005) + abort (); +} +void (*const fini_array1005) () + __attribute__ ((section (".fini_array.01005"), aligned (sizeof (void *)))) + = { fini1005 }; + +static void +ctor1007 () +{ + if (count != 1005) + abort (); + count = 1007; +} +void (*const ctors1007) () + __attribute__ ((section (".ctors.64528"), aligned (sizeof (void *)))) + = { ctor1007 }; +static void +dtor1007 () +{ + if (count != 1007) + abort (); + count = 1005; +} +void (*const dtors1007) () + __attribute__ ((section (".dtors.64528"), aligned (sizeof (void *)))) + = { dtor1007 }; + +static void +init65530 () +{ + if (count != 1007) + abort (); + count = 65530; +} +void (*const init_array65530) () + __attribute__ ((section (".init_array.65530"), aligned (sizeof (void *)))) + = { init65530 }; +static void +fini65530 () +{ + if (count != 65530) + abort (); + count = 1007; +} +void (*const fini_array65530) () + __attribute__ ((section (".fini_array.65530"), aligned (sizeof (void *)))) + = { fini65530 }; + +static void +ctor65535 () +{ + if (count != 65530) + abort (); + count = 65535; +} +void (*const ctors65535) () + __attribute__ ((section (".ctors"), aligned (sizeof (void *)))) + = { ctor65535 }; +static void +dtor65535 () +{ + if (count != 65535) + abort (); + count = 65530; +} +void (*const dtors65535) () + __attribute__ ((section (".dtors"), aligned (sizeof (void *)))) + = { dtor65535 }; + +int +main () +{ + if (count != 65535) + abort (); + return 0; +} +#endif + _ACEOF if ac_fn_c_try_run "$LINENO"; then : gcc_cv_initfini_array=yes @@ -10103,6 +11080,11 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking cross compile... guessing" >&5 +$as_echo_n "checking cross compile... guessing... " >&6; } + gcc_cv_initfini_array=no + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_initfini_array" >&5 $as_echo "$gcc_cv_initfini_array" >&6; } @@ -10199,46 +11181,6 @@ _ACEOF fi -# For platforms with the unwind ABI which includes an unwind library, -# libunwind, we can choose to use the system libunwind. -# config.gcc also contains tests of with_system_libunwind. - - -# Check whether --with-system-libunwind was given. -if test "${with_system_libunwind+set}" = set; then : - withval=$with_system_libunwind; -fi - - # If system-libunwind was not specifically set, pick a default setting. - if test x$with_system_libunwind = x; then - case ${target} in - ia64-*-hpux*) with_system_libunwind=yes ;; - *) with_system_libunwind=no ;; - esac - fi - # Based on system-libunwind and target, do we have ipinfo? - if test x$with_system_libunwind = xyes; then - case ${target} in - ia64-*-*) have_unwind_getipinfo=no ;; - *) have_unwind_getipinfo=yes ;; - esac - else - # Darwin before version 9 does not have _Unwind_GetIPInfo. - - case ${target} in - *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;; - *) have_unwind_getipinfo=yes ;; - esac - - fi - - if test x$have_unwind_getipinfo = xyes; then - -$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h - - fi - - # -------------------------------------------------------- # Build, host, and target specific configuration fragments # -------------------------------------------------------- @@ -10373,6 +11315,12 @@ if test "$host_xm_file" != "$build_xm_file"; then fi fi +if test -n "$configured_native_system_header_dir"; then + native_system_header_dir=$configured_native_system_header_dir +fi +NATIVE_SYSTEM_HEADER_DIR="$native_system_header_dir" + + case ${host} in powerpc*-*-darwin*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mcontext_t fields have underscores" >&5 @@ -10420,8 +11368,8 @@ case ${enable_threads} in # default target_thread_file='single' ;; - aix | dce | gnat | irix | posix | posix95 | rtems | \ - single | solaris | vxworks | win32 | mipssde) + aix | dce | lynx | mipssde | posix | rtems | \ + single | tpf | vxworks | win32) target_thread_file=${enable_threads} ;; *) @@ -10436,19 +11384,6 @@ if test x${thread_file} = x; then thread_file=${target_thread_file} fi -# Make gthr-default.h if we have a thread file. -gthread_flags= -if test $thread_file != single; then - echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t - if diff gthr-default.h-t gthr-default.h 2>/dev/null; then - rm -f gthr-default.h-t - else - mv -f gthr-default.h-t gthr-default.h - fi - gthread_flags=-DHAVE_GTHR_DEFAULT -fi - - # -------- # UNSORTED # -------- @@ -10498,8 +11433,10 @@ fi # Convert extra_options into a form suitable for Makefile use. extra_opt_files= +all_opt_files= for f in $extra_options; do extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" + all_opt_files="$all_opt_files $srcdir/config/$f" done @@ -10591,6 +11528,11 @@ fi cat > plugin-version.h < conftest.$ac_ext <<_LT_EOF -#line 17136 "configure" +#line 18080 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17239,7 +18183,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17242 "configure" +#line 18186 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18165,7 +19109,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac ;; - freebsd[12]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no @@ -19933,10 +20877,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -19944,7 +20884,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -19962,7 +20902,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -20520,7 +21460,7 @@ elif test -f $gcc_cv_as_gas_srcdir/configure.in \ elif test -x as$build_exeext; then # Build using assembler in the current directory. gcc_cv_as=./as$build_exeext -elif test -x $AS_FOR_TARGET; then +elif ( set dummy $AS_FOR_TARGET; test -x $2 ); then gcc_cv_as="$AS_FOR_TARGET" else # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. @@ -20641,7 +21581,7 @@ elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ elif test -x collect-ld$build_exeext; then # Build using linker in the current directory. gcc_cv_ld=./collect-ld$build_exeext -elif test -x $LD_FOR_TARGET; then +elif ( set dummy $LD_FOR_TARGET; test -x $2 ); then gcc_cv_ld="$LD_FOR_TARGET" else # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. @@ -20728,7 +21668,8 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker to use" >&5 $as_echo_n "checking what linker to use... " >&6; } -if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then +if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext \ + || test "$gcc_cv_ld" = ../gold/ld-new$build_exeext; then # Single tree build which includes ld. We want to prefer it # over whatever linker top-level may have detected, since # we'll use what we're building after installation anyway. @@ -20740,6 +21681,8 @@ $as_echo "newly built ld" >&6; } || grep 'EMUL = .*linux' ../ld/Makefile \ || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then in_tree_ld_is_elf=yes + elif test "$ld_is_gold" = yes; then + in_tree_ld_is_elf=yes fi for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in do @@ -20768,7 +21711,7 @@ if test -f $gcc_cv_binutils_srcdir/configure.in \ gcc_cv_nm=../binutils/nm-new$build_exeext elif test -x nm$build_exeext; then gcc_cv_nm=./nm$build_exeext -elif test -x $NM_FOR_TARGET; then +elif ( set dummy $NM_FOR_TARGET; test -x $2 ); then gcc_cv_nm="$NM_FOR_TARGET" else # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. @@ -20848,7 +21791,7 @@ if test -f $gcc_cv_binutils_srcdir/configure.in \ gcc_cv_objdump=../binutils/objdump$build_exeext elif test -x objdump$build_exeext; then gcc_cv_objdump=./objdump$build_exeext -elif test -x $OBJDUMP_FOR_TARGET; then +elif ( set dummy $OBJDUMP_FOR_TARGET; test -x $2 ); then gcc_cv_objdump="$OBJDUMP_FOR_TARGET" else # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. @@ -20988,6 +21931,9 @@ else i[34567]86-*-linux*) gcc_cv_as_flags="--32" ;; + powerpc*-*-darwin*) + gcc_cv_as_flags="-arch ppc" + ;; *) gcc_cv_as_flags=" " ;; @@ -21007,7 +21953,7 @@ else then gcc_cv_as_balign_and_p2align=yes fi elif test x$gcc_cv_as != x; then - echo '.balign 4 + $as_echo '.balign 4 .p2align 2' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -21043,7 +21989,7 @@ else then gcc_cv_as_max_skip_p2align=yes fi elif test x$gcc_cv_as != x; then - echo '.p2align 4,,7' > conftest.s + $as_echo '.p2align 4,,7' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 @@ -21078,7 +22024,7 @@ else then gcc_cv_as_literal16=yes fi elif test x$gcc_cv_as != x; then - echo '.literal16' > conftest.s + $as_echo '.literal16' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 @@ -21114,7 +22060,7 @@ else then gcc_cv_as_subsection_m1=yes fi elif test x$gcc_cv_as != x; then - echo 'conftest_label1: .word 0 + $as_echo 'conftest_label1: .word 0 .subsection -1 conftest_label2: .word 0 .previous' > conftest.s @@ -21160,7 +22106,7 @@ else then gcc_cv_as_weak=yes fi elif test x$gcc_cv_as != x; then - echo ' .weak foobar' > conftest.s + $as_echo ' .weak foobar' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 @@ -21195,7 +22141,7 @@ else then gcc_cv_as_weakref=yes fi elif test x$gcc_cv_as != x; then - echo ' .weakref foobar, barfnot' > conftest.s + $as_echo ' .weakref foobar, barfnot' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 @@ -21230,7 +22176,7 @@ else then gcc_cv_as_nsubspa_comdat=yes fi elif test x$gcc_cv_as != x; then - echo ' .SPACE $TEXT$ + $as_echo ' .SPACE $TEXT$ .NSUBSPA $CODE$,COMDAT' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -21274,7 +22220,7 @@ else then gcc_cv_as_hidden=yes fi elif test x$gcc_cv_as != x; then - echo ' .hidden foobar + $as_echo ' .hidden foobar foobar:' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -21287,7 +22233,7 @@ foobar:' > conftest.s # Solaris 9/x86 as incorrectly emits an alias for a hidden symbol with # STV_HIDDEN, so disable .hidden support if so. case "${target}" in - i?86-*-solaris2*) + i?86-*-solaris2* | x86_64-*-solaris2.1[0-9]*) if test x$gcc_cv_as != x && test x$gcc_cv_objdump != x; then cat > conftest.s <