OSDN Git Service

* common.opt (fshow-column): Default to 0.
[pf3gnuchains/gcc-fork.git] / gcc / configure
index d7f8b1c..50e5fd6 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_decimal_float 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 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump ORIGINAL_OBJDUMP_FOR_TARGET 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_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_libsubdir 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 loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir 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 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 DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages 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 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 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.
@@ -862,14 +862,13 @@ Optional Features:
                           put copies of generated files in source dir
                           intended for creating source tarballs for users
                           without texinfo bison or flex.
-  --enable-werror-always         enable -Werror always
-  --enable-werror         enable -Werror in bootstrap stage2 and later
+  --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,fold,gc,gcac,misc,
-                         rtlflag,rtl,runtime,tree,valgrind.
+                         Flags are: assert,df,fold,gc,gcac,misc,
+                         rtlflag,rtl,runtime,tree,valgrind,types.
   --enable-mapped-location   location_t is fileline integer cookie
   --enable-coverage=LEVEL
                          enable compiler's code coverage collection.
@@ -880,7 +879,11 @@ Optional Features:
   --enable-gather-detailed-mem-stats         enable detailed memory allocation stats gathering
   --enable-multilib       enable library support for multiple ABIs
   --enable-__cxa_atexit   enable __cxa_atexit for C++
-  --enable-decimal-float  enable decimal float extension to C
+  --enable-decimal-float={no,yes,bid,dpd}
+                       enable decimal float extension to C.  Selecting 'bid'
+                       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
@@ -912,6 +915,7 @@ Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-build-libsubdir=DIR  Directory where to find libraries for build system
   --with-local-prefix=DIR specifies directory to put local include
   --with-gxx-include-dir=DIR
                           specifies directory to put g++ header files
@@ -928,14 +932,20 @@ Optional Packages:
   --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-pkgversion=PKG   Use PKG in the version string in place of "GCC"
+  --with-bugurl=URL       Direct users to URL to report a bug
   --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-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-slibdir=DIR      shared libraries in DIR [LIBDIR]
+  --with-datarootdir=DIR  Use DIR as the data root [PREFIX/share]
+  --with-docdir=DIR       Install documentation in DIR [DATAROOTDIR]
+  --with-htmldir=DIR      html documentation in in DIR [DOCDIR]
 
 Some influential environment variables:
   CC          C compiler command
@@ -1521,8 +1531,26 @@ esac
 
 
 # Determine the target- and build-specific subdirectories
-  # Prefix 'build-' so this never conflicts with target_subdir.
+
+# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
+# have matching libraries, they should use host libraries: Makefile.tpl
+# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
+# However, they still use the build modules, because the corresponding
+# host modules (e.g. bison) are only built for the host when bootstrap
+# finishes. So:
+# - build_subdir is where we find build modules, and never changes.
+# - build_libsubdir is where we find build libraries, and can be overridden.
+
+# Prefix 'build-' so this never conflicts with target_subdir.
 build_subdir="build-${build_noncanonical}"
+
+# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
+if test "${with_build_libsubdir+set}" = set; then
+  withval="$with_build_libsubdir"
+  build_libsubdir="$withval"
+else
+  build_libsubdir="$build_subdir"
+fi;
 # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
 if ( test $srcdir = . && test -d gcc ) \
    || test -d $srcdir/../host-${host_noncanonical}; then
@@ -1654,12 +1682,16 @@ no)     ;;
 esac
 fi;
 
+# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
 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
-    libstdcxx_incdir='c++/$(version)'
-    gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
+    libstdcxx_incdir='include/c++/$(version)'
+    if test x$host != x$target; then
+       libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
+    fi
+    gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
   fi
 fi
 
@@ -1738,6 +1770,13 @@ _ACEOF
 
 fi
 
+gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GNU_LD $gnu_ld
+_ACEOF
+
+
 echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
 echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
 if test x"${DEFAULT_LINKER+set}" = x"set"; then
@@ -1798,6 +1837,13 @@ _ACEOF
 
 fi
 
+gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GNU_AS $gnu_as
+_ACEOF
+
+
 echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
 echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
@@ -2872,6 +2918,14 @@ fi
 
 
 
+# Remove the -O2: for historical reasons, unless bootstrapping we prefer
+# optimizations to be activated explicitly by the toplevel.
+case "$CC" in
+  */prev-gcc/xgcc*) ;;
+  *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
+esac
+
+
 # -------------------------
 # Check C compiler features
 # -------------------------
@@ -6059,22 +6113,35 @@ fi
 # We want to use -pedantic, but we don't want warnings about
 # * 'long long'
 # * variadic macros
+# * overlong strings
 # So, we only use -pedantic if we can disable those warnings.
 
-echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
-echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
+loose_warn=
+save_CFLAGS="$CFLAGS"
+for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \
+                         -Wmissing-prototypes; do
+  as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
+
+  echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
+echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
+if eval "test \"\${$as_acx_Woption+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="-Wno-long-long"
-  cat >conftest.$ac_ext <<_ACEOF
+  CFLAGS="$option"
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -6098,34 +6165,50 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_prog_cc_w_no_long_long=yes
+  eval "$as_acx_Woption=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_cc_w_no_long_long=no
+eval "$as_acx_Woption=no"
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  CFLAGS="$save_CFLAGS"
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
+  if test `eval echo '${'$as_acx_Woption'}'` = yes; then
+  loose_warn="$loose_warn${loose_warn:+ }$option"
+fi
+
+  done
+CFLAGS="$save_CFLAGS"
+
+cxx_compat_warn=
+save_CFLAGS="$CFLAGS"
+for option in -Wc++-compat; do
+  as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
 
-echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
-echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
+  echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
+echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
+if eval "test \"\${$as_acx_Woption+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="-Wno-variadic-macros"
-  cat >conftest.$ac_ext <<_ACEOF
+  CFLAGS="$option"
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -6149,41 +6232,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_prog_cc_w_no_variadic_macros=yes
+  eval "$as_acx_Woption=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_cc_w_no_variadic_macros=no
+eval "$as_acx_Woption=no"
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  CFLAGS="$save_CFLAGS"
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
-
-strict1_warn=
-if test $ac_cv_prog_cc_w_no_long_long = yes \
-   && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then
-  strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros"
+echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
+  if test `eval echo '${'$as_acx_Woption'}'` = yes; then
+  cxx_compat_warn="$cxx_compat_warn${cxx_compat_warn:+ }$option"
 fi
 
-# Add -Wold-style-definition if it's accepted
-echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
-echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
+  done
+CFLAGS="$save_CFLAGS"
+
+strict_warn=
+save_CFLAGS="$CFLAGS"
+for option in -Wold-style-definition \
+                          -Wmissing-format-attribute; do
+  as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
+
+  echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
+echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
+if eval "test \"\${$as_acx_Woption+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="-Wold-style-definition"
-  cat >conftest.$ac_ext <<_ACEOF
+  CFLAGS="$option"
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -6207,38 +6300,50 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_prog_cc_w_old_style_definition=yes
+  eval "$as_acx_Woption=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_cc_w_old_style_definition=no
+eval "$as_acx_Woption=no"
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  CFLAGS="$save_CFLAGS"
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
-if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
-  strict1_warn="${strict1_warn} -Wold-style-definition"
+echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
+  if test `eval echo '${'$as_acx_Woption'}'` = yes; then
+  strict_warn="$strict_warn${strict_warn:+ }$option"
 fi
 
-# Add -Wmissing-format-attribute if it's accepted
-echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
-echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
+  done
+CFLAGS="$save_CFLAGS"
+
+if test "$GCC" = yes; then
+  echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
+                                    -Wno-overlength-strings" >&5
+echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
+                                    -Wno-overlength-strings... $ECHO_C" >&6
+if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   save_CFLAGS="$CFLAGS"
-  CFLAGS="-Wmissing-format-attribute"
-  cat >conftest.$ac_ext <<_ACEOF
+CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros \
+                                    -Wno-overlength-strings"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -6262,71 +6367,56 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_prog_cc_w_missing_format_attribute=yes
+  acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_cc_w_missing_format_attribute=no
+acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  CFLAGS="$save_CFLAGS"
-
+CFLAGS="$save_CFLAGS"
+fi
+echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&5
+echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&6
+if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings = yes; then
+  strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros \
+                                    -Wno-overlength-strings"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6
-if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
-  strict1_warn="${strict1_warn} -Wmissing-format-attribute"
+
+
 fi
 
-# Enable -Werror, period.
-# Check whether --enable-werror_always or --disable-werror_always was given.
+
+# Check whether --enable-werror-always or --disable-werror-always was given.
 if test "${enable_werror_always+set}" = set; then
   enableval="$enable_werror_always"
 
 else
   enable_werror_always=no
 fi;
-if test x${enable_werror_always} = xyes ; then
-  strict1_warn="${strict1_warn} -Werror"
-  WERROR=-Werror
+if test $enable_werror_always = yes; then
+  strict_warn="$strict_warn${strict_warn:+ }-Werror"
 fi
 
 
 
-# If the native compiler is GCC, we can enable warnings even in stage1.
-# That's useful for people building cross-compilers, or just running a
-# quick `make'.
+
+# The above macros do nothing if the compiler is not GCC.  However, the
+# Makefile has more goo to add other flags, so this variabl is used to
+# enables warnings only for GCC.
 warn_cflags=
 if test "x$GCC" = "xyes"; then
   warn_cflags='$(GCC_WARN_CFLAGS)'
 fi
 
 
-# Enable -Werror in bootstrap stage2 and later.
+# Enable expensive internal checks
 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"
-
-else
-  if test x$is_release = x ; then
-  # Default to "yes" on development branches.
-  enable_werror=yes
-else
-  # Default to "no" on release branches.
-  enable_werror=no
-fi
-fi;
-if test x$enable_werror = xyes ; then
-  WERROR=-Werror
-fi
-
 
-# Enable expensive internal checks
 # Check whether --enable-checking or --disable-checking was given.
 if test "${enable_checking+set}" = set; then
   enableval="$enable_checking"
@@ -6340,43 +6430,38 @@ else
   ac_checking_flags=release
 fi
 fi;
-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=
 IFS="${IFS=    }"; ac_save_IFS="$IFS"; IFS="$IFS,"
-for check in $ac_checking_flags
+for check in release $ac_checking_flags
 do
        case $check in
        # these set all the flags to specific states
-       yes)            ac_assert_checking=1 ; ac_checking=1 ;
+       yes)            ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
                        ac_fold_checking= ; ac_gc_checking=1 ;
                        ac_gc_always_collect= ; ac_rtl_checking= ;
                        ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
-                       ac_tree_checking=1 ; ac_valgrind_checking= ;;
-       no|none)        ac_assert_checking= ; ac_checking= ;
+                       ac_tree_checking=1 ; ac_valgrind_checking= ;
+                       ac_types_checking= ;;
+       no|none)        ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
                        ac_fold_checking= ; ac_gc_checking= ;
                        ac_gc_always_collect= ; ac_rtl_checking= ;
                        ac_rtlflag_checking= ; ac_runtime_checking= ;
