OSDN Git Service

* gcc/config/elfos.h (MAKE_DECL_ONE_ONLY): Redefined to stop DECL_WEAK
[pf3gnuchains/gcc-fork.git] / gcc / configure
index 117fb03..98639db 100755 (executable)
@@ -309,7 +309,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir gcc_version gcc_version_full gcc_version_trigger host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default set_gcc_lib_path GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
 ac_subst_files='language_hooks'
 
 # Initialize some variables set by options.
@@ -867,8 +867,9 @@ Optional Features:
   --enable-checking=LIST
                          enable expensive run-time checks.  With LIST,
                          enable only specific categories of checks.
-                         Categories are: assert,fold,gc,gcac,misc,
-                         rtlflag,rtl,tree,valgrind,release,yes,all;
+                         Categories are: yes,no,all,none,release.
+                         Flags are: assert,fold,gc,gcac,misc,
+                         rtlflag,rtl,runtime,tree,valgrind.
   --enable-mapped-location   location_t is fileline integer cookie
   --enable-coverage=LEVEL
                          enable compiler's code coverage collection.
@@ -1383,9 +1384,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
           ac_config_headers="$ac_config_headers auto-host.h:config.in"
 
 
-#Set to 1 on a release branch
-is_release=
-
 # Determine the host, build, and target systems
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
@@ -1517,8 +1515,13 @@ esac
 # Determine the target- and build-specific subdirectories
   # Prefix 'build-' so this never conflicts with target_subdir.
 build_subdir="build-${build_noncanonical}"
-# Not really a subdirectory, but here for completeness.
-host_subdir=.
+# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
+if ( test $srcdir = . && test -d gcc ) \
+   || test -d $srcdir/../host-${host_noncanonical}; then
+  host_subdir="host-${host_noncanonical}"
+else
+  host_subdir=.
+fi
 # No prefix.
 target_subdir=${target_noncanonical}
 
@@ -1647,7 +1650,7 @@ if test x${gcc_gxx_include_dir} = x; then
   if test x${enable_version_specific_runtime_libs} = xyes; then
     gcc_gxx_include_dir='${libsubdir}/include/c++'
   else
-    topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
+    libstdcxx_incdir='c++/$(version)'
     gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
   fi
 fi
@@ -6235,6 +6238,10 @@ fi
 
 
 # Enable -Werror in bootstrap stage2 and later.
+is_release=
+if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
+  is_release=yes
+fi
 # Check whether --enable-werror or --disable-werror was given.
 if test "${enable_werror+set}" = set; then
   enableval="$enable_werror"
@@ -6269,37 +6276,50 @@ fi
 fi;
 ac_assert_checking=1
 ac_checking=
-ac_tree_checking=
-ac_rtl_checking=
-ac_rtlflag_checking=
+ac_fold_checking=
 ac_gc_checking=
 ac_gc_always_collect=
-ac_fold_checking=
+ac_rtl_checking=
+ac_rtlflag_checking=
+ac_runtime_checking=1
+ac_tree_checking=
+ac_valgrind_checking=
 IFS="${IFS=    }"; ac_save_IFS="$IFS"; IFS="$IFS,"
 for check in $ac_checking_flags
 do
        case $check in
+       # these set all the flags to specific states
        yes)            ac_assert_checking=1 ; ac_checking=1 ;
-                       ac_tree_checking=1 ; ac_gc_checking=1 ;
-                       ac_rtlflag_checking=1 ;;
-       no)             ac_assert_checking= ; ac_checking= ;
-                       ac_tree_checking= ; ac_rtl_checking= ;
-                       ac_rtlflag_checking= ; ac_gc_checking= ;
-                       ac_gc_always_collect= ; ac_fold_checking= ;;
+                       ac_fold_checking= ; ac_gc_checking=1 ;
+                       ac_gc_always_collect= ; ac_rtl_checking= ;
+                       ac_rtlflag_checking=1 ; ac_runtime_chacking=1 ;
+                       ac_tree_checking=1 ; ac_valgrind_checking= ;;
+       no|none)        ac_assert_checking= ; ac_checking= ;
+                       ac_fold_checking= ; ac_gc_checking= ;
+                       ac_gc_always_collect= ; ac_rtl_checking= ;
+                       ac_rtlflag_checking= ; ac_runtime_chacking= ;
+                       ac_tree_checking= ; ac_valgrind_checking= ;;
        all)            ac_assert_checking=1 ; ac_checking=1 ;
