X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fconfigure.ac;h=a78a1d76d2f7a9700fad48503d0c9da64c93bdda;hb=75dfcf1c8caa3180aef81026a73d2ce4f5246ced;hp=9dd9c5d086ac7013f096f096e96957d8c46b7da3;hpb=ca42e77491a6617022d670c4866d71d5325a0177;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/configure.ac b/gcc/configure.ac index 9dd9c5d086a..a78a1d76d2f 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to generate a configuration script. # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. #This file is part of GCC. @@ -105,7 +105,8 @@ fi # Specify the local prefix local_prefix= AC_ARG_WITH(local-prefix, -[ --with-local-prefix=DIR specifies directory to put local include], +[AS_HELP_STRING([--with-local-prefix=DIR], + [specifies directory to put local include])], [case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} given for local include directory prefix) ;; no) ;; @@ -123,8 +124,8 @@ fi gcc_gxx_include_dir= # Specify the g++ header file directory AC_ARG_WITH(gxx-include-dir, -[ --with-gxx-include-dir=DIR - specifies directory to put g++ header files], +[AS_HELP_STRING([--with-gxx-include-dir=DIR], + [specifies directory to put g++ header files])], [case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} given for g++ include directory) ;; no) ;; @@ -144,10 +145,19 @@ if test x${gcc_gxx_include_dir} = x; then fi fi +gcc_gxx_include_dir_add_sysroot=0 +if test "${with_sysroot+set}" = set; then + gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` + if test "${gcc_gxx_without_sysroot}"; then + gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" + gcc_gxx_include_dir_add_sysroot=1 + fi +fi + AC_ARG_WITH(cpp_install_dir, -[ --with-cpp-install-dir=DIR - install the user visible C preprocessor in DIR - (relative to PREFIX) as well as PREFIX/bin], +[AC_HELP_STRING([--with-cpp-install-dir=DIR], + [install the user visible C preprocessor in DIR + (relative to PREFIX) as well as PREFIX/bin])], [if test x$withval = xyes; then AC_MSG_ERROR([option --with-cpp-install-dir requires an argument]) elif test x$withval != xno; then @@ -163,10 +173,10 @@ fi]) AC_MSG_CHECKING([whether to place generated files in the source directory]) dnl generated-files-in-srcdir is disabled by default AC_ARG_ENABLE(generated-files-in-srcdir, -[ --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.], + [AS_HELP_STRING([--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])], generated_files_in_srcdir=$enableval, generated_files_in_srcdir=no) @@ -185,13 +195,13 @@ AC_SUBST(GENINSRC) # With GNU ld AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld arrange to work with GNU ld.], +[AS_HELP_STRING([--with-gnu-ld], [arrange to work with GNU ld])], gnu_ld_flag="$with_gnu_ld", gnu_ld_flag=no) # With pre-defined ld AC_ARG_WITH(ld, -[ --with-ld arrange to use the specified ld (full pathname)], +[AS_HELP_STRING([--with-ld], [arrange to use the specified ld (full pathname)])], DEFAULT_LINKER="$with_ld") if test x"${DEFAULT_LINKER+set}" = x"set"; then if test ! -x "$DEFAULT_LINKER"; then @@ -203,9 +213,6 @@ if test x"${DEFAULT_LINKER+set}" = x"set"; then [Define to enable the use of a default linker.]) fi -gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi` -AC_DEFINE_UNQUOTED(HAVE_GNU_LD, $gnu_ld, [Define if using GNU ld.]) - AC_MSG_CHECKING([whether a default linker was specified]) if test x"${DEFAULT_LINKER+set}" = x"set"; then if test x"$gnu_ld_flag" = x"no"; then @@ -219,9 +226,9 @@ fi # With demangler in GNU ld AC_ARG_WITH(demangler-in-ld, -[ --with-demangler-in-ld try to use demangler in GNU ld.], +[AS_HELP_STRING([--with-demangler-in-ld], [try to use demangler in GNU ld])], demangler_in_ld="$with_demangler_in_ld", -demangler_in_ld=no) +demangler_in_ld=yes) # ---------------------- # Find default assembler @@ -229,12 +236,12 @@ demangler_in_ld=no) # With GNU as AC_ARG_WITH(gnu-as, -[ --with-gnu-as arrange to work with GNU as], +[AS_HELP_STRING([--with-gnu-as], [arrange to work with GNU as])], gas_flag="$with_gnu_as", gas_flag=no) AC_ARG_WITH(as, -[ --with-as arrange to use the specified as (full pathname)], +[AS_HELP_STRING([--with-as], [arrange to use the specified as (full pathname)])], DEFAULT_ASSEMBLER="$with_as") if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then if test ! -x "$DEFAULT_ASSEMBLER"; then @@ -246,9 +253,6 @@ if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then [Define to enable the use of a default assembler.]) fi -gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi` -AC_DEFINE_UNQUOTED(HAVE_GNU_AS, $gnu_as, [Define if using GNU as.]) - AC_MSG_CHECKING([whether a default assembler was specified]) if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then if test x"$gas_flag" = x"no"; then @@ -296,6 +300,10 @@ case "$CC" in esac AC_SUBST(CFLAGS) +# Determine PICFLAG for target gnatlib. +GCC_PICFLAG_FOR_TARGET +AC_SUBST(PICFLAG_FOR_TARGET) + # ------------------------- # Check C compiler features # ------------------------- @@ -304,6 +312,8 @@ AC_USE_SYSTEM_EXTENSIONS AC_PROG_CPP AC_C_INLINE +AC_SYS_LARGEFILE + # sizeof(char) is 1 by definition. AC_CHECK_SIZEOF(void *) AC_CHECK_SIZEOF(short) @@ -322,10 +332,11 @@ GCC_STDINT_TYPES # * 'long long' # * variadic macros # * overlong strings +# * C++11 narrowing conversions in { } # So, we only use -pedantic if we can disable those warnings. ACX_PROG_CC_WARNING_OPTS( - m4_quote(m4_do([-W -Wall -Wwrite-strings -Wcast-qual])), [loose_warn]) + m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual])), [loose_warn]) ACX_PROG_CC_WARNING_OPTS( m4_quote(m4_do([-Wstrict-prototypes -Wmissing-prototypes])), [c_loose_warn]) @@ -350,6 +361,10 @@ fi AC_SUBST(warn_cflags) AC_SUBST(warn_cxxflags) +# Disable exceptions and RTTI if building with g++ +ACX_PROG_CC_WARNING_OPTS( + m4_quote(m4_do([-fno-exceptions -fno-rtti])), [noexception_flags]) + # Enable expensive internal checks is_release= if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then @@ -357,12 +372,12 @@ if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then fi AC_ARG_ENABLE(checking, -[ --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.], +[AS_HELP_STRING([[--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])], [ac_checking_flags="${enableval}"],[ # Determine the default checks. if test x$is_release = x ; then @@ -545,12 +560,12 @@ AC_SUBST(valgrind_command) # Enable code coverage collection AC_ARG_ENABLE(coverage, -[ --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], +[AS_HELP_STRING([[--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])], [case "${enableval}" in yes|noopt) coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" @@ -570,7 +585,8 @@ esac], AC_SUBST(coverage_flags) AC_ARG_ENABLE(gather-detailed-mem-stats, -[ --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering], [], +[AS_HELP_STRING([--enable-gather-detailed-mem-stats], + [enable detailed memory allocation stats gathering])], [], [enable_gather_detailed_mem_stats=no]) if test x$enable_gather_detailed_mem_stats = xyes ; then AC_DEFINE(GATHER_STATISTICS, 1, @@ -583,26 +599,59 @@ fi # See if we are building gcc with C++. AC_ARG_ENABLE(build-with-cxx, -[ --enable-build-with-cxx build with C++ compiler instead of C compiler], +[AS_HELP_STRING([--enable-build-with-cxx], + [build with C++ compiler instead of C compiler])], ENABLE_BUILD_WITH_CXX=$enableval, ENABLE_BUILD_WITH_CXX=no) AC_SUBST(ENABLE_BUILD_WITH_CXX) +if test "$ENABLE_BUILD_WITH_CXX" = "yes"; then + AC_DEFINE(ENABLE_BUILD_WITH_CXX, 1, + [Define if building with C++.]) +fi # With stabs AC_ARG_WITH(stabs, -[ --with-stabs arrange to use stabs instead of host debug format], +[AS_HELP_STRING([--with-stabs], + [arrange to use stabs instead of host debug format])], stabs="$with_stabs", stabs=no) # Determine whether or not multilibs are enabled. AC_ARG_ENABLE(multilib, -[ --enable-multilib enable library support for multiple ABIs], +[AS_HELP_STRING([--enable-multilib], + [enable library support for multiple ABIs])], [], [enable_multilib=yes]) AC_SUBST(enable_multilib) +# Determine whether or not multiarch is enabled. +AC_ARG_ENABLE(multiarch, +[AS_HELP_STRING([--enable-multiarch], + [enable support for multiarch paths])], +[case "${enableval}" in +yes|no|auto) enable_multiarch=$enableval;; +*) AC_MSG_ERROR(bad value ${enableval} given for --enable-multiarch option) ;; +esac], [enable_multiarch=auto]) +if test x${enable_multiarch} = xauto; then + if test x${with_native_system_header_dir} != x; then + ma_msg_suffix=", disabled auto check (configured with --native-system-header-dir)" + enable_multiarch=no + fi + if test x$host != x$target && test "x$with_sysroot" = x; then + ma_msg_suffix=", disabled auto check (cross build configured without --with-sysroot)" + enable_multiarch=no + fi +fi +AC_MSG_CHECKING(for multiarch configuration) +AC_SUBST(enable_multiarch) +AC_MSG_RESULT($enable_multiarch$ma_msg_suffix) + +# needed for setting the multiarch name for soft-float/hard-float ABIs +AC_SUBST(with_cpu) +AC_SUBST(with_float) + # Enable __cxa_atexit for C++. AC_ARG_ENABLE(__cxa_atexit, -[ --enable-__cxa_atexit enable __cxa_atexit for C++], +[AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])], [], []) # Enable C extension for decimal float if target supports it. @@ -622,11 +671,15 @@ point format instead of DPD]) # Enable C extension for fixed-point arithmetic. AC_ARG_ENABLE(fixed-point, -[ --enable-fixed-point enable fixed-point arithmetic extension to C], -[ -], +[AS_HELP_STRING([--enable-fixed-point], + [enable fixed-point arithmetic extension to C])], +[], [ case $target in + arm*) + enable_fixed_point=yes + ;; + mips*-*-*) case $host in mips*-sgi-irix*) @@ -654,13 +707,15 @@ AC_DEFINE_UNQUOTED(ENABLE_FIXED_POINT, $fixedpoint, # Pass with no value to take the default # Pass with a value to specify a thread package AC_ARG_ENABLE(threads, -[ --enable-threads enable thread usage for target GCC - --enable-threads=LIB use LIB thread package for target GCC],, +[AS_HELP_STRING([[--enable-threads[=LIB]]], + [enable thread usage for target GCC, + using LIB thread package])],, [enable_threads='']) AC_ARG_ENABLE(tls, -[ --enable-tls enable or disable generation of tls code - overriding the assembler check for tls support], +[AS_HELP_STRING([--enable-tls], + [enable or disable generation of tls code + overriding the assembler check for tls support])], [ case $enable_tls in yes | no) ;; @@ -670,8 +725,9 @@ Valid choices are 'yes' and 'no'.]) ;; ], [enable_tls='']) AC_ARG_ENABLE(objc-gc, -[ --enable-objc-gc enable the use of Boehm's garbage collector with - the GNU Objective-C runtime], +[AS_HELP_STRING([--enable-objc-gc], + [enable the use of Boehm's garbage collector with + the GNU Objective-C runtime])], if test x$enable_objc_gc = xno; then objc_boehm_gc='' else @@ -680,12 +736,12 @@ fi, objc_boehm_gc='') AC_ARG_WITH(dwarf2, -[ --with-dwarf2 force the default debug format to be DWARF 2], +[AS_HELP_STRING([--with-dwarf2], [force the default debug format to be DWARF 2])], dwarf2="$with_dwarf2", dwarf2=no) AC_ARG_ENABLE(shared, -[ --disable-shared don't provide a shared libgcc], +[AS_HELP_STRING([--disable-shared], [don't provide a shared libgcc])], [ case $enable_shared in yes | no) ;; @@ -703,12 +759,31 @@ AC_ARG_ENABLE(shared, ], [enable_shared=yes]) AC_SUBST(enable_shared) +AC_ARG_WITH([native-system-header-dir], + [ --with-native-system-header-dir=dir + use dir as the directory to look for standard + system header files in. Defaults to /usr/include.], +[ + case ${with_native_system_header_dir} in + yes|no) AC_MSG_ERROR([bad value ${withval} given for --with-native-system-header-dir]) ;; + /* | [[A-Za-z]]:[[\\/]]*) ;; + *) AC_MSG_ERROR([--with-native-system-header-dir argument ${withval} must be an absolute directory]) ;; + esac + configured_native_system_header_dir="${withval}" +], [configured_native_system_header_dir=]) + AC_ARG_WITH(build-sysroot, - [ --with-build-sysroot=sysroot - use sysroot as the system root during the build]) + [AS_HELP_STRING([--with-build-sysroot=sysroot], + [use sysroot as the system root during the build])], + [if test x"$withval" != x ; then + SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval" + fi], + [SYSROOT_CFLAGS_FOR_TARGET=]) +AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET) AC_ARG_WITH(sysroot, -[ --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR.], +[AS_HELP_STRING([[--with-sysroot[=DIR]]], + [search for usr/lib, usr/include, et al, within DIR])], [ case ${with_sysroot} in yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; @@ -760,7 +835,7 @@ ACX_BUGURL([http://gcc.gnu.org/bugs.html]) # Sanity check enable_languages in case someone does not run the toplevel # configure # script. AC_ARG_ENABLE(languages, -[ --enable-languages=LIST specify which front-ends to build], +[AS_HELP_STRING([--enable-languages=LIST], [specify which front-ends to build])], [case ,${enable_languages}, in ,,|,yes,) # go safe -- we cannot be much sure without the toplevel @@ -780,7 +855,7 @@ esac], [enable_languages=c]) AC_ARG_WITH(multilib-list, -[ --with-multilib-list Select multilibs (SH only)], +[AS_HELP_STRING([--with-multilib-list], [select multilibs (SH and x86-64 only)])], :, with_multilib_list=default) @@ -801,17 +876,7 @@ esac gcc_AC_PROG_LN_S ACX_PROG_LN($LN_S) AC_PROG_RANLIB -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="" AC_SUBST(ranlib_flags) gcc_AC_PROG_INSTALL @@ -903,6 +968,24 @@ AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=]) gcc_AC_C_CHAR_BIT AC_C_BIGENDIAN +# ---------------------- +# Checks for C++ headers +# ---------------------- + +dnl Autoconf will give an error in the configure script if there is no +dnl C++ preprocessor. Hack to prevent that. +m4_pushdef([AC_MSG_ERROR], m4_defn([AC_MSG_WARN]))[]dnl +AC_PROG_CXXCPP +m4_popdef([AC_MSG_ERROR])[]dnl + +AC_LANG_PUSH(C++) + +AC_CHECK_HEADERS(unordered_map) +AC_CHECK_HEADERS(tr1/unordered_map) +AC_CHECK_HEADERS(ext/hash_map) + +AC_LANG_POP(C++) + # -------- # UNSORTED # -------- @@ -937,6 +1020,14 @@ GNAT_LIBEXC="$LIBS" LIBS="$save_LIBS" AC_SUBST(GNAT_LIBEXC) +# To support -mcpu=native on Solaris/SPARC, we need libkstat. +save_LIBS="$LIBS" +LIBS= +AC_SEARCH_LIBS(kstat_open, kstat) +EXTRA_GCC_LIBS="$LIBS" +LIBS="$save_LIBS" +AC_SUBST(EXTRA_GCC_LIBS) + # 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" @@ -972,24 +1063,8 @@ define(gcc_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl putchar_unlocked putc_unlocked) AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoll atoq \ sysconf strsignal getrusage nl_langinfo \ - gettimeofday mbstowcs wcswidth mmap mincore setlocale \ - gcc_UNLOCKED_FUNCS) - -save_CPPFLAGS="$CPPFLAGS" -save_LIBS="$LIBS" -LIBS="$LIBS $LIBELFLIBS" -AC_CHECK_FUNCS(elf_getshdrstrndx,, - [AC_CHECK_FUNCS(elf_getshstrndx, - [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include -#include -int main() -{ - return elf_getshstrndx (NULL, 0) == 0; -}]])], AC_DEFINE(HAVE_ELF_GETSHSTRNDX_GABI, 1, - [Define if elf_getshstrndx has gABI conformant return values.]))])] - ) -LIBS="$save_LIBS" -CPPFLAGS="$save_CPPFLAGS" + gettimeofday mbstowcs wcswidth mmap setlocale \ + gcc_UNLOCKED_FUNCS madvise) if test x$ac_cv_func_mbstowcs = xyes; then AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works, @@ -1024,7 +1099,14 @@ case "${host}" in esac AC_FUNC_FORK -AM_ICONV +# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which exposes a different +# iconv() prototype. +AS_IF([test "$ENABLE_BUILD_WITH_CXX" = "yes"], + [AC_LANG_PUSH([C++]) + AM_ICONV + AC_LANG_POP([C++])], + [AM_ICONV]) + # Until we have in-tree GNU iconv: LIBICONV_DEP= AC_SUBST(LIBICONV_DEP) @@ -1036,8 +1118,10 @@ AM_LANGINFO_CODESET # 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" gcc_AC_CHECK_DECLS(getenv atol asprintf sbrk abort atof getcwd getwd \ - strsignal strstr strverscmp \ + strsignal strstr stpcpy strverscmp \ errno snprintf vsnprintf vasprintf malloc realloc calloc \ free basename getopt clock getpagesize gcc_UNLOCKED_FUNCS, , ,[ #include "ansidecl.h" @@ -1088,6 +1172,21 @@ gcc_AC_CHECK_DECLS(sigaltstack, , ,[ #include ]) +# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which hides the madvise() +# prototype. +AS_IF([test "$ENABLE_BUILD_WITH_CXX" = "yes"], + [AC_LANG_PUSH([C++]) + gcc_AC_CHECK_DECLS(madvise, , ,[ + #include "ansidecl.h" + #include "system.h" + ]) + AC_LANG_POP([C++])], + [gcc_AC_CHECK_DECLS(madvise, , ,[ + #include "ansidecl.h" + #include "system.h" + ]) +]) + # More time-related stuff. AC_CACHE_CHECK(for struct tms, ac_cv_struct_tms, [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ @@ -1114,10 +1213,25 @@ if test $gcc_cv_type_clock_t = yes; then [Define if defines clock_t.]) fi -# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. -CFLAGS="$saved_CFLAGS" +# Check if F_SETLKW is supported by fcntl. +AC_CACHE_CHECK(for F_SETLKW, ac_cv_f_setlkw, [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include ]], [[ +struct flock fl; +fl.l_whence = 0; +fl.l_start = 0; +fl.l_len = 0; +fl.l_pid = 0; +return fcntl (1, F_SETLKW, &fl);]])], +[ac_cv_f_setlkw=yes],[ac_cv_f_setlkw=no])]) +if test $ac_cv_f_setlkw = yes; then + AC_DEFINE(HOST_HAS_F_SETLKW, 1, + [Define if F_SETLKW supported by fcntl.]) +fi -gcc_AC_INITFINI_ARRAY +# Restore CFLAGS, CXXFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. +CFLAGS="$saved_CFLAGS" +CXXFLAGS="$saved_CXXFLAGS" # mkdir takes a single argument on some systems. gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG @@ -1130,8 +1244,8 @@ AC_SUBST(objext) # With Setjmp/Longjmp based exception handling. AC_ARG_ENABLE(sjlj-exceptions, -[ --enable-sjlj-exceptions - arrange to use setjmp/longjmp exception handling], +[AS_HELP_STRING([--enable-sjlj-exceptions], + [arrange to use setjmp/longjmp exception handling])], [case $target in *-*-hpux10*) if test $enableval != yes; then @@ -1156,11 +1270,6 @@ if test $force_sjlj_exceptions = yes; then [Define 0/1 to force the choice for exception handling model.]) 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. -GCC_CHECK_UNWIND_GETIPINFO - # -------------------------------------------------------- # Build, host, and target specific configuration fragments # -------------------------------------------------------- @@ -1196,6 +1305,11 @@ if test x"$tmake_file" = x then tmake_file=$cpu_type/t-$cpu_type fi +# Support --enable-initfini-array. +if test x$enable_initfini_array != xno; then + tm_file="${tm_file} initfini-array.h" +fi + if test x"$dwarf2" = xyes then tm_file="$tm_file tm-dwarf2.h" fi @@ -1258,6 +1372,12 @@ if test x$use_long_long_for_widest_fast_int = xyes; then efficiently supported by the host hardware.]) fi +gnu_ld_bool=`if test x"$gnu_ld" = x"yes"; then echo 1; else echo 0; fi` +AC_DEFINE_UNQUOTED(HAVE_GNU_LD, $gnu_ld_bool, [Define to 1 if using GNU ld.]) + +gnu_as_bool=`if test x"$gas" = x"yes"; then echo 1; else echo 0; fi` +AC_DEFINE_UNQUOTED(HAVE_GNU_AS, $gnu_as_bool, [Define to 1 if using GNU as.]) + count=a for f in $host_xm_file; do count=${count}x @@ -1291,6 +1411,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" +AC_SUBST(NATIVE_SYSTEM_HEADER_DIR) + case ${host} in powerpc*-*-darwin*) AC_CACHE_CHECK([whether mcontext_t fields have underscores], @@ -1323,8 +1449,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} ;; *) @@ -1339,19 +1465,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 -AC_SUBST(gthread_flags) - # -------- # UNSORTED # -------- @@ -1396,8 +1509,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 AC_SUBST(extra_opt_files) @@ -1492,6 +1607,11 @@ fi cat > plugin-version.h < /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 @@ -1984,7 +2120,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 AC_PATH_PROG(gcc_cv_nm, $NM_FOR_TARGET) @@ -2017,7 +2153,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 AC_PATH_PROG(gcc_cv_objdump, $OBJDUMP_FOR_TARGET) @@ -2126,7 +2262,7 @@ foobar:],[ # 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 <