-                       ac_tree_checking= ; ac_valgrind_checking= ;;
-       all)            ac_assert_checking=1 ; ac_checking=1 ;
+                       ac_tree_checking= ; ac_valgrind_checking= ;
+                       ac_types_checking= ;;
+       all)            ac_assert_checking=1 ; ac_checking=1 ; ac_df_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_tree_checking=1 ; ac_valgrind_checking= ;
+                       ac_types_checking=1 ;;
+       release)        ac_assert_checking=1 ; ac_checking= ; ac_df_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= ;;
+                       ac_tree_checking= ; ac_valgrind_checking= ;
+                       ac_types_checking= ;;
        # these enable particular checks
        assert)         ac_assert_checking=1 ;;
+       df)             ac_df_checking=1 ;;
        fold)           ac_fold_checking=1 ;;
        gc)             ac_gc_checking=1 ;;
        gcac)           ac_gc_always_collect=1 ;;
@@ -6385,6 +6470,7 @@ do
        rtlflag)        ac_rtlflag_checking=1 ;;
        runtime)        ac_runtime_checking=1 ;;
        tree)           ac_tree_checking=1 ;;
+       types)          ac_types_checking=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;}
@@ -6403,6 +6489,13 @@ _ACEOF
   nocommon_flag=-fno-common
 fi
 
+if test x$ac_df_checking != x ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_DF_CHECKING 1
+_ACEOF
+
+fi
 if test x$ac_assert_checking != x ; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -6426,6 +6519,13 @@ _ACEOF
 
   TREEBROWSER=tree-browser.o
 fi
+if test x$ac_types_checking != x ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_TYPES_CHECKING 1
+_ACEOF
+
+fi
 
 if test x$ac_rtl_checking != x ; then
 
@@ -6800,7 +6900,7 @@ if test "${enable_mapped_location+set}" = set; then
   enableval="$enable_mapped_location"
 
 else
-  enable_mapped_location=no
+  enable_mapped_location=yes
 fi;
 
 if test "$enable_mapped_location" = yes ; then
@@ -6888,37 +6988,90 @@ fi;
 if test "${enable_decimal_float+set}" = set; then
   enableval="$enable_decimal_float"
 
-  if test x$enablevar = xyes ; then
-    case $target in
-    powerpc*-*-linux* | i?86*-*-linux*)
+  case $enable_decimal_float in
+    yes | no | bid | dpd) ;;
+    *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
+Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5
+echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
+Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;}
+   { (exit 1); exit 1; }; } ;;
+  esac
+
+else
+
+  case $target in
+    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
+      enable_decimal_float=yes
       ;;
     *)
       { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
 echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
       enable_decimal_float=no
       ;;
+  esac
+
+fi;
+
+dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
+
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_DECIMAL_FLOAT $dfp
+_ACEOF
+
+
+# x86's use BID format instead of DPD
+case x$enable_decimal_float in
+  xyes)
+    case $target in
+      i?86*-*-linux* | x86_64*-*-linux*)
+       enable_decimal_float=bid
+       ;;
+      *)
+       enable_decimal_float=dpd
+       ;;
     esac
-  fi
+    ;;
+  xno)
+    # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
+    # dependency on libdecnumber.
+    enable_decimal_float=dpd
+    ;;
+esac
+
+
+bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
+
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_DECIMAL_BID_FORMAT $bid
+_ACEOF
+
+
+# Enable C extension for fixed-point arithmetic.
+# Check whether --enable-fixed-point or --disable-fixed-point was given.
+if test "${enable_fixed_point+set}" = set; then
+  enableval="$enable_fixed_point"
+
 
 else
 
   case $target in
-  powerpc*-*-linux*)
-    enable_decimal_float=yes
-    ;;
-  *)
-    enable_decimal_float=no
-    ;;
+    mips*-*-*)
+      enable_fixed_point=yes
+      ;;
+    *)
+      { echo "$as_me:$LINENO: WARNING: fixed-point is not supported for this target" >&5
+echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;}
+      enable_fixed_point=no
+      ;;
   esac
 
 fi;
 
 
-
-dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi`
+fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
 
 cat >>confdefs.h <<_ACEOF
-#define ENABLE_DECIMAL_FLOAT $dfp
+#define ENABLE_FIXED_POINT $fixedpoint
 _ACEOF
 
 
@@ -7012,19 +7165,22 @@ if test "${with_sysroot+set}" = set; then
  esac
 
  TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
- CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
+ CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
 
+ if test "x$prefix" = xNONE; then
+  test_prefix=/usr/local
+ else
+  test_prefix=$prefix
+ fi
  if test "x$exec_prefix" = xNONE; then
-  if test "x$prefix" = xNONE; then
-   test_prefix=/usr/local
-  else
-   test_prefix=$prefix
-  fi
+  test_exec_prefix=$test_prefix
  else
-  test_prefix=$exec_prefix
+  test_exec_prefix=$exec_prefix
  fi
  case ${TARGET_SYSTEM_ROOT} in
  "${test_prefix}"|"${test_prefix}/"*|\
+ "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
+ '${prefix}'|'${prefix}/'*|\
  '${exec_prefix}'|'${exec_prefix}/'*)
    t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
    TARGET_SYSTEM_ROOT_DEFINE="$t"
@@ -7055,6 +7211,56 @@ else
 fi;
 
 
+
+
+# Check whether --with-pkgversion or --without-pkgversion was given.
+if test "${with_pkgversion+set}" = set; then
+  withval="$with_pkgversion"
+  case "$withval" in
+      yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
+echo "$as_me: error: package version not specified" >&2;}
+   { (exit 1); exit 1; }; } ;;
+      no)  PKGVERSION= ;;
+      *)   PKGVERSION="($withval) " ;;
+     esac
+else
+  PKGVERSION="(GCC) "
+
+fi;
+
+
+
+
+# Check whether --with-bugurl or --without-bugurl was given.
+if test "${with_bugurl+set}" = set; then
+  withval="$with_bugurl"
+  case "$withval" in
+      yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
+echo "$as_me: error: bug URL not specified" >&2;}
+   { (exit 1); exit 1; }; } ;;
+      no)  BUGURL=
+          ;;
+      *)   BUGURL="$withval"
+          ;;
+     esac
+else
+  BUGURL="http://gcc.gnu.org/bugs.html"
+
+fi;
+  case ${BUGURL} in
+  "")
+    REPORT_BUGS_TO=
+    REPORT_BUGS_TEXI=
+    ;;
+  *)
+    REPORT_BUGS_TO="<$BUGURL>"
+    REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
+    ;;
+  esac;
+
+
+
+
 # Sanity check enable_languages in case someone does not run the toplevel
 # configure # script.
 # Check whether --enable-languages or --disable-languages was given.
@@ -7082,27 +7288,9 @@ else
   enable_languages=c
 fi;
 
-subdirs=
-for lang in ${srcdir}/*/config-lang.in
-do
-       case $lang in
-       # The odd quoting in the next line works around
-       # an apparent bug in bash 1.12 on linux.
-       ${srcdir}/[*]/config-lang.in) ;;
-       *)
-         lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
-         if test "x$lang_alias" = x
-         then
-               echo "$lang doesn't set \$language." 1>&2
-               exit 1
-         fi
-         case ",$enable_languages," in
-         *,$lang_alias,*)
-           subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
-         esac
-         ;;
-       esac
-done
+# Used by documentation targets
+
+
 
 
 # -------------------------
@@ -7481,14 +7669,10 @@ echo "${ECHO_T}no" >&6
 fi
 
 
-MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
-
 # See if makeinfo has been installed and is modern enough
 # that we can use it.
 
-ac_executable_extensions="$build_exeext"
-
-# Extract the first word of "makeinfo", so it can be a program name with args.
+  # Extract the first word of "makeinfo", so it can be a program name with args.
 set dummy makeinfo; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -7523,32 +7707,33 @@ else
 echo "${ECHO_T}no" >&6
 fi
 
-if test -n "$MAKEINFO"; then
-  # Found it, now check the version.
-  echo "$as_me:$LINENO: checking for modern makeinfo" >&5
+  if test -n "$MAKEINFO"; then
+    # Found it, now check the version.
+    echo "$as_me:$LINENO: checking for modern makeinfo" >&5
 echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
 if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-    ac_prog_version=`$MAKEINFO --version 2>&1 |