-                       ac_tree_checking=1 ; ac_rtl_checking=1 ;
-                       ac_rtlflag_checking=1 ; ac_gc_checking=1 ;
-                       ac_gc_always_collect=1 ; ac_fold_checking=1 ;;
-        release)       ac_assert_checking=1 ;;
+                       ac_fold_checking=1 ; ac_gc_checking=1 ;
+                       ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
+                       ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
+                       ac_tree_checking=1 ; ac_valgrind_checking= ;;
+       release)        ac_assert_checking=1 ; ac_checking= ;
+                       ac_fold_checking= ; ac_gc_checking= ;
+                       ac_gc_always_collect= ; ac_rtl_checking= ;
+                       ac_rtlflag_checking= ; ac_runtime_checking=1 ;
+                       ac_tree_checking= ; ac_valgrind_checking= ;;
+       # these enable particular checks
        assert)         ac_assert_checking=1 ;;
        fold)           ac_fold_checking=1 ;;
        gc)             ac_gc_checking=1 ;;
        gcac)           ac_gc_always_collect=1 ;;
        misc)           ac_checking=1 ;;
-       rtlflag)        ac_rtlflag_checking=1 ;;
        rtl)            ac_rtl_checking=1 ;;
+       rtlflag)        ac_rtlflag_checking=1 ;;
+       runtime)        ac_runtime_checking=1 ;;
        tree)           ac_tree_checking=1 ;;
-       valgrind)       ac_checking_valgrind=1 ;;
+       valgrind)       ac_valgrind_checking=1 ;;
        *)      { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
 echo "$as_me: error: unknown check category $check" >&2;}
    { (exit 1); exit 1; }; } ;;
@@ -6324,6 +6344,13 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
+if test x$ac_runtime_checking != x ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_RUNTIME_CHECKING 1
+_ACEOF
+
+fi
 if test x$ac_tree_checking != x ; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -6516,7 +6543,7 @@ fi
 
 
 
-if test x$ac_checking_valgrind != x ; then
+if test x$ac_valgrind_checking != x ; then
   # It is certainly possible that there's valgrind but no valgrind.h.
   # GCC relies on making annotations so we must have both.
   echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