-                   sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
-  echo "configure:7535: version of makeinfo is $ac_prog_version" >&5
-  case $ac_prog_version in
-    '')     gcc_cv_prog_makeinfo_modern=no;;
-    4.[4-9]*)
-            gcc_cv_prog_makeinfo_modern=yes;;
-    *)      gcc_cv_prog_makeinfo_modern=no;;
-  esac
+  ac_prog_version=`eval $MAKEINFO --version 2>&1 |
+                                     sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
+
+                    case $ac_prog_version in
+                      '')  gcc_cv_prog_makeinfo_modern=no;;
+                      4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*)  gcc_cv_prog_makeinfo_modern=yes;;
+                      *)   gcc_cv_prog_makeinfo_modern=no;;
+                    esac
 
 fi
 echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
 echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
-else
-  gcc_cv_prog_makeinfo_modern=no
-fi
+  else
+    gcc_cv_prog_makeinfo_modern=no
+  fi
+  if test $gcc_cv_prog_makeinfo_modern = no; then
+    MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
+  fi
 
 if test $gcc_cv_prog_makeinfo_modern = no; then
-  MAKEINFO="$MISSING makeinfo"
   { echo "$as_me:$LINENO: WARNING:
 *** Makeinfo is missing or too old.
 *** Info documentation will not be built." >&5
@@ -7575,6 +7760,8 @@ echo "${ECHO_T}no" >&6
 fi
 
 
+MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
+
 # How about lex?
 for ac_prog in flex
 do
@@ -8707,26 +8894,6 @@ esac
 # UNSORTED
 # --------
 
-# Stage specific cflags for build.
-stage1_cflags=
-case $build in
-vax-*-*)
-  if test x$GCC = xyes
-  then
-    stage1_cflags="-Wa,-J"
-  else
-    stage1_cflags="-J"
-  fi
-  ;;
-powerpc-*-darwin*)
-  # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
-  # sources; use -no-cpp-precomp to get to GNU cpp.
-  # Apple's GCC has bugs in designated initializer handling, so disable
-  # that too.
-  stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
-  ;;
-esac
-
 
 # These libraries may be used by collect2.
 # We may need a special search path to get them linked.
 done
 
 
-# More time-related stuff.
-echo "$as_me:$LINENO: checking for struct tms" >&5
-echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
-if test "${ac_cv_struct_tms+set}" = set; then
+
+for ac_func in sigaltstack
+do
+  ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
+echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
+echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
+if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
 
 #include "ansidecl.h"
 #include "system.h"
-#ifdef HAVE_SYS_TIMES_H
-#include <sys/times.h>
-#endif
+#include <signal.h>
+
 
 int
 main ()
 {
-struct tms tms;
+#ifndef $ac_func
+char *(*pfn) = (char *(*)) $ac_func ;
+#endif
   ;
   return 0;
 }
@@ -11725,30 +11897,37 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_struct_tms=yes
+  eval "gcc_cv_have_decl_$ac_func=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_struct_tms=no
+eval "gcc_cv_have_decl_$ac_func=no"
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
-echo "${ECHO_T}$ac_cv_struct_tms" >&6
-if test $ac_cv_struct_tms = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_TMS 1
+if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
+#define $ac_tr_decl 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
+#define $ac_tr_decl 0
 _ACEOF
 
 fi
 
-# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
-# revisit after autoconf 2.50.
-echo "$as_me:$LINENO: checking for clock_t" >&5
-echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
-if test "${gcc_cv_type_clock_t+set}" = set; then
+done
+
+
+# More time-related stuff.
+echo "$as_me:$LINENO: checking for struct tms" >&5
+echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
+if test "${ac_cv_struct_tms+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -11761,11 +11940,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include "ansidecl.h"
 #include "system.h"
+#ifdef HAVE_SYS_TIMES_H
+#include <sys/times.h>
+#endif
 
 int
 main ()
 {
-clock_t x;
+struct tms tms;
   ;
   return 0;
 }
@@ -11792,12 +11974,79 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gcc_cv_type_clock_t=yes
+  ac_cv_struct_tms=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gcc_cv_type_clock_t=no
+ac_cv_struct_tms=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
+echo "${ECHO_T}$ac_cv_struct_tms" >&6
+if test $ac_cv_struct_tms = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_TMS 1
+_ACEOF
+
+fi
+
+# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
+# revisit after autoconf 2.50.
+echo "$as_me:$LINENO: checking for clock_t" >&5
+echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
+if test "${gcc_cv_type_clock_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include "ansidecl.h"
+#include "system.h"
+
+int
+main ()
+{
+clock_t x;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (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_type_clock_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_type_clock_t=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
@@ -11976,6 +12225,15 @@ if test "${with_system_libunwind+set}" = set; then
 
 fi;
 
+# config.gcc also contains tests of with_system_libunwind.
+if test x$with_system_libunwind = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETIPINFO 1
+_ACEOF
+
+fi
+
 # --------------------------------------------------------
 # Build, host, and target specific configuration fragments
 # --------------------------------------------------------
@@ -12114,6 +12372,64 @@ if test "$host_xm_file" != "$build_xm_file"; then
        fi
 fi
 
+case ${host} in
+  powerpc*-*-darwin*)
+    echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
+echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
+if test "${gcc_cv_mcontext_underscores+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+#include <sys/cdefs.h>
+#include <sys/signal.h>
+#include <ucontext.h>
+int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (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_mcontext_underscores=no
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_mcontext_underscores=yes
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
+echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
+      if test $gcc_cv_mcontext_underscores = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAS_MCONTEXT_T_UNDERSCORES
+_ACEOF
+
+      fi
+    ;;
+esac
+
 # ---------
 # Threading
 # ---------
@@ -12129,7 +12445,7 @@ case ${enable_threads} in
     target_thread_file='single'
     ;;
   aix | dce | gnat | irix | posix | posix95 | rtems | \
-  single | solaris | vxworks | win32 )
+  single | solaris | vxworks | win32 | mipssde)
     target_thread_file=${enable_threads}
     ;;
   *)
@@ -12161,7 +12477,14 @@ use_cxa_atexit=no
 if test x$enable___cxa_atexit = xyes || \
    test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
   if test x$host = x$target; then
-    echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
+    case $host in
+      # mingw32 doesn't have __cxa_atexit but uses atexit registration
+      # keyed to flag_use_cxa_atexit
+      *-*-mingw32*)
+       use_cxa_atexit=yes
+       ;;
+      *)
+       echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
 echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
 if test "${ac_cv_func___cxa_atexit+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12257,6 +12580,8 @@ else
   echo "__cxa_atexit can't be enabled on this target"
 fi
 
+       ;;
+    esac
   else
     # We can't check for __cxa_atexit when building a cross, so assume
     # it is available
   if test x$use_cxa_atexit = xyes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define DEFAULT_USE_CXA_ATEXIT 1
+#define DEFAULT_USE_CXA_ATEXIT 2
 _ACEOF
 
   fi
 fi
 
+use_getipinfo=yes
+if test x$with_system_libunwind = xyes; then
+   if test x$host = x$target; then
+     echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5
+echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6
+if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search__Unwind_GetIPInfo=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char _Unwind_GetIPInfo ();
+int
+main ()
+{
+_Unwind_GetIPInfo ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (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
+  ac_cv_search__Unwind_GetIPInfo="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search__Unwind_GetIPInfo" = no; then
+  for ac_lib in unwind; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char _Unwind_GetIPInfo ();
+int
+main ()
+{
+_Unwind_GetIPInfo ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (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
+  ac_cv_search__Unwind_GetIPInfo="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5
+echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6
+if test "$ac_cv_search__Unwind_GetIPInfo" != no; then
+  test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS"
+
+else
+  use_getipinfo=no
+fi
+
+   fi
+fi
+
+if test x$use_getipinfo = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETIPINFO 1
+_ACEOF
+
+else
+   echo "The system unwind library does not support _Unwind_GetIPInfo."
+fi
+
 # Look for a file containing extra machine modes.
 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
   extra_modes_file='$(srcdir)'/config/${extra_modes}
@@ -12375,8 +12844,9 @@ INCINTL=
 XGETTEXT=
 GMSGFMT=
 POSUB=
-if test -f ../intl/config.intl; then
-  . ../intl/config.intl
+
+if test -f  ../intl/config.intl; then
+  .  ../intl/config.intl
 fi
 echo "$as_me:$LINENO: checking whether NLS is requested" >&5
 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
@@ -12408,8 +12878,8 @@ echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
     # by the backticks, then collapsed again by the double quotes,
     # leaving us with one backslash in the sed expression (right
     # before the dot that mustn't act as a wildcard).
-    cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
-    lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
+    cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
+    lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
     # The user is allowed to set LINGUAS to a list of languages to
     # install catalogs for.  If it's empty that means "all of them."
     if test "x$LINGUAS" = x; then
@@ -12426,6 +12896,16 @@ echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
   LINGUAS="$XLINGUAS"
   echo "$as_me:$LINENO: result: $LINGUAS" >&5
 echo "${ECHO_T}$LINGUAS" >&6
+
+
+    DATADIRNAME=share
+
+  INSTOBJEXT=.mo
+
+  GENCAT=gencat
+
+  CATOBJEXT=.gmo
+
 fi
 
 # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
 done
 tmake_file="${tmake_file_}"
 
-# If the host doesn't support symlinks, modify CC in
-# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
-# Otherwise, we can use "CC=$(CC)".
-rm -f symtest.tem
-case "$LN_S" in
-       *-s*)
-               cc_set_by_configure="\$(CC)"
-               quoted_cc_set_by_configure="\$(CC)"
-               stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
-               quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
-               ;;
-       *)
-               cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
-               quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
-               stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
-               quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
-               ;;
-esac
-
 # This is a terrible hack which will go away some day.
 host_cc_for_libada=${CC}
 
@@ -12655,6 +13116,11 @@ tm_file_list="options.h"
 tm_include_list="options.h"
 for f in $tm_file; do
   case $f in
+    ./* )
+       f=`echo $f | sed 's/^..//'`
+       tm_file_list="${tm_file_list} $f"
+       tm_include_list="${tm_include_list} $f"
+       ;;
     defaults.h )
        tm_file_list="${tm_file_list} \$(srcdir)/$f"
        tm_include_list="${tm_include_list} $f"
@@ -12736,14 +13202,15 @@ for f in $build_xm_file; do
   esac
 done
 
-# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
+# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
+# cross-compiler which does not use the native headers and libraries.
 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
 CROSS=
 ALL=all.internal
 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
 
 if test "x$with_build_sysroot" != x; then
-  build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
+  build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
 else
   # This value is used, even on a native system, because
   # CROSS_SYSTEM_HEADER_DIR is just
@@ -12753,7 +13220,7 @@ fi
 
 if test x$host != x$target
 then
-       CROSS="-DCROSS_COMPILE"
+       CROSS="-DCROSS_DIRECTORY_STRUCTURE"
        ALL=all.cross
        SYSTEM_HEADER_DIR=$build_system_header_dir
        case "$host","$target" in
@@ -12836,7 +13303,12 @@ for file in ${extra_headers} ; do
   extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
 done
 
-# Define collect2 in Makefile.
+# If use_gcc_tgmath is set, append ginclude/tgmath.h.
+if test x"$use_gcc_tgmath" = xyes
+then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
+fi
+
+# Define collect2 in Makefile.
 case $host_can_use_collect2 in
   no) collect2= ;;
   *) collect2='collect2$(exeext)' ;;
@@ -12871,105 +13343,27 @@ esac
 # If build != host, and we aren't building gas in-tree, we identify a
 # build->target assembler and hope that it will have the same features
 # as the host->target assembler we'll be using.
-in_tree_gas=no
-gcc_cv_as=
 gcc_cv_gas_major_version=
 gcc_cv_gas_minor_version=
 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
+
+if test "${gcc_cv_as+set}" = set; then
+  :
+else
+
 if test -x "$DEFAULT_ASSEMBLER"; then
        gcc_cv_as="$DEFAULT_ASSEMBLER"
 elif test -f $gcc_cv_as_gas_srcdir/configure.in \
      && test -f ../gas/Makefile \
      && test x$build = x$host; then
-  # Single tree build which includes gas.  We want to prefer it
-  # over whatever linker top-level may have detected, since
-  # we'll use what we're building after installation anyway.
-  in_tree_gas=yes
-  gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
-for f in $gcc_cv_as_bfd_srcdir/configure \
-         $gcc_cv_as_gas_srcdir/configure \
-         $gcc_cv_as_gas_srcdir/configure.in \
-         $gcc_cv_as_gas_srcdir/Makefile.in ; do
-  gcc_cv_gas_version=`sed -n -e 's/^[  ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
-  if test x$gcc_cv_gas_version != x; then
-    break
-  fi
-done
-gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
-gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
-gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
-case $gcc_cv_gas_patch_version in
-  "") gcc_cv_gas_patch_version="0" ;;
-esac
-gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
-                           + $gcc_cv_gas_minor_version \) \* 1000 \
-                           + $gcc_cv_gas_patch_version`
-
-  gcc_cv_as=../gas/as-new$build_exeext
-  in_tree_gas_is_elf=no
-  if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
-     || (grep 'obj_format = multi' ../gas/Makefile \
-         && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
-  then
-    in_tree_gas_is_elf=yes
-  fi
+       gcc_cv_as=../gas/as-new$build_exeext
 elif test -x as$build_exeext; then
        # Build using assembler in the current directory.
        gcc_cv_as=./as$build_exeext
-fi
-
-
-# When searching for the assembler or linker, search the same directories
-# that the installed compiler will search.  Else we may find the wrong
-# assembler or linker and lose.  If we do not find a suitable binary,
-# then try the user's path.
-#
-# Also note we have to check MD_EXEC_PREFIX before checking the user's path.
-if test "x$exec_prefix" = xNONE; then
-       if test "x$prefix" = xNONE; then
-               gcc_cv_tool_prefix=/usr/local
-       else
-               gcc_cv_tool_prefix=$prefix
-       fi
+elif test -x $AS_FOR_TARGET; then
+        gcc_cv_as="$AS_FOR_TARGET"
 else
-       gcc_cv_tool_prefix=$exec_prefix
-fi
-
-if test x$host = x$build; then
-    gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version"
-    gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical"
-    gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical/$gcc_version"
-    gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical"
-    gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version"
-    gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin"
-else
-    gcc_cv_tool_dirs=
-fi
-
-if test x$build = x$target; then
-    # Rummage through tm_files looking for MD_EXEC_PREFIX
-    md_dirs=
-    for f in ${tm_file_list}; do
-       if test -f $f; then
-           if grep '^#[        ]*undef[        ]*MD_EXEC_PREFIX' $f > /dev/null; then
-               md_dirs=
-           fi
-           md_dirs="$md_dirs "`sed -n -e 's@^#[        ]*define[       ]*MD_EXEC_PREFIX[       ]*"\(.*\)/"@\1@p' < $f`
-       fi
-    done
-    for f in ${md_dirs}; do
-        gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$f"
-    done
-fi
-
-
-
-
-exec 6>/dev/null
-
-# First try the environment variables.  Handle full paths or basenames.
-if test "x$gcc_cv_as" = x && test -n "$AS_FOR_TARGET"; then
-       # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
+        # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
 set dummy $AS_FOR_TARGET; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -13009,173 +13403,58 @@ echo "${ECHO_T}no" >&6
 fi
 
 fi
-if test "x$gcc_cv_as" = x && test -n "$AS" && test x$host = x$target; then
-       # Extract the first word of "$AS", so it can be a program name with args.
-set dummy $AS; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_as+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $gcc_cv_as in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-gcc_cv_as=$ac_cv_path_gcc_cv_as
-
-if test -n "$gcc_cv_as"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
-echo "${ECHO_T}$gcc_cv_as" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
 fi
 
-fi
 
-if test "x$gcc_cv_as" = x; then
-       # The AC_PATH_PROGS macro doesn't work properly when its 4th argument
-       # is empty.
-       if test "x$gcc_cv_tool_dirs" = x; then
-               gcc_cv_as=
-       else
-               for ac_prog in as
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_as+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $gcc_cv_as in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $gcc_cv_tool_dirs
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
 
-  ;;
+case "$ORIGINAL_AS_FOR_TARGET" in
+  ./as | ./as$build_exeext) ;;
+  *)           ac_config_files="$ac_config_files as:exec-tool.in"
+ ;;
 esac
-fi
-gcc_cv_as=$ac_cv_path_gcc_cv_as
-
-if test -n "$gcc_cv_as"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
-echo "${ECHO_T}$gcc_cv_as" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$gcc_cv_as" && break
-done
 
-       fi
-fi
-if test "x$gcc_cv_as" = x; then
-       # If the loop above did not find a tool, then use whatever
-       # one we can find in the users's path.  We are looking for a
-       # ${build} -> ${target} tool.
-       if test "x$program_prefix" != xNONE; then
-               default_tool_name=${program_prefix}as
-       elif test x$build != x$host && test x$build != x$target; then
-               default_tool_name=${target_noncanonical}-as
-       else
-               default_tool_name=`echo as | sed "${program_transform_name}"`
-       fi
-       for ac_prog in $default_tool_name
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_as+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $gcc_cv_as in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+echo "$as_me:$LINENO: checking what assembler to use" >&5
+echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
+if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
+  # Single tree build which includes gas.  We want to prefer it
+  # over whatever linker top-level may have detected, since
+  # we'll use what we're building after installation anyway.
+  echo "$as_me:$LINENO: result: newly built gas" >&5
+echo "${ECHO_T}newly built gas" >&6
+  in_tree_gas=yes
+  gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
+for f in $gcc_cv_as_bfd_srcdir/configure \
+         $gcc_cv_as_gas_srcdir/configure \
+         $gcc_cv_as_gas_srcdir/configure.in \
+         $gcc_cv_as_gas_srcdir/Makefile.in ; do
+  gcc_cv_gas_version=`sed -n -e 's/^[  ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
+  if test x$gcc_cv_gas_version != x; then
+    break
   fi
 done
-done
-
-  ;;
+gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
+gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
+gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
+case $gcc_cv_gas_patch_version in
+  "") gcc_cv_gas_patch_version="0" ;;
 esac
-fi
-gcc_cv_as=$ac_cv_path_gcc_cv_as
+gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
+                           + $gcc_cv_gas_minor_version \) \* 1000 \
+                           + $gcc_cv_gas_patch_version`
 
-if test -n "$gcc_cv_as"; then
+  in_tree_gas_is_elf=no
+  if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
+     || (grep 'obj_format = multi' ../gas/Makefile \
+         && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
+  then
+    in_tree_gas_is_elf=yes
+  fi
+else
   echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
 echo "${ECHO_T}$gcc_cv_as" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$gcc_cv_as" && break
-done
-test -n "$gcc_cv_as" || gcc_cv_as="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext"
-
+  in_tree_gas=no
 fi
-test "$silent" != yes && exec 6>&1
-
-ORIGINAL_AS_FOR_TARGET="$gcc_cv_as"
-
-echo "$as_me:$LINENO: checking what assembler to use" >&5
-echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
-case $in_tree_gas in
-  yes)
-    echo "$as_me:$LINENO: result: \"newly built gas\"" >&5
-echo "${ECHO_T}\"newly built gas\"" >&6
-    ;;
-  no)
-    echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
-echo "${ECHO_T}$gcc_cv_as" >&6
-    ;;
-esac
 
 # Identify the linker which will work hand-in-glove with the newly
 # built GCC, so that we can examine its features.  This is the linker
@@ -13184,51 +13463,28 @@ esac
 # If build != host, and we aren't building gas in-tree, we identify a
 # build->target linker and hope that it will have the same features
 # as the host->target linker we'll be using.
-in_tree_ld=no
-gcc_cv_ld=
 gcc_cv_gld_major_version=
 gcc_cv_gld_minor_version=
 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
+
+if test "${gcc_cv_ld+set}" = set; then
+  :
+else
+
 if test -x "$DEFAULT_LINKER"; then
        gcc_cv_ld="$DEFAULT_LINKER"
 elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
      && test -f ../ld/Makefile \
      && test x$build = x$host; 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.
-       in_tree_ld=yes
-       in_tree_ld_is_elf=no
-       if (grep 'EMUL = .*elf' ../ld/Makefile \
-           || grep 'EMUL = .*linux' ../ld/Makefile \
-           || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; 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
-               gcc_cv_gld_version=`sed -n -e 's/^[     ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
-               if test x$gcc_cv_gld_version != x; then
-                       break
-               fi
-       done
-       gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
-       gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
        gcc_cv_ld=../ld/ld-new$build_exeext
 elif test -x collect-ld$build_exeext; then
        # Build using linker in the current directory.
        gcc_cv_ld=./collect-ld$build_exeext
-fi
-
-
-
-
-
-exec 6>/dev/null
-
-# First try the environment variables.  Handle full paths or basenames.
-if test "x$gcc_cv_ld" = x && test -n "$LD_FOR_TARGET"; then
-       # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
+elif test -x $LD_FOR_TARGET; 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.
 set dummy $LD_FOR_TARGET; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -13268,470 +13524,72 @@ echo "${ECHO_T}no" >&6
 fi
 
 fi
-if test "x$gcc_cv_ld" = x && test -n "$LD" && test x$host = x$target; then
-       # Extract the first word of "$LD", so it can be a program name with args.
-set dummy $LD; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $gcc_cv_ld in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
 fi
-gcc_cv_ld=$ac_cv_path_gcc_cv_ld
 
-if test -n "$gcc_cv_ld"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
-echo "${ECHO_T}$gcc_cv_ld" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
 
-fi
-
-if test "x$gcc_cv_ld" = x; then
-       # The AC_PATH_PROGS macro doesn't work properly when its 4th argument
-       # is empty.
-       if test "x$gcc_cv_tool_dirs" = x; then
-               gcc_cv_ld=
-       else
-               for ac_prog in ld
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $gcc_cv_ld in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $gcc_cv_tool_dirs
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
 
-  ;;
+case "$ORIGINAL_LD_FOR_TARGET" in
+  ./collect-ld | ./collect-ld$build_exeext) ;;
+  *)           ac_config_files="$ac_config_files collect-ld:exec-tool.in"
+ ;;
 esac
-fi
-gcc_cv_ld=$ac_cv_path_gcc_cv_ld
-
-if test -n "$gcc_cv_ld"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
-echo "${ECHO_T}$gcc_cv_ld" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$gcc_cv_ld" && break
-done
 