@@ -7372,7 +7399,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
 else
     ac_prog_version=`$MAKEINFO --version 2>&1 |
                    sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
-  echo "configure:7375: version of makeinfo is $ac_prog_version" >&5
+  echo "configure:7402: version of makeinfo is $ac_prog_version" >&5
   case $ac_prog_version in
     '')     gcc_cv_prog_makeinfo_modern=no;;
     4.[2-9]*)
@@ -8984,11 +9011,22 @@ fi
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
 for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
-       sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
-       fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
-        scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
-        setlocale
+       sysconf strsignal getrusage nl_langinfo scandir alphasort \
+       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
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -11131,10 +11169,22 @@ CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
 
 
 
-for ac_func in getenv atol sbrk abort atof getcwd getwd \
-       strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
-        fprintf_unlocked strstr errno snprintf vasprintf \
-       malloc realloc calloc free basename getopt clock getpagesize
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in getenv atol sbrk abort atof getcwd getwd strsignal \
+       strstr 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=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
 echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
@@ -11355,6 +11405,10 @@ _ACEOF
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
+# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
+# FREAD and FWRITE macros.  Fortunately, for GCC's single usage of ldgetname
+# in collect2.c, <fcntl.h> 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
@@ -11376,6 +11430,8 @@ cat >>conftest.$ac_ext <<_ACEOF
 #include "ansidecl.h"
 #include "system.h"
 #ifdef HAVE_LDFCN_H
+#undef FREAD
+#undef FWRITE
 #include <ldfcn.h>
 #endif
 
@@ -11976,7 +12032,7 @@ case ${enable_threads} in
     # default
     target_thread_file='single'
     ;;
-  aix | dce | gnat | irix | posix | rtems | \
+  aix | dce | gnat | irix | posix | posix95 | rtems | \
   single | solaris | vxworks | win32 )
     target_thread_file=${enable_threads}
     ;;
@@ -12130,6 +12186,13 @@ _ACEOF
 
 fi
 
+# Convert extra_options into a form suitable for Makefile use.
+extra_opt_files=
+for f in $extra_options; do
+  extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
+done
+
+
 # auto-host.h is the file containing items generated by autoconf and is
 # the first file included by config.h.
 # If host=build, it is correct to have bconfig include auto-host.h
@@ -12179,15 +12242,6 @@ xm_file="ansidecl.h ${xm_file}"
 # UNSORTED
 # --------
 
-# Get the version trigger filename from the toplevel
-if test "${with_gcc_version_trigger+set}" = set; then
-       gcc_version_trigger=$with_gcc_version_trigger
-else
-       gcc_version_trigger=${srcdir}/version.c
-fi
-gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
-gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
-
 # Compile in configure arguments.
 if test -f configargs.h ; then
        # Being re-configured.
@@ -12216,16 +12270,6 @@ static const struct {
 EOF
 
 # Internationalization
-PACKAGE=gcc
-VERSION="$gcc_version"
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-
-
 # If we haven't got the data from the intl directory,
 # assume NLS is disabled.
 USE_NLS=no
@@ -12300,19 +12344,11 @@ if test "${enable_win32_registry+set}" = set; then
   enableval="$enable_win32_registry"
 
 fi;
-case $host_os in
-       win32 | pe | cygwin* | mingw32* | uwin*)
-echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5
-echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6
-if test "x$enable_win32_registry" != xno; then
 
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_WIN32_REGISTRY 1
-_ACEOF
-
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-  echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
+case $host_os in
+  win32 | pe | cygwin* | mingw32* | uwin*)
+    if test "x$enable_win32_registry" != xno; then
+      echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
 echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
 if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12436,41 +12472,29 @@ echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
 if test "$ac_cv_search_RegOpenKeyExA" != no; then
   test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
 
-fi
-
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  enable_win32_registry=no
 fi
 
-# Check if user specified a different registry key.
-case "x${enable_win32_registry}" in
-x | xyes)
-  # default.
-  gcc_cv_win32_registry_key="$VERSION"
-  ;;
-xno)
-  # no registry lookup.
-  gcc_cv_win32_registry_key=''
-  ;;
-*)
-  # user-specified key.
-  gcc_cv_win32_registry_key="$enable_win32_registry"
-  ;;
-esac
+    fi
+
+    if test "x$enable_win32_registry" != xno; then
 
-if test "x$enable_win32_registry" != xno; then
-  echo "$as_me:$LINENO: checking registry key on windows hosts" >&5
-echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_WIN32_REGISTRY 1
+_ACEOF
+
+
+      if test "x$enable_win32_registry" != xyes \
+         && test "x$enable_win32_registry" != x; then
 
 cat >>confdefs.h <<_ACEOF
-#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
+#define WIN32_REGISTRY_KEY "$enable_win32_registry"
 _ACEOF
 
-  echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5
-echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6
-fi
-;;
+      fi
+    fi
+  ;;
 esac
 
 # Get an absolute path to the GCC top-level source directory
@@ -12519,10 +12543,14 @@ case "$LN_S" in
                ;;
 esac
 
+# This is a terrible hack which will go away some day.
+host_cc_for_libada=${CC}
+
+
 out_object_file=`basename $out_file .c`.o
 
-tm_file_list=
-tm_include_list=
+tm_file_list="options.h"
+tm_include_list="options.h"
 for f in $tm_file; do
   case $f in
     defaults.h )
@@ -12683,18 +12711,12 @@ then
     BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
 
     if test "x$TARGET_SYSTEM_ROOT" = x; then
-       STMP_FIXINC=
-       STMP_FIXPROTO=
+       if  "x$STMP_FIXPROTO" != x  ; then
+         STMP_FIXPROTO=stmp-install-fixproto
+       fi
     fi
 fi
 
-# When bootstrapping from the toplevel, only run fixincludes during stage1
-if test -d ../prev-gcc
-then
-    STMP_FIXINC=
-    cp -R ../prev-gcc/include include
-fi
-
 # Expand extra_headers to include complete path.
 # This substitutes for lots of t-* files.
 extra_headers_list=
@@ -12792,6 +12814,8 @@ elif test -x "$AS" && test x$host = x$target; then
        gcc_cv_as="$AS"
 fi
 
+gcc_version=`cat $srcdir/BASE-VER`
+
 if test "x$gcc_cv_as" = x; then
        # Search the same directories that the installed compiler will
        # search.  Else we may find the wrong assembler and lose.  If we
@@ -12815,10 +12839,12 @@ if test "x$gcc_cv_as" = x; then
        fi
 
        # If the loop below does not find an assembler, then use whatever
-       # one we can find in the users's path.
-       # user's path.
+       # one we can find in the users's path.  We are looking for a
+       # ${build} -> ${target} assembler.
        if test "x$program_prefix" != xNONE; then
                gcc_cv_as=${program_prefix}as$build_exeext
+       elif test x$build != x$host && test x$build != x$target; then
+               gcc_cv_as=${target_noncanonical}-as$build_exeext
        else
                gcc_cv_as=`echo as | sed "${program_transform_name}"`$build_exeext
        fi
@@ -12834,7 +12860,7 @@ if test "x$gcc_cv_as" = x; then
            test_dirs=
        fi
 
-       if test x$host = x$target; then
+       if test x$build = x$target; then
            test_dirs="$test_dirs \
                   /usr/libexec \
                   /usr/ccs/gcc \
@@ -12938,11 +12964,13 @@ if test "x$gcc_cv_ld" = x; then
                test_prefix=$exec_prefix
        fi
 
-       # If the loop below does not find an linker, then use whatever
-       # one we can find in the users's path.
-       # user's path.
+       # If the loop below does not find a linker, then use whatever
+       # one we can find in the users's path.  We are looking for a
+       # ${build} -> ${target} linker.
        if test "x$program_prefix" != xNONE; then
                gcc_cv_ld=${program_prefix}ld$build_exeext
+       elif test x$build != x$host && test x$build != x$target; then
+               gcc_cv_ld=${target_noncanonical}-ld$build_exeext
        else
                gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$build_exeext
        fi
@@ -12958,7 +12986,7 @@ if test "x$gcc_cv_ld" = x; then
            test_dirs=
        fi
 
-       if test x$host = x$target; then
+       if test x$build = x$target; then
            test_dirs="$test_dirs \
                   /usr/libexec \
                   /usr/ccs/gcc \
@@ -13006,6 +13034,8 @@ elif test -f $gcc_cv_binutils_srcdir/configure.in \
        $LN_S ../binutils/nm-new$build_exeext nm$build_exeext 2>/dev/null
 elif test "x$program_prefix" != xNONE; then
        gcc_cv_nm=${program_prefix}nm$build_exeext
+elif test x$build != x$host && test x$build != x$target; then
+       gcc_cv_nm=${target_noncanonical}-nm$build_exeext
 else
        gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$build_exeext
 fi
@@ -13031,6 +13061,8 @@ elif test -f $gcc_cv_binutils_srcdir/configure.in \
        $LN_S ../binutils/objdump$build_exeext objdump$build_exeext 2>/dev/null
 elif test "x$program_prefix" != xNONE; then
        gcc_cv_objdump=${program_prefix}objdump$build_exeext
+elif test x$build != x$host && test x$build != x$target; then
+       gcc_cv_objdump=${target_noncanonical}-objdump$build_exeext
 else
        gcc_cv_objdump=`echo objdump | \
                sed "${program_transform_name}"`$build_exeext
@@ -13204,6 +13236,44 @@ _ACEOF
 
 fi
 
+echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
+echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
+if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_nsubspa_comdat=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
+  then gcc_cv_as_nsubspa_comdat=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo '     .SPACE $TEXT$
+       .NSUBSPA $CODE$,COMDAT' > conftest.s
+    if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }
+    then
+       gcc_cv_as_nsubspa_comdat=yes
+    else
+      echo "configure: failed program was" >&5
+      cat conftest.s >&5
+    fi
+    rm -f conftest.o conftest.s
+  fi
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
+echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
+if test $gcc_cv_as_nsubspa_comdat = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GAS_NSUBSPA_COMDAT 1
+_ACEOF
+
+fi
+
 # .hidden needs to be supported in both the assembler and the linker,
 # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
 # This is irritatingly difficult to feature test for; we have to check the
@@ -13644,6 +13714,15 @@ foo:   .long   25
        tls_first_minor=13
        tls_as_opt=--fatal-warnings
        ;;
+  frv*-*-*)
+    conftest_s='
+       .section ".tdata","awT",@progbits
+x:      .long   25
+        .text
+        call    #gettlsoff(x)'
+       tls_first_major=2
+       tls_first_minor=14
+       ;;
   i[34567]86-*-*)
     conftest_s='
        .section ".tdata","awT",@progbits
@@ -13697,6 +13776,23 @@ foo:   data8   25
        tls_first_minor=13
        tls_as_opt=--fatal-warnings
        ;;
+  mips*-*-*)
+    conftest_s='
+       .section .tdata,"awT",@progbits
+x:
+       .word 2
+       .text
+       addiu $4, $28, %tlsgd(x)
+       addiu $4, $28, %tlsldm(x)
+       lui $4, %dtprel_hi(x)
+       addiu $4, $4, %dtprel_lo(x)
+       lw $4, %gottprel(x)($28)
+       lui $4, %tprel_hi(x)
+       addiu $4, $4, %tprel_lo(x)'
+       tls_first_major=2
+       tls_first_minor=16
+       tls_as_opt='-32 --fatal-warnings'
+       ;;
   powerpc-*-*)
     conftest_s='
        .section ".tdata","awT",@progbits
 
 # Target-specific assembler checks.
 
+echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
+echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
+gcc_cv_ld_static_dynamic=no
+if test $in_tree_ld = yes ; then
+  if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
+    gcc_cv_ld_static_dynamic=yes
+  fi
+elif test x$gcc_cv_ld != x; then
+       # Check if linker supports -Bstatic/-Bdynamic option
+       if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
+         && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
+               gcc_cv_ld_static_dynamic=yes
+       fi
+fi
+if test x"$gcc_cv_ld_static_dynamic" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LD_STATIC_DYNAMIC 1
+_ACEOF
+
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
+echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
+
 if test x"$demangler_in_ld" = xyes; then
   echo "$as_me:$LINENO: checking linker --demangle support" >&5
 echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
@@ -14214,7 +14334,7 @@ else
        if test x$gcc_cv_objdump != x \
        && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
           | grep ' 82106000 82106000' > /dev/null 2>&1; then
-        gcc_cv_as_offsetable_lo10=yes
+        gcc_cv_as_sparc_offsetable_lo10=yes
        fi
     else
       echo "configure: failed program was" >&5
     case $target in
       *-*-aix*) conftest_s='   .csect .text[PR]
        mfcr 3,128';;
-      *-*-darwin*) conftest_s='        .text
+      *-*-darwin*)
+       echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
+echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
+if test "${gcc_cv_as_machine_directive+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_machine_directive=no
+  if test x$gcc_cv_as != x; then
+    echo '     .machine ppc7400' > conftest.s
+    if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }
+    then
+       gcc_cv_as_machine_directive=yes
+    else
+      echo "configure: failed program was" >&5
+      cat conftest.s >&5
+    fi
+    rm -f conftest.o conftest.s
+  fi
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
+echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
+
+       if test x$gcc_cv_as_machine_directive != xyes; then
+         echo "*** This target requires an assembler supporting \".machine\"" >&2
+         echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
+         test x$build = x$target && exit 1
+       fi
+       conftest_s='    .text
        mfcr r3,128';;
       *) conftest_s='  .machine power4
        .text
@@ -14581,8 +14733,9 @@ fi
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }
     then
-       # ??? This fails with non-gnu grep.  Maybe use objdump?
-   if grep debug_line conftest.o > /dev/null 2>&1; then
+       if test x$gcc_cv_objdump != x \
+   && $gcc_cv_objdump -h conftest.o 2> /dev/null \
+      | grep debug_line > /dev/null 2>&1; then
      gcc_cv_as_dwarf2_debug_line=yes
    fi
     else
 if test "${with_gc+set}" = set; then
   withval="$with_gc"
   case "$withval" in
-  page | zone)
+  page)
+    GGC=ggc-$withval
+    ;;
+  zone)
     GGC=ggc-$withval
+
+cat >>confdefs.h <<\_ACEOF
+#define GGC_ZONE 1
+_ACEOF
+
     ;;
   *)
     { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
@@ -14990,7 +15151,7 @@ all_languages=
 all_boot_languages=
 all_compilers=
 all_stagestuff=
-all_outputs='Makefile gccbug mklibgcc mkheaders libada-mk'
+all_outputs='Makefile gccbug mklibgcc libada-mk'
 # List of language makefile fragments.
 all_lang_makefrags=
 # List of language subdirectory makefiles.  Deprecated.
@@ -15229,24 +15390,6 @@ objdir=`${PWDCMD-pwd}`
 
 
 
-
-
-
-
-if test x"$SET_GCC_LIB_PATH_CMD" != x; then
-  # SET_GCC_LIB_PATH_CMD is "XXX=path; export XXX;". It is expanded to
-  #
-  #    eval "set_gcc_lib_path=XXX=path; export XXX;"
-  #
-  eval "set_gcc_lib_path=$SET_GCC_LIB_PATH_CMD"
-  # It will set set_gcc_lib_path to "export XXX=path" for GNU make.
-  set_gcc_lib_path="export $set_gcc_lib_path"
-else
-  set_gcc_lib_path=
-fi
-
-
-
 # Echo link setup.
 if test x${build} = x${host} ; then
   if test x${host} = x${target} ; then
@@ -15974,8 +16117,7 @@ s,@manext@,$manext,;t t
 s,@objext@,$objext,;t t
 s,@gthread_flags@,$gthread_flags,;t t
 s,@extra_modes_file@,$extra_modes_file,;t t
-s,@PACKAGE@,$PACKAGE,;t t
-s,@VERSION@,$VERSION,;t t
+s,@extra_opt_files@,$extra_opt_files,;t t
 s,@USE_NLS@,$USE_NLS,;t t
 s,@LIBINTL@,$LIBINTL,;t t
 s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
@@ -15984,6 +16126,7 @@ s,@XGETTEXT@,$XGETTEXT,;t t
 s,@GMSGFMT@,$GMSGFMT,;t t
 s,@POSUB@,$POSUB,;t t
 s,@CATALOGS@,$CATALOGS,;t t
+s,@host_cc_for_libada@,$host_cc_for_libada,;t t
 s,@CROSS@,$CROSS,;t t
 s,@ALL@,$ALL,;t t
 s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
@@ -16034,9 +16177,6 @@ s,@float_h_file@,$float_h_file,;t t
 s,@gcc_config_arguments@,$gcc_config_arguments,;t t
 s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
 s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t
-s,@gcc_version@,$gcc_version,;t t
-s,@gcc_version_full@,$gcc_version_full,;t t
-s,@gcc_version_trigger@,$gcc_version_trigger,;t t
 s,@host_exeext@,$host_exeext,;t t
 s,@host_xm_file_list@,$host_xm_file_list,;t t
 s,@host_xm_include_list@,$host_xm_include_list,;t t
@@ -16065,7 +16205,6 @@ s,@xm_defines@,$xm_defines,;t t
 s,@c_target_objs@,$c_target_objs,;t t
 s,@cxx_target_objs@,$cxx_target_objs,;t t
 s,@target_cpu_default@,$target_cpu_default,;t t
-s,@set_gcc_lib_path@,$set_gcc_lib_path,;t t
 s,@GMPLIBS@,$GMPLIBS,;t t
 s,@GMPINC@,$GMPINC,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t