+echo "$as_me:$LINENO: checking what linker to use" >&5
+echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
+if test "$gcc_cv_ld" = ../ld/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.
+       echo "$as_me:$LINENO: result: newly built ld" >&5
+echo "${ECHO_T}newly built ld" >&6
+       in_tree_ld=yes
+       in_tree_ld_is_elf=no
+       if (grep 'EMUL = .*elf' ../ld/Makefile \
+           || grep 'EMUL = .*linux' ../ld/Makefile \
+           || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
+         in_tree_ld_is_elf=yes
        fi
-fi
-if test "x$gcc_cv_ld" = x; then
-       # If the loop above did not find a tool, then use whatever
-       # one we can find in the users's path.  We are looking for a
-       # ${build} -> ${target} tool.
-       if test "x$program_prefix" != xNONE; then
-               default_tool_name=${program_prefix}ld
-       elif test x$build != x$host && test x$build != x$target; then
-               default_tool_name=${target_noncanonical}-ld
-       else
-               default_tool_name=`echo ld | sed "${program_transform_name}"`
-       fi
-       for ac_prog in $default_tool_name
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       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
+               gcc_cv_gld_version=`sed -n -e 's/^[     ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
+               if test x$gcc_cv_gld_version != x; then
+                       break
+               fi
+       done
+       gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
+       gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
 else
-  case $gcc_cv_ld in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-gcc_cv_ld=$ac_cv_path_gcc_cv_ld
-
-if test -n "$gcc_cv_ld"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
+       echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
 echo "${ECHO_T}$gcc_cv_ld" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$gcc_cv_ld" && break
-done
-test -n "$gcc_cv_ld" || gcc_cv_ld="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext"
-
+       in_tree_ld=no
 fi
-test "$silent" != yes && exec 6>&1
-
-ORIGINAL_LD_FOR_TARGET="$gcc_cv_ld"
-
-echo "$as_me:$LINENO: checking what linker to use" >&5
-echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
-case $in_tree_ld in
-  yes)
-    echo "$as_me:$LINENO: result: \"newly built ld\"" >&5
-echo "${ECHO_T}\"newly built ld\"" >&6
-    ;;
-  no)
-    echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
-echo "${ECHO_T}$gcc_cv_ld" >&6
-    ;;
-esac
 
 # Figure out what nm we will be using.
 gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
-in_tree_nm=no
-gcc_cv_nm=
-if test -f $gcc_cv_binutils_srcdir/configure.in \
-     && test -f ../binutils/Makefile; then
-       # Single tree build which includes binutils.
-       in_tree_nm=yes
-       gcc_cv_nm=../binutils/nm-new$build_exeext
-elif test -x nm$build_exeext; then
-       gcc_cv_nm=./nm$build_exeext
-fi
-
-
-
-
-
-exec 6>/dev/null
-
-# First try the environment variables.  Handle full paths or basenames.
-if test "x$gcc_cv_nm" = x && test -n "$NM_FOR_TARGET"; then
-       # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
-set dummy $NM_FOR_TARGET; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $gcc_cv_nm in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-gcc_cv_nm=$ac_cv_path_gcc_cv_nm
-
-if test -n "$gcc_cv_nm"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
-echo "${ECHO_T}$gcc_cv_nm" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test "x$gcc_cv_nm" = x && test -n "$NM" && test x$host = x$target; then
-       # Extract the first word of "$NM", so it can be a program name with args.
-set dummy $NM; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $gcc_cv_nm in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-gcc_cv_nm=$ac_cv_path_gcc_cv_nm
-
-if test -n "$gcc_cv_nm"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
-echo "${ECHO_T}$gcc_cv_nm" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-
-if test "x$gcc_cv_nm" = x; then
-       # The AC_PATH_PROGS macro doesn't work properly when its 4th argument
-       # is empty.
-       if test "x$gcc_cv_tool_dirs" = x; then
-               gcc_cv_nm=
-       else
-               for ac_prog in nm
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $gcc_cv_nm in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $gcc_cv_tool_dirs
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-gcc_cv_nm=$ac_cv_path_gcc_cv_nm
-
-if test -n "$gcc_cv_nm"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
-echo "${ECHO_T}$gcc_cv_nm" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$gcc_cv_nm" && break
-done
-
-       fi
-fi
-if test "x$gcc_cv_nm" = x; then
-       # If the loop above did not find a tool, then use whatever
-       # one we can find in the users's path.  We are looking for a
-       # ${build} -> ${target} tool.
-       if test "x$program_prefix" != xNONE; then
-               default_tool_name=${program_prefix}nm
-       elif test x$build != x$host && test x$build != x$target; then
-               default_tool_name=${target_noncanonical}-nm
-       else
-               default_tool_name=`echo nm | sed "${program_transform_name}"`
-       fi
-       for ac_prog in $default_tool_name
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $gcc_cv_nm in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-gcc_cv_nm=$ac_cv_path_gcc_cv_nm
-
-if test -n "$gcc_cv_nm"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
-echo "${ECHO_T}$gcc_cv_nm" >&6
+if test "${gcc_cv_nm+set}" = set; then
+  :
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
 
-  test -n "$gcc_cv_nm" && break
-done
-test -n "$gcc_cv_nm" || gcc_cv_nm="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext"
-
-fi
-test "$silent" != yes && exec 6>&1
-
-ORIGINAL_NM_FOR_TARGET="$gcc_cv_nm"
-
-echo "$as_me:$LINENO: checking what nm to use" >&5
-echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
-case $in_tree_nm in
-  yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5
-echo "${ECHO_T}\"newly built nm\"" >&6 ;;
-  no)  echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
-echo "${ECHO_T}$gcc_cv_nm" >&6 ;;
-esac
-
-# Figure out what objdump we will be using.
-in_tree_objdump=no
-gcc_cv_objdump=
 if test -f $gcc_cv_binutils_srcdir/configure.in \
-     && test -f ../binutils/Makefile; then
-       # Single tree build which includes binutils.
-       in_tree_objdump=yes
-       gcc_cv_objdump=../binutils/objdump$build_exeext
-elif test -x objdump$build_exeext; then
-       gcc_cv_objdump=./objdump$build_exeext
-fi
-
-
-
-
-
-exec 6>/dev/null
-
-# First try the environment variables.  Handle full paths or basenames.
-if test "x$gcc_cv_objdump" = x && test -n "$OBJDUMP_FOR_TARGET"; then
-       # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
-set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $gcc_cv_objdump in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
-
-if test -n "$gcc_cv_objdump"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
-echo "${ECHO_T}$gcc_cv_objdump" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test "x$gcc_cv_objdump" = x && test -n "$OBJDUMP" && test x$host = x$target; then
-       # Extract the first word of "$OBJDUMP", so it can be a program name with args.
-set dummy $OBJDUMP; ac_word=$2
+     && test -f ../binutils/Makefile \
+     && test x$build = x$host; then
+       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
+        gcc_cv_nm="$NM_FOR_TARGET"
+else
+        # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
+set dummy $NM_FOR_TARGET; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
+if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  case $gcc_cv_objdump in
+  case $gcc_cv_nm in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
+  ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -13741,7 +13599,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
+    ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -13751,85 +13609,59 @@ done
   ;;
 esac
 fi
-gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
+gcc_cv_nm=$ac_cv_path_gcc_cv_nm
 
-if test -n "$gcc_cv_objdump"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
-echo "${ECHO_T}$gcc_cv_objdump" >&6
+if test -n "$gcc_cv_nm"; then
+  echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
+echo "${ECHO_T}$gcc_cv_nm" >&6
 else
   echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 fi
+fi
 
-if test "x$gcc_cv_objdump" = x; then
-       # The AC_PATH_PROGS macro doesn't work properly when its 4th argument
-       # is empty.
-       if test "x$gcc_cv_tool_dirs" = x; then
-               gcc_cv_objdump=
-       else
-               for ac_prog in objdump
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+echo "$as_me:$LINENO: checking what nm to use" >&5
+echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
+if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
+       # Single tree build which includes binutils.
+       echo "$as_me:$LINENO: result: newly built nm" >&5
+echo "${ECHO_T}newly built nm" >&6
+       in_tree_nm=yes
 else
-  case $gcc_cv_objdump in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $gcc_cv_tool_dirs
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+       echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
+echo "${ECHO_T}$gcc_cv_nm" >&6
+       in_tree_nm=no
+fi
 
-  ;;
+ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
+
+case "$ORIGINAL_NM_FOR_TARGET" in
+  ./nm | ./nm$build_exeext) ;;
+  *)           ac_config_files="$ac_config_files nm:exec-tool.in"
+ ;;
 esac
-fi
-gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
 
-if test -n "$gcc_cv_objdump"; then
-  echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
-echo "${ECHO_T}$gcc_cv_objdump" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
 
-  test -n "$gcc_cv_objdump" && break
-done
+# Figure out what objdump we will be using.
+if test "${gcc_cv_objdump+set}" = set; then
+  :
+else
 
-       fi
-fi
-if test "x$gcc_cv_objdump" = x; then
-       # If the loop above did not find a tool, then use whatever
-       # one we can find in the users's path.  We are looking for a
-       # ${build} -> ${target} tool.
-       if test "x$program_prefix" != xNONE; then
-               default_tool_name=${program_prefix}objdump
-       elif test x$build != x$host && test x$build != x$target; then
-               default_tool_name=${target_noncanonical}-objdump
-       else
-               default_tool_name=`echo objdump | sed "${program_transform_name}"`
-       fi
-       for ac_prog in $default_tool_name
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+if test -f $gcc_cv_binutils_srcdir/configure.in \
+     && test -f ../binutils/Makefile \
+     && test x$build = x$host; then
+       # Single tree build which includes binutils.
+       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
+        gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
+else
+        # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
+set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
@@ -13867,23 +13699,23 @@ else
 echo "${ECHO_T}no" >&6
 fi
 
-  test -n "$gcc_cv_objdump" && break
-done
-test -n "$gcc_cv_objdump" || gcc_cv_objdump="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext"
-
 fi
-test "$silent" != yes && exec 6>&1
+fi
 
-ORIGINAL_OBJDUMP_FOR_TARGET="$gcc_cv_objdump"
 
 echo "$as_me:$LINENO: checking what objdump to use" >&5
 echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
-case $in_tree_objdump in
-  yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5
-echo "${ECHO_T}\"newly built objdump\"" >&6 ;;
-  no)  echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
-echo "${ECHO_T}$gcc_cv_objdump" >&6 ;;
-esac
+if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
+       # Single tree build which includes binutils.
+       echo "$as_me:$LINENO: result: newly built objdump" >&5
+echo "${ECHO_T}newly built objdump" >&6
+elif test x$gcc_cv_objdump = x; then
+       echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6
+else
+       echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
+echo "${ECHO_T}$gcc_cv_objdump" >&6
+fi
 
 # Figure out what assembler alignment features are present.
 echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
@@ -13961,6 +13793,43 @@ _ACEOF
 
 fi
 
+echo "$as_me:$LINENO: checking assembler for .literal16" >&5
+echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6
+if test "${gcc_cv_as_literal16+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_literal16=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
+  then gcc_cv_as_literal16=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo '.literal16' > 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_literal16=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_literal16" >&5
+echo "${ECHO_T}$gcc_cv_as_literal16" >&6
+if test $gcc_cv_as_literal16 = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GAS_LITERAL16 1
+_ACEOF
+
+fi
+
 echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
 echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
 if test "${gcc_cv_as_subsection_m1+set}" = set; then
@@ -14178,13 +14047,11 @@ else
   ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
   if echo "$ld_ver" | grep GNU > /dev/null; then
     ld_vers=`echo $ld_ver | sed -n \
-       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
-       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
-       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
+       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p' \
        -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\)[  ].*$,\1,p' \
        -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[     ].*$,\1,p' \
        -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[       ].*$,\1,p' \
-       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[   ].*$,\1,p'`
+       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[   -].*$,\1,p'`
     ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
     ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
     ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
@@ -14266,9 +14133,16 @@ L2:' > conftest.s
   # arbitrary sections are supported and try the test.
   as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
   if echo "$as_ver" | grep GNU > /dev/null; then
-    as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
-    as_major=`echo $as_ver | sed 's/\..*//'`
-    as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
+    as_vers=`echo $as_ver | sed -n \
+       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
+       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
+       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
+       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\)[  ].*$,\1,p' \
+       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[     ].*$,\1,p' \
+       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[       ].*$,\1,p' \
+       -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[   -].*$,\1,p'`
+    as_major=`expr "$as_vers" : '\([0-9]*\)'`
+    as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
     if test $as_major -eq 2 && test $as_minor -lt 11
     then :
     else gcc_cv_as_leb128=yes
@@ -14356,11 +14230,14 @@ cat > conftest.big <<EOF
 EOF
   # If the assembler didn't choke, and we can objdump,
   # and we got the correct data, then succeed.
+  # The text in the here-document typically retains its unix-style line
+  # endings, while the output of objdump will use host line endings.
+  # Therefore, use diff -b for the comparisons.
   if test x$gcc_cv_objdump != x \
   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
      | tail -3 > conftest.got \
-  && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
-    || cmp conftest.big conftest.got > /dev/null 2>&1; }
+  && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
+    || diff -b conftest.big conftest.got > /dev/null 2>&1; }
   then
     gcc_cv_as_eh_frame=yes
   elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
@@ -14541,10 +14418,13 @@ if test $in_tree_ld != yes && test x"$ld_vers" != x; then
       comdat_group=no
     fi
   fi
-  if test $comdat_group = no; then
-    gcc_cv_as_comdat_group=no
-    gcc_cv_as_comdat_group_percent=no
-  fi
+else
+  # assume linkers other than GNU ld don't support COMDAT group
+  comdat_group=no
+fi
+if test $comdat_group = no; then
+  gcc_cv_as_comdat_group=no
+  gcc_cv_as_comdat_group_percent=no
 fi
 
 cat >>confdefs.h <<_ACEOF
@@ -14815,6 +14695,15 @@ foo:   .long   25
        ;;
   sparc*-*-*)
     case "$target" in
+      sparc*-sun-solaris2.[56789]*)
+       # TLS was introduced in the Solaris 9 4/04 release but
+       # we do not enable it by default on Solaris 9 either.
+       if test "x$enable_tls" = xyes ; then
+         on_solaris=yes
+       else
+         enable_tls=no;
+       fi
+       ;;
       sparc*-sun-solaris2.*)
        on_solaris=yes
        ;;
@@ -15304,31 +15193,140 @@ echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
 if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_AS_OFFSETABLE_LO10 1
+#define HAVE_AS_OFFSETABLE_LO10 1
+_ACEOF
+
+fi
+    ;;
+
+  i[34567]86-*-* | x86_64-*-*)
+    case $target_os in
+      cygwin* | pe | mingw32*)
+       # Used for DWARF 2 in PE
+       echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
+echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
+if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_ix86_pe_secrel32=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_ix86_pe_secrel32=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo '.text
+foo:   nop
+.data
+       .secrel32 foo' > 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
+       if test x$gcc_cv_ld != x \
+          && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
+            gcc_cv_as_ix86_pe_secrel32=yes
+          fi
+          rm -f conftest
+    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_ix86_pe_secrel32" >&5
+echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
+if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GAS_PE_SECREL32_RELOC 1
+_ACEOF
+
+fi
+       ;;
+    esac
+
+    echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
+echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
+if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_ix86_filds_fists=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
+  then gcc_cv_as_ix86_filds_fists=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo 'filds mem; fists mem' > 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_ix86_filds_fists=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_ix86_filds_fists" >&5
+echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
+if test $gcc_cv_as_ix86_filds_fists = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GAS_FILDS_FISTS 1
+_ACEOF
+
+fi
+
+    echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
+echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
+if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_ix86_cmov_sun_syntax=no
+  if test x$gcc_cv_as != x; then
+    echo 'cmovl.l %edx, %eax' > 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_ix86_cmov_sun_syntax=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_ix86_cmov_sun_syntax" >&5
+echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
+if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
 _ACEOF
 
 fi
-    ;;
 
-  i[34567]86-*-* | x86_64-*-*)
-    case $target_os in
-      cygwin* | pe | mingw32*)
-       # Used for DWARF 2 in PE
-       echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
-echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
-if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
+    echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
+echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6
+if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  gcc_cv_as_ix86_pe_secrel32=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_ix86_pe_secrel32=yes
-fi
-  elif test x$gcc_cv_as != x; then
-    echo '.text
-foo:   nop
-.data
-       .secrel32 foo' > conftest.s
+  gcc_cv_as_ix86_ffreep=no
+  if test x$gcc_cv_as != x; then
+    echo 'ffreep %st(1)' > 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
@@ -15336,11 +15334,7 @@ foo:   nop
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }
     then
-       if test x$gcc_cv_ld != x \
-          && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
-            gcc_cv_as_ix86_pe_secrel32=yes
-          fi
-          rm -f conftest
+       gcc_cv_as_ix86_ffreep=yes
     else
       echo "configure: failed program was" >&5
       cat conftest.s >&5
@@ -15348,30 +15342,24 @@ foo:  nop
     rm -f conftest.o conftest.s
   fi
 fi
-echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
-echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
-if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
+echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
+echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6
+if test $gcc_cv_as_ix86_ffreep = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_GAS_PE_SECREL32_RELOC 1
+#define HAVE_AS_IX86_FFREEP 1
 _ACEOF
 
 fi
-       ;;
-    esac
 
-    echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
-echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
-if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
+    echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
+echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6
+if test "${gcc_cv_as_ix86_sahf+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  gcc_cv_as_ix86_filds_fists=no
-    if test $in_tree_gas = yes; then
-    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
-  then gcc_cv_as_ix86_filds_fists=yes
-fi
-  elif test x$gcc_cv_as != x; then
-    echo 'filds mem; fists mem' > conftest.s
+  gcc_cv_as_ix86_sahf=no
+  if test x$gcc_cv_as != x; then
+    echo 'sahf' > 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
@@ -15379,7 +15367,7 @@ fi
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }
     then
-       gcc_cv_as_ix86_filds_fists=yes
+       gcc_cv_as_ix86_sahf=yes
     else
       echo "configure: failed program was" >&5
       cat conftest.s >&5
     rm -f conftest.o conftest.s
   fi
 fi
-echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
-echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
-if test $gcc_cv_as_ix86_filds_fists = yes; then
+echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
+echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6
+if test $gcc_cv_as_ix86_sahf = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_GAS_FILDS_FISTS 1
+#define HAVE_AS_IX86_SAHF 1
 _ACEOF
 
 fi
 
-    echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
-echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
-if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
+    echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
+echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
+if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  gcc_cv_as_ix86_cmov_sun_syntax=no
+  gcc_cv_as_ix86_diff_sect_delta=no
   if test x$gcc_cv_as != x; then
-    echo 'cmovl.l %edx, %eax' > conftest.s
+    echo '.section .rodata
+.L1:
+        .long .L2-.L1
+        .long .L3-.L1
+        .text
+.L3:    nop
+.L2:    nop' > 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
@@ -15412,7 +15406,7 @@ else
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }
     then
-       gcc_cv_as_ix86_cmov_sun_syntax=yes
+       gcc_cv_as_ix86_diff_sect_delta=yes
     else
       echo "configure: failed program was" >&5
       cat conftest.s >&5
@@ -15420,12 +15414,12 @@ else
     rm -f conftest.o conftest.s
   fi
 fi
-echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
-echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
-if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
+echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
+echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6
+if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
+#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
 _ACEOF
 
 fi
@@ -15690,6 +15684,52 @@ _ACEOF
 fi
 
     case $target in
+      *-*-aix*) conftest_s='   .machine "pwr6"
+       .csect .text[PR]
+       mffgpr 1,3';;
+      *) conftest_s='  .machine power6
+       .text
+       mffgpr 1,3';;
+    esac
+
+    echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
+echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6
+if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_powerpc_mfpgpr=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
+  then gcc_cv_as_powerpc_mfpgpr=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo "$conftest_s" > 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_powerpc_mfpgpr=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_powerpc_mfpgpr" >&5
+echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6
+if test $gcc_cv_as_powerpc_mfpgpr = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_MFPGPR 1
+_ACEOF
+
+fi
+
+    case $target in
       *-*-aix*) conftest_s='   .csect .text[PR]
 LCF..0:
        addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
@@ -15738,6 +15778,135 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
+
+    case $target in
+      *-*-aix*) conftest_s='   .machine "pwr6"
+       .csect .text[PR]
+       cmpb 3,4,5';;
+      *) conftest_s='  .machine power6
+       .text
+       cmpb 3,4,5';;
+    esac
+
+    echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5
+echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6
+if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_powerpc_cmpb=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
+  then gcc_cv_as_powerpc_cmpb=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo "$conftest_s" > conftest.s
+    if { ac_try='$gcc_cv_as -a32 -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_powerpc_cmpb=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_powerpc_cmpb" >&5
+echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6
+if test $gcc_cv_as_powerpc_cmpb = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_CMPB 1
+_ACEOF
+
+fi
+
+    case $target in
+      *-*-aix*) conftest_s='   .machine "pwr6"
+       .csect .text[PR]
+       dadd 1,2,3';;
+      *) conftest_s='  .machine power6
+       .text
+       dadd 1,2,3';;
+    esac
+
+    echo "$as_me:$LINENO: checking assembler for decimal float support" >&5
+echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6
+if test "${gcc_cv_as_powerpc_dfp+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_powerpc_dfp=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
+  then gcc_cv_as_powerpc_dfp=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo "$conftest_s" > conftest.s
+    if { ac_try='$gcc_cv_as -a32 -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_powerpc_dfp=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_powerpc_dfp" >&5
+echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6
+if test $gcc_cv_as_powerpc_dfp = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_DFP 1
+_ACEOF
+
+fi
+
+    echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
+echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
+if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_powerpc_gnu_attribute=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
+  then gcc_cv_as_powerpc_gnu_attribute=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo '.gnu_attribute 4,1' > 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_powerpc_gnu_attribute=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_powerpc_gnu_attribute" >&5
+echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6
+if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_GNU_ATTRIBUTE 1
+_ACEOF
+
+fi
     ;;
 
   mips*-*-*)
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }
     then
-       gcc_cv_as_mips_explicit_relocs=yes
+       gcc_cv_as_mips_explicit_relocs=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_mips_explicit_relocs" >&5
+echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
+if test $gcc_cv_as_mips_explicit_relocs = yes; then
+  if test x$target_cpu_default = x
+       then target_cpu_default=MASK_EXPLICIT_RELOCS
+       else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
+       fi
+fi
+    echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
+echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6
+if test "${gcc_cv_as_mips_no_shared+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_mips_no_shared=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
+  then gcc_cv_as_mips_no_shared=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo 'nop' > conftest.s
+    if { ac_try='$gcc_cv_as -mno-shared -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_mips_no_shared=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_mips_no_shared" >&5
+echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6
+if test $gcc_cv_as_mips_no_shared = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_NO_SHARED 1
+_ACEOF
+
+fi
+
+    echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
+echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6
+if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_mips_gnu_attribute=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
+  then gcc_cv_as_mips_gnu_attribute=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo '.gnu_attribute 4,1' > 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_mips_gnu_attribute=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_mips_gnu_attribute" >&5
+echo "${ECHO_T}$gcc_cv_as_mips_gnu_attribute" >&6
+if test $gcc_cv_as_mips_gnu_attribute = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_GNU_ATTRIBUTE 1
+_ACEOF
+
+fi
+
+    echo "$as_me:$LINENO: checking assembler for .dtprelword support" >&5
+echo $ECHO_N "checking assembler for .dtprelword support... $ECHO_C" >&6
+if test "${gcc_cv_as_mips_dtprelword+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_mips_dtprelword=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
+  then gcc_cv_as_mips_dtprelword=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo '.section .tdata,"awT",@progbits
+x:
+       .word 2
+       .text
+       .dtprelword x+0x8000' > 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_mips_dtprelword=yes
     else
       echo "configure: failed program was" >&5
       cat conftest.s >&5
     rm -f conftest.o conftest.s
   fi
 fi
-echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
-echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
-if test $gcc_cv_as_mips_explicit_relocs = yes; then
-  if test x$target_cpu_default = x
-       then target_cpu_default=MASK_EXPLICIT_RELOCS
-       else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
-       fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_mips_dtprelword" >&5
+echo "${ECHO_T}$gcc_cv_as_mips_dtprelword" >&6
+if test $gcc_cv_as_mips_dtprelword = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_DTPRELWORD 1
+_ACEOF
+
 fi
     ;;
 esac
@@ -15805,7 +16088,7 @@ esac
 case "$target" in
   i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
   | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
-  | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-*)
+  | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* | spu-*-*)
     insn="nop"
     ;;
   ia64*-*-* | s390*-*-*)
@@ -15983,6 +16266,83 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
+
+ echo "$as_me:$LINENO: checking assembler for --debug-prefix-map option" >&5
+echo $ECHO_N "checking assembler for --debug-prefix-map option... $ECHO_C" >&6
+if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_debug_prefix_map_flag=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
+  then gcc_cv_as_debug_prefix_map_flag=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    echo "$insn" > conftest.s
+    if { ac_try='$gcc_cv_as --debug-prefix-map /a=/b -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_debug_prefix_map_flag=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_debug_prefix_map_flag" >&5
+echo "${ECHO_T}$gcc_cv_as_debug_prefix_map_flag" >&6
+if test $gcc_cv_as_debug_prefix_map_flag = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_DEBUG_PREFIX_MAP 1
+_ACEOF
+
+fi
+fi
+
+echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
+echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
+if test "${gcc_cv_as_line_zero+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcc_cv_as_line_zero=no
+  if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
+  then gcc_cv_as_line_zero=yes
+fi
+  elif test "x$gcc_cv_as" != x; then
+    { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
+    if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
+  { (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); }; } &&
+       test "x`cat conftest.out`" = x
+    then
+      gcc_cv_as_line_zero=yes
+    else
+      echo "configure: failed program was" >&5
+      cat conftest.s >&5
+      echo "configure: error output was" >&5
+      cat conftest.out >&5
+    fi
+    rm -f conftest.o conftest.s conftest.out
+  fi
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
+echo "${ECHO_T}$gcc_cv_as_line_zero" >&6
+if test "x$gcc_cv_as_line_zero" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_LINE_ZERO 1
+_ACEOF
+
 fi
 
 echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
 echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
 echo "${ECHO_T}$gcc_cv_ld_pie" >&6
 
+echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
+echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6
+gcc_cv_ld_eh_gc_sections=no
+if test $in_tree_ld = yes ; then
+  if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 17 -o "$gcc_cv_gld_major_version" -gt 2 \
+     && test $in_tree_ld_is_elf = yes; then
+    gcc_cv_ld_eh_gc_sections=yes
+  fi
+elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
+  cat > conftest.s <<EOF
+       .section        .text
+.globl _start
+        .type _start, @function
+_start:
+       .long foo
+       .size _start, .-_start
+       .section        .text.foo,"ax",@progbits
+       .type foo, @function
+foo:
+       .long 0
+       .size foo, .-foo
+       .section        .gcc_except_table.foo,"a",@progbits
+.L0:
+       .long 0
+       .section        .eh_frame,"a",@progbits
+       .long .L0
+EOF
+  if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+    if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
+        | grep "gc-sections option ignored" > /dev/null; then
+      gcc_cv_ld_eh_gc_sections=no
+    elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
+      gcc_cv_ld_eh_gc_sections=yes
+      # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
+      if test x$gcc_cv_as_comdat_group != xyes; then
+       gcc_cv_ld_eh_gc_sections=no
+       cat > conftest.s <<EOF
+       .section        .text
+.globl _start
+        .type _start, @function
+_start:
+       .long foo
+       .size _start, .-_start
+       .section        .gnu.linkonce.t.foo,"ax",@progbits
+       .type foo, @function
+foo:
+       .long 0
+       .size foo, .-foo
+       .section        .gcc_except_table.foo,"a",@progbits
+.L0:
+       .long 0
+       .section        .eh_frame,"a",@progbits
+       .long .L0
+EOF
+       if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+         if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
+              | grep "gc-sections option ignored" > /dev/null; then
+           gcc_cv_ld_eh_gc_sections=no
+         elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
+           gcc_cv_ld_eh_gc_sections=yes
+         fi
+       fi
+      fi
+    fi
+  fi
+  rm -f conftest.s conftest.o conftest
+fi
+case "$target" in
+  hppa*-*-linux*)
+    # ??? This apparently exposes a binutils bug with PC-relative relocations.
+    gcc_cv_ld_eh_gc_sections=no
+    ;;
+esac
+if test x$gcc_cv_ld_eh_gc_sections = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LD_EH_GC_SECTIONS 1
+_ACEOF
+
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
+echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6
+
 # --------
 # UNSORTED
 # --------
@@ -16185,7 +16628,8 @@ _ACEOF
 fi
 
 if test x$with_sysroot = x && test x$host = x$target \
-   && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
+   && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
+   && test "$prefix" != "NONE"; then
 
 cat >>confdefs.h <<_ACEOF
 #define PREFIX_INCLUDE_DIR "$prefix/include"
@@ -16194,17 +16638,19 @@ _ACEOF
 fi
 
 # Test for stack protector support in target C library.
-case "$target" in
-  *-*-linux*)
-    echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5
-echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
+echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6
 if test "${gcc_cv_libc_provides_ssp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   gcc_cv_libc_provides_ssp=no
+    case "$target" in
+       *-*-linux*)
       if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
        if test "x$with_sysroot" = x; then
          glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
+       elif test "x$with_build_sysroot" != "x"; then
+         glibc_header_dir="${with_build_sysroot}/usr/include"
        elif test "x$with_sysroot" = xyes; then
          glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
        else
@@ -16227,12 +16673,112 @@ else
             $glibc_header_dir/features.h > /dev/null; then
          gcc_cv_libc_provides_ssp=yes
        fi
-      fi
+        fi
+       ;;
+       *-*-darwin*)
+        echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
+echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6
+if test "${ac_cv_func___stack_chk_fail+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define __stack_chk_fail innocuous___stack_chk_fail
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char __stack_chk_fail (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef __stack_chk_fail
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char __stack_chk_fail ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub___stack_chk_fail) || defined (__stub_____stack_chk_fail)
+choke me
+#else
+char (*f) () = __stack_chk_fail;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != __stack_chk_fail;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (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); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (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
+  ac_cv_func___stack_chk_fail=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func___stack_chk_fail=no
 fi
-echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
-echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;;
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
+echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6
+if test $ac_cv_func___stack_chk_fail = yes; then
+  gcc_cv_libc_provides_ssp=yes
+else
+  echo "no __stack_chk_fail on this target"
+fi
+
+        ;;
   *) gcc_cv_libc_provides_ssp=no ;;
-esac
+    esac
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
+echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6
+
 if test x$gcc_cv_libc_provides_ssp = xyes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -16241,6 +16787,50 @@ _ACEOF
 
 fi
 
+# Check if TFmode long double should be used by default or not.
+# Some glibc targets used DFmode long double, but with glibc 2.4
+# and later they can use TFmode.
+case "$target" in
+  powerpc*-*-linux* | \
+  powerpc*-*-gnu* | \
+  sparc*-*-linux* | \
+  s390*-*-linux* | \
+  alpha*-*-linux*)
+
+# Check whether --with-long-double-128 or --without-long-double-128 was given.
+if test "${with_long_double_128+set}" = set; then
+  withval="$with_long_double_128"
+  gcc_cv_target_ldbl128="$with_long_double_128"
+else
+  gcc_cv_target_ldbl128=no
+      if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
+       if test "x$with_sysroot" = x; then
+         glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
+       elif test "x$with_build_sysroot" != "x"; then
+         glibc_header_dir="${with_build_sysroot}/usr/include"
+       elif test "x$with_sysroot" = xyes; then
+         glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
+       else
+         glibc_header_dir="${with_sysroot}/usr/include"
+       fi
+      else
+       glibc_header_dir=/usr/include
+      fi
+      grep '^[         ]*#[    ]*define[       ][      ]*__LONG_DOUBLE_MATH_OPTIONAL' \
+        $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
+      && gcc_cv_target_ldbl128=yes
+
+fi;
+    ;;
+esac
+if test x$gcc_cv_target_ldbl128 = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TARGET_DEFAULT_LONG_DOUBLE_128 1
+_ACEOF
+
+fi
+
 # Find out what GC implementation we want, or may, use.
 
 # Check whether --with-gc or --without-gc was given.
 # Make empty files to contain the specs and options for each language.
 # Then add #include lines to for a compiler that has specs and/or options.
 
+subdirs=
 lang_opt_files=
 lang_specs_files=
 lang_tree_files=
-for subdir in . $subdirs
-do
-       if test -f $srcdir/$subdir/lang.opt; then
-           lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
-       fi
-       if test -f $srcdir/$subdir/lang-specs.h; then
-           lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
-       fi
-       if test -f $srcdir/$subdir/$subdir-tree.def; then
-           lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
-       fi
-done
-
 # These (without "all_") are set in each config-lang.in.
 # `language' must be a single word so is spelled singularly.
 all_languages=
-all_boot_languages=
 all_compilers=
-all_stagestuff=
-all_outputs='Makefile gccbug mklibgcc libada-mk'
+all_outputs='Makefile gccbug libada-mk'
 # List of language makefile fragments.
 all_lang_makefrags=
 # List of language subdirectory makefiles.  Deprecated.
 all_lang_makefiles=
-# Files for gengtype
+# Additional files for gengtype
 all_gtfiles="$target_gtfiles"
-# Files for gengtype with language
-all_gtfiles_files_langs=
-all_gtfiles_files_files=
+
+# These are the languages that are set in --enable-languages,
+# and are available in the GCC tree.
+all_selected_languages=
 
 # Add the language fragments.
 # Languages are added via two mechanisms.  Some information must be
@@ -16353,73 +16930,96 @@ all_gtfiles_files_files=
 
 language_hooks="Make-hooks"
 
-for s in $subdirs
+for lang in ${srcdir}/*/config-lang.in
 do
-               language=
-               boot_language=
-               compilers=
-               stagestuff=
-               outputs=
-               gtfiles=
-               . ${srcdir}/$s/config-lang.in
-               if test "x$language" = x
-               then
-                       echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
-                       exit 1
-               fi
-               all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in"
-               if test -f ${srcdir}/$s/Makefile.in
-               then all_lang_makefiles="$s/Makefile"
-               fi
-               all_languages="$all_languages $language"
-               if test "x$boot_language" = xyes
-               then
-                       all_boot_languages="$all_boot_languages $language"
-               fi
-               all_compilers="$all_compilers $compilers"
-               all_stagestuff="$all_stagestuff $stagestuff"
-               all_outputs="$all_outputs $outputs"
-               all_gtfiles="$all_gtfiles $gtfiles"
-                for f in $gtfiles
-                do
-                         all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
-                         all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
-                done
+       test "$lang" = "${srcdir}/*/config-lang.in" && continue
+
+        lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
+        if test "x$lang_alias" = x
+        then
+              echo "$lang doesn't set \$language." 1>&2
+              exit 1
+        fi
+        subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
+        subdirs="$subdirs $subdir"
+        case ",$enable_languages," in
+        *,$lang_alias,*)
+            all_selected_languages="$all_selected_languages $lang_alias"
+           if test -f $srcdir/$subdir/lang-specs.h; then
+               lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
+           fi
+           ;;
+        esac
+
+       language=
+       boot_language=
+       compilers=
+       outputs=
+       gtfiles=
+       subdir_requires=
+       . ${srcdir}/$subdir/config-lang.in
+       if test "x$language" = x
+       then
+               echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
+               exit 1
+       fi
+
+       ok=:
+        case ",$enable_languages," in
+               *,$lang_alias,*) ;;
+               *)
+                       for i in $subdir_requires; do
+                               test -f "${srcdir}/$i/config-lang.in" && continue
+                               ok=false
+                               break
+                       done
+               ;;
+       esac
+       $ok || continue
+
+       all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
+       if test -f $srcdir/$subdir/lang.opt; then
+           lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
+       fi
+       if test -f $srcdir/$subdir/$subdir-tree.def; then
+           lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
+       fi
+       if test -f ${srcdir}/$subdir/Makefile.in
+               then all_lang_makefiles="$subdir/Makefile"
+       fi
+       all_languages="$all_languages $language"
+       all_compilers="$all_compilers $compilers"
+       all_outputs="$all_outputs $outputs"
+       all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
 done
 
 # Pick up gtfiles for c
 gtfiles=
-s="c"
 . ${srcdir}/c-config-lang.in
-all_gtfiles="$all_gtfiles $gtfiles"
-for f in $gtfiles
-do
-        all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
-        all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
-done
+all_gtfiles="$all_gtfiles [c] $gtfiles"
 
 check_languages=
-for language in $all_languages
+for language in $all_selected_languages
 do
-               check_languages="$check_languages check-$language"
+       check_languages="$check_languages check-$language"
 done
 
 # We link each language in with a set of hooks, reached indirectly via
-# lang.${target}.
+# lang.${target}.  Only do so for selected languages.
 
 rm -f Make-hooks
 touch Make-hooks
 target_list="all.cross start.encap rest.encap tags \
-       install-common install-man \
-       uninstall info man srcextra srcman srcinfo \
-       mostlyclean clean distclean maintainer-clean \
-       stage1 stage2 stage3 stage4 stageprofile stagefeedback"
+       install-common install-man install-info install-pdf dvi pdf \
+       html uninstall info man srcextra srcman srcinfo \
+       mostlyclean clean distclean maintainer-clean"
+
 for t in $target_list
 do
        x=
-       for lang in $all_languages
+       for lang in $all_selected_languages
        do
-                       x="$x $lang.$t"
+               x="$x $lang.$t"
        done
        echo "lang.$t: $x" >> Make-hooks
 done
@@ -16444,40 +17044,7 @@ if test "x$subdirs" != x; then
 fi
 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
 
-# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
-# absolute path for gcc_tooldir based on inserting the number of up-directory
-# movements required to get from $(exec_prefix) to $(prefix) into the basic
-# $(libsubdir)/@(unlibsubdir) based path.
-# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
-# make and thus we'd get different behavior depending on where we built the
-# sources.
-if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
-    gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
-else
-# An explanation of the sed strings:
-#  -e 's|^\$(prefix)||'   matches and eliminates 'prefix' from 'exec_prefix'
-#  -e 's|/$||'            match a trailing forward slash and eliminates it
-#  -e 's|^[^/]|/|'        forces the string to start with a forward slash (*)
-#  -e 's|/[^/]*|../|g'    replaces each occurrence of /<directory> with ../
-#
-# (*) Note this pattern overwrites the first character of the string
-# with a forward slash if one is not already present.  This is not a
-# problem because the exact names of the sub-directories concerned is
-# unimportant, just the number of them matters.
-#
-# The practical upshot of these patterns is like this:
-#
-#  prefix     exec_prefix        result
-#  ------     -----------        ------
-#   /foo        /foo/bar          ../
-#   /foo/       /foo/bar          ../
-#   /foo        /foo/bar/         ../
-#   /foo/       /foo/bar/         ../
-#   /foo        /foo/bar/ugg      ../../
-#
-    dollar='$$'
-    gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
-fi
+gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
 
 
 
@@ -16508,15 +17075,37 @@ fi;
 objdir=`${PWDCMD-pwd}`
 
 
-# Substitute configuration variables
+
+# Check whether --with-datarootdir or --without-datarootdir was given.
+if test "${with_datarootdir+set}" = set; then
+  withval="$with_datarootdir"
+  datarootdir="\${prefix}/$with_datarootdir"
+else
+  datarootdir='$(prefix)/share'
+fi;
 
 
 
+# Check whether --with-docdir or --without-docdir was given.
+if test "${with_docdir+set}" = set; then
+  withval="$with_docdir"
+  docdir="\${prefix}/$with_docdir"
+else
+  docdir='$(datarootdir)'
+fi;
 
 
 
+# Check whether --with-htmldir or --without-htmldir was given.
+if test "${with_htmldir+set}" = set; then
+  withval="$with_htmldir"
+  htmldir="\${prefix}/$with_htmldir"
+else
+  htmldir='$(docdir)'
+fi;
 
 
+# Substitute configuration variables
 
 
 
@@ -17137,6 +17726,9 @@ for ac_config_target in $ac_config_targets
 do
   case "$ac_config_target" in
   # Handling of arguments.
+  "as" ) CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
+  "collect-ld" ) CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
+  "nm" ) CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
   "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
   "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
@@ -17238,6 +17830,7 @@ s,@target_cpu@,$target_cpu,;t t
 s,@target_vendor@,$target_vendor,;t t
 s,@target_os@,$target_os,;t t
 s,@target_noncanonical@,$target_noncanonical,;t t
+s,@build_libsubdir@,$build_libsubdir,;t t
 s,@build_subdir@,$build_subdir,;t t
 s,@host_subdir@,$host_subdir,;t t
 s,@target_subdir@,$target_subdir,;t t
@@ -17253,9 +17846,10 @@ s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
 s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
 s,@CPP@,$CPP,;t t
 s,@EGREP@,$EGREP,;t t
-s,@strict1_warn@,$strict1_warn,;t t
+s,@loose_warn@,$loose_warn,;t t
+s,@cxx_compat_warn@,$cxx_compat_warn,;t t
+s,@strict_warn@,$strict_warn,;t t
 s,@warn_cflags@,$warn_cflags,;t t
-s,@WERROR@,$WERROR,;t t
 s,@nocommon_flag@,$nocommon_flag,;t t
 s,@TREEBROWSER@,$TREEBROWSER,;t t
 s,@valgrind_path@,$valgrind_path,;t t
@@ -17264,11 +17858,18 @@ s,@valgrind_command@,$valgrind_command,;t t
 s,@coverage_flags@,$coverage_flags,;t t
 s,@enable_multilib@,$enable_multilib,;t t
 s,@enable_decimal_float@,$enable_decimal_float,;t t
+s,@enable_fixed_point@,$enable_fixed_point,;t t
 s,@enable_shared@,$enable_shared,;t t
 s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
 s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
 s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
 s,@onestep@,$onestep,;t t
+s,@PKGVERSION@,$PKGVERSION,;t t
+s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
+s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
+s,@datarootdir@,$datarootdir,;t t
+s,@docdir@,$docdir,;t t
+s,@htmldir@,$htmldir,;t t
 s,@SET_MAKE@,$SET_MAKE,;t t
 s,@AWK@,$AWK,;t t
 s,@LN_S@,$LN_S,;t t
@@ -17288,7 +17889,6 @@ s,@FLEX@,$FLEX,;t t
 s,@BISON@,$BISON,;t t
 s,@NM@,$NM,;t t
 s,@AR@,$AR,;t t
-s,@stage1_cflags@,$stage1_cflags,;t t
 s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
 s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
 s,@LDEXP_LIB@,$LDEXP_LIB,;t t
@@ -17309,6 +17909,10 @@ s,@XGETTEXT@,$XGETTEXT,;t t
 s,@GMSGFMT@,$GMSGFMT,;t t
 s,@POSUB@,$POSUB,;t t
 s,@CATALOGS@,$CATALOGS,;t t
+s,@DATADIRNAME@,$DATADIRNAME,;t t
+s,@INSTOBJEXT@,$INSTOBJEXT,;t t
+s,@GENCAT@,$GENCAT,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
 s,@host_cc_for_libada@,$host_cc_for_libada,;t t
 s,@CROSS@,$CROSS,;t t
 s,@ALL@,$ALL,;t t
@@ -17326,7 +17930,6 @@ s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
 s,@gcc_cv_nm@,$gcc_cv_nm,;t t
 s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
 s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
-s,@ORIGINAL_OBJDUMP_FOR_TARGET@,$ORIGINAL_OBJDUMP_FOR_TARGET,;t t
 s,@libgcc_visibility@,$libgcc_visibility,;t t
 s,@GGC@,$GGC,;t t
 s,@zlibdir@,$zlibdir,;t t
@@ -17338,23 +17941,18 @@ s,@slibdir@,$slibdir,;t t
 s,@objdir@,$objdir,;t t
 s,@subdirs@,$subdirs,;t t
 s,@srcdir@,$srcdir,;t t
-s,@all_boot_languages@,$all_boot_languages,;t t
 s,@all_compilers@,$all_compilers,;t t
 s,@all_gtfiles@,$all_gtfiles,;t t
-s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t
-s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t
 s,@all_lang_makefrags@,$all_lang_makefrags,;t t
 s,@all_lang_makefiles@,$all_lang_makefiles,;t t
 s,@all_languages@,$all_languages,;t t
-s,@all_stagestuff@,$all_stagestuff,;t t
+s,@all_selected_languages@,$all_selected_languages,;t t
 s,@build_exeext@,$build_exeext,;t t
 s,@build_install_headers_dir@,$build_install_headers_dir,;t t
 s,@build_xm_file_list@,$build_xm_file_list,;t t
 s,@build_xm_include_list@,$build_xm_include_list,;t t
 s,@build_xm_defines@,$build_xm_defines,;t t
 s,@check_languages@,$check_languages,;t t
-s,@cc_set_by_configure@,$cc_set_by_configure,;t t
-s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
 s,@cpp_install_dir@,$cpp_install_dir,;t t
 s,@xmake_file@,$xmake_file,;t t
 s,@tmake_file@,$tmake_file,;t t
@@ -17367,7 +17965,6 @@ s,@extra_programs@,$extra_programs,;t t
 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,@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
@@ -17382,8 +17979,6 @@ s,@md_file@,$md_file,;t t
 s,@objc_boehm_gc@,$objc_boehm_gc,;t t
 s,@out_file@,$out_file,;t t
 s,@out_object_file@,$out_object_file,;t t
-s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
-s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t
 s,@thread_file@,$thread_file,;t t
 s,@tm_file_list@,$tm_file_list,;t t
 s,@tm_include_list@,$tm_include_list,;t t
@@ -17633,6 +18228,12 @@ s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
     rm -f $tmp/out
   fi
 
+  # Run the commands associated with the file.
+  case $ac_file in
+    as ) chmod +x as ;;
+    collect-ld ) chmod +x collect-ld ;;
+    nm ) chmod +x nm ;;
+  esac
 done
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF
@@ -17982,26 +18583,6 @@ for d in $subdirs doc build
 do
     test -d $d || mkdir $d
 done
-# If the host supports symlinks, point stage[1234] at ../stage[1234] so
-# bootstrapping and the installation procedure can still use
-# CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
-# FLAGS_TO_PASS has been modified to solve the problem there.
-# This is virtually a duplicate of what happens in configure.lang; we do
-# an extra check to make sure this only happens if ln -s can be used.
-case "$LN_S" in
-  *-s*)
-    for d in ${subdirs} ; do
-       STARTDIR=`${PWDCMD-pwd}`
-       cd $d
-       for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
-       do
-               rm -f $t
-               $LN_S ../$t $t 2>/dev/null
-       done
-       cd $STARTDIR
-    done
-  ;;
-esac
  ;;
   esac
 done