OSDN Git Service

2001-11-11 H.J. Lu <hjl@gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / config.gcc
index 600a693..6f17aaa 100644 (file)
@@ -1,22 +1,22 @@
 # GCC build-, host- and target-specific configuration file.
 # Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
-#This file is part of GNU CC.
+#This file is part of GCC.
 
-#GNU CC is free software; you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation; either version 2, or (at your option)
-#any later version.
+#GCC is free software; you can redistribute it and/or modify it under
+#the terms of the GNU General Public License as published by the Free
+#Software Foundation; either version 2, or (at your option) any later
+#version.
 
-#GNU CC is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
+#GCC is distributed in the hope that it will be useful, but WITHOUT
+#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#for more details.
 
 #You should have received a copy of the GNU General Public License
-#along with GNU CC; see the file COPYING.  If not, write to
-#the Free Software Foundation, 59 Temple Place - Suite 330,
-#Boston, MA 02111-1307, USA.
+#along with GCC; see the file COPYING.  If not, write to the Free
+#Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+#02111-1307, USA.
 
 # This is the GCC build-, host- and target-specific configuration file
 # where a configuration type, as recognized and generated by config.bfd,
 #  cpu_type            The name of the cpu, if different from machine.
 #
 #  tm_file             A list of target macro files, if different from
-#                      "$cpu_type/$cpu_type.h".
+#                      "$cpu_type/$cpu_type.h". Usually it's constructed
+#                      per target in a way like this:
+#                      tm_file="${tm_file} elfos.h svr4.h ${cpu_type.h}/elf.h"
+#                      Note that the preferred order is:
+#                      - specific target header "${cpu_type}/${cpu_type.h}"
+#                      - generic headers like elfos.h, netware.h, etc.
+#                      - specializing target headers like ${cpu_type.h}/elf.h
+#                      This helps to keep OS specific stuff out of the CPU
+#                      defining header ${cpu_type}/${cpu_type.h}.
 #
 #  tm_p_file           Location of file with declarations for functions
 #                      in $out_file.
 #
 #  extra_programs      Like extra_passes, but these are used when linking.
 #
-#  host_extra_objs     List of extra host-dependant objects that should
+#  host_extra_objs     List of extra host-dependent objects that should
 #                      be linked into the compiler proper.
 #
-#  host_extra_gcc_objs List of extra host-dependant objects that should
+#  host_extra_gcc_objs List of extra host-dependent objects that should
 #                      be linked into the gcc driver.
 #
-#  c_target_objs       List of extra target-dependant objects that be
+#  c_target_objs       List of extra target-dependent objects that be
 #                      linked into the C compiler only.
-#  
-#  cxx_target_objs     List of extra target-dependant objects that be
+#
+#  cxx_target_objs     List of extra target-dependent objects that be
 #                      linked into the C++ compiler only.
-#  
+#
 #  build_xm_defines    List of macros to define when compiling for the
 #                      build machine.
 #
@@ -222,10 +230,13 @@ c*-convex-*)
 i[34567]86-*-*)
        cpu_type=i386
        ;;
+x86_64-*-*)
+       cpu_type=i386
+       ;;
 hppa*-*-* | parisc*-*-*)
        cpu_type=pa
        ;;
-m68000-*-*)
+m680[02]0-*-*)
        cpu_type=m68k
        ;;
 mips*-*-*)
@@ -252,7 +263,7 @@ case $machine in
 *-*-*aout*)
        use_collect2=yes
        ;;
-esac   
+esac
 
 # Common parts for GNU/Linux, GNU/Hurd, OpenBSD and FreeBSD systems.
 case $machine in
@@ -277,16 +288,13 @@ case $machine in
        tmake_file="t-slibgcc-elf-ver t-linux t-gnu"
        case $machine in
        i[34567]86-*-*)
-               tm_file="${cpu_type}/${cpu_type}.h i386/att.h linux.h i386/linux.h gnu.h ${tm_file}"
-               ;;
-       mips*-*-*)
-               tm_file="svr4.h ${cpu_type}/${cpu_type}.h ${tm_file}"
+               tm_file="${cpu_type}/${cpu_type}.h i386/att.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
                ;;
        esac
        ;;
 *-*-openbsd*)
        tm_file=${cpu_type}/openbsd.h
-       tmake_file="t-libc-ok t-openbsd"
+       tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
        xm_defines=POSIX
        if test x$enable_threads = xyes; then
                thread_file='posix'
@@ -329,6 +337,7 @@ case $machine in
        *) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;;
        esac
        tmake_file=t-freebsd
+       xmake_file=none
        xm_defines=POSIX
        case x${enable_threads} in
        xno) fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h";;
@@ -379,7 +388,7 @@ a29k-*-bsd* | a29k-*-sym1*)
        use_collect2=yes
        ;;
 a29k-*-udi | a29k-*-coff)
-       tm_file="${tm_file} dbxcoff.h a29k/udi.h"
+       tm_file="${tm_file} dbxcoff.h"
        tmake_file=a29k/t-a29kbare
        ;;
 a29k*-*-rtems*)
@@ -390,7 +399,7 @@ a29k*-*-rtems*)
        fi
        ;;
 a29k-wrs-vxworks*)
-       tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
+       tm_file="${tm_file} dbxcoff.h a29k/vx29k.h"
        tmake_file=a29k/t-vx29k
        extra_parts="crtbegin.o crtend.o"
        thread_file='vxworks'
@@ -398,6 +407,14 @@ a29k-wrs-vxworks*)
 a29k-*-*)                      # Default a29k environment.
        use_collect2=yes
        ;;
+alpha*-*-unicosmk*)
+       use_collect2=yes
+       tm_file="${tm_file} alpha/unicosmk.h"
+
+       # Don't include t-ieee for now because we don't support that yet
+       # tmake_file="alpha/t-ieee"
+       tmake_file="alpha/t-unicosmk"
+       ;;
 alpha-*-interix)
        tm_file="${tm_file} alpha/alpha32.h interix.h alpha/alpha-interix.h"
 
@@ -430,8 +447,7 @@ alpha*-*-linux*ecoff*)
 alpha*-*-linux*libc1*)
        tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
        target_cpu_default="MASK_GAS"
-       tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 alpha/t-alpha alpha/t-crtbe alpha/t-ieee"
-       extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+       tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 alpha/t-alpha alpha/t-crtbe alpha/t-crtfm alpha/t-ieee"
        gas=yes gnu_ld=yes
        if test x$enable_threads = xyes; then
                thread_file='posix'
@@ -440,8 +456,7 @@ alpha*-*-linux*libc1*)
 alpha*-*-linux*)
        tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
        target_cpu_default="MASK_GAS"
-       tmake_file="t-slibgcc-elf-ver t-linux alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
-       extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+       tmake_file="t-slibgcc-elf-ver t-linux alpha/t-crtbe alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
        gas=yes gnu_ld=yes
        if test x$enable_threads = xyes; then
                thread_file='posix'
@@ -450,14 +465,13 @@ alpha*-*-linux*)
 alpha*-*-freebsd*)
        tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
        target_cpu_default="MASK_GAS"
-       tmake_file="${tmake_file} alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
+       tmake_file="${tmake_file} alpha/t-crtbe alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
        ;;
 alpha*-*-netbsd*)
        xm_defines=POSIX
        tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
        target_cpu_default="MASK_GAS"
-       tmake_file="alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
-       extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+       tmake_file="alpha/t-crtbe alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
        gas=yes gnu_ld=yes
        ;;
 
@@ -466,7 +480,7 @@ alpha*-*-openbsd*)
        target_cpu_default="MASK_GAS"
        tmake_file="alpha/t-alpha alpha/t-ieee"
        ;;
-       
+
 alpha*-dec-osf*)
        xm_defines=POSIX
        if test x$stabs = xyes
@@ -478,7 +492,7 @@ alpha*-dec-osf*)
                extra_passes="mips-tfile mips-tdump"
        fi
        use_collect2=yes
-       tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-osf"
+       tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-osf alpha/t-crtfm"
        case $machine in
          *-*-osf1*)
            tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
@@ -522,16 +536,16 @@ alpha*-dec-vms*)
        xm_file=alpha/xm-vms.h
        tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
        ;;
+arc-*-elf*)
+       tm_file="elfos.h svr4.h ${tm_file}"
+       extra_parts="crtinit.o crtfini.o"
+       ;;
 arm*-*-rtems*)
-       tm_file=arm/rtems-elf.h
+       tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/rtems-elf.h rtems.h"
        tmake_file="arm/t-arm-elf t-rtems"
        if test x$enable_threads = xyes; then
          thread_file='rtems'
        fi
-       extra_parts="crtinit.o crtfini.o"
-       ;;
-arc-*-elf*)
-       extra_parts="crtinit.o crtfini.o"
        ;;
 arm-*-coff* | armel-*-coff*)
        tm_file=arm/coff.h
@@ -572,7 +586,7 @@ arm*-*-netbsd*)
        ;;
 arm*-*-linux*)                 # ARM GNU/Linux with ELF
        xmake_file=x-linux
-       tm_file="arm/linux-elf.h"
+       tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
        tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        gnu_ld=yes
@@ -583,7 +597,7 @@ arm*-*-linux*)                      # ARM GNU/Linux with ELF
        esac
        ;;
 arm*-*-uclinux*)               # ARM ucLinux
-       tm_file=arm/uclinux-elf.h
+       tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/uclinux-elf.h"
        tmake_file=arm/t-arm-elf
        ;;
 arm*-*-aout)
@@ -591,19 +605,19 @@ arm*-*-aout)
        tmake_file=arm/t-arm-aout
        ;;
 arm*-*-ecos-elf)
-       tm_file=arm/ecos-elf.h
+       tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/ecos-elf.h"
        tmake_file=arm/t-arm-elf
-       ;; 
+       ;;
 arm*-*-elf)
-       tm_file=arm/unknown-elf.h
+       tm_file="elfos.h arm/unknown-elf.h arm/elf.h"
        tmake_file=arm/t-arm-elf
        ;;
 arm*-*-conix*)
-       tm_file=arm/conix-elf.h
+       tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/conix-elf.h"
        tmake_file=arm/t-arm-elf
        ;;
 arm*-*-oabi)
-       tm_file=arm/unknown-elf-oabi.h
+       tm_file="arm/unknown-elf-oabi.h elfos.h arm/unknown-elf.h arm/elf.h"
        tmake_file=arm/t-arm-elf
        ;;
 arm-*-pe*)
@@ -630,21 +644,23 @@ c34-convex-*)
        use_collect2=yes
        ;;
 c38-convex-*)
-       target_cpu_default=16           
+       target_cpu_default=16
        use_collect2=yes
        ;;
 c4x-*-rtems*)
-       cpu_type=c4x
        tmake_file="c4x/t-c4x t-rtems"
        tm_file=c4x/rtems.h
        if test x$enable_threads = xyes; then
          thread_file='rtems'
        fi
+       c_target_objs="c4x-c.o"
+       cxx_target_objs="c4x-c.o"
        ;;
 c4x-*)
-       cpu_type=c4x
        float_format=c4x
        tmake_file=c4x/t-c4x
+       c_target_objs="c4x-c.o"
+       cxx_target_objs="c4x-c.o"
        ;;
 clipper-intergraph-clix*)
        tm_file="${tm_file} svr3.h clipper/clix.h"
@@ -653,7 +669,29 @@ clipper-intergraph-clix*)
        extra_parts="crtbegin.o crtend.o"
        install_headers_dir=install-headers-cpio
        ;;
+cris-*-aout)
+       tm_file="dbxelf.h ${tm_file} cris/aout.h"
+       gas=yes
+       tmake_file="cris/t-cris cris/t-aout"
+       ;;
+cris-*-elf | cris-*-none)
+       tm_file="elfos.h ${tm_file}"
+       tmake_file="cris/t-cris cris/t-elfmulti"
+       gas=yes
+       ;;
+cris-*-linux*)
+       tm_file="elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
+       tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
+       extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+       case x${enable_threads} in
+       x | xyes | xpthreads | xposix)
+               thread_file=posix
+               ;;
+       esac
+       gas=yes
+       ;;
 d30v-*)
+       tm_file="elfos.h svr4.h ${tm_file}"
        float_format=i64
        ;;
 dsp16xx-*)
@@ -662,7 +700,7 @@ elxsi-elxsi-*)
        use_collect2=yes
        ;;
 fr30-*-elf)
-       tm_file="fr30/fr30.h"
+       tm_file="elfos.h svr4.h ${tm_file}"
        tmake_file=fr30/t-fr30
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
        ;;
@@ -674,19 +712,24 @@ h8300-*-rtems*)
        fi
        float_format=i32
        ;;
+h8300-*-elf*)
+       tmake_file="h8300/t-h8300 h8300/t-elf"
+       tm_file="h8300/h8300.h h8300/elf.h"
+       float_format=i32
+       ;;
 h8300-*-*)
        float_format=i32
        ;;
 hppa*64*-*-linux* | parisc*64*-*-linux*)
        target_cpu_default="(MASK_PA_11 | MASK_PA_20)"
-       tm_file="pa/pa64-start.h ${tm_file} linux.h pa/pa-linux.h \
+       tm_file="pa/pa64-start.h ${tm_file} elfos.h svr4.h linux.h pa/pa-linux.h \
                 pa/pa64-regs.h pa/pa-64.h pa/pa64-linux.h"
        tmake_file=pa/t-linux64
        gas=yes gnu_ld=yes
        ;;
 hppa*-*-linux* | parisc*-*-linux*)
        target_cpu_default="MASK_PA_11"
-       tm_file="${tm_file} linux.h pa/pa-linux.h \
+       tm_file="${tm_file} elfos.h svr4.h linux.h pa/pa-linux.h \
                 pa/pa32-regs.h pa/pa32-linux.h"
        tmake_file="t-slibgcc-elf-ver t-linux pa/t-linux"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
@@ -699,13 +742,6 @@ hppa*-*-openbsd*)
        target_cpu_default="MASK_PA_11"
        tmake_file=pa/t-openbsd
        ;;
-hppa1.1-*-rtems*)
-       tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
-       tmake_file="pa/t-pro t-rtems"
-       if test x$enable_threads = xyes; then
-         thread_file='rtems'
-       fi
-       ;;
 hppa1.1-*-pro*)
        target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
        tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
@@ -902,24 +938,30 @@ hppa*-*-lites*)
        ;;
 hppa*-*-mpeix*)
        tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-mpeix.h"
-       xmake_file=pa/x-pa-mpeix 
-       echo "You must use gas. Assuming it is already installed." 
+       xmake_file=pa/x-pa-mpeix
+       echo "You must use gas. Assuming it is already installed."
        gas=yes
        install_headers_dir=install-headers-tar
-       use_collect2=yes 
-       ;; 
+       use_collect2=yes
+       ;;
 i370-*-opened*)                         # IBM 360/370/390 Architecture
        xm_defines='POSIX FATAL_EXIT_CODE=12'
        tm_file=i370/oe.h
+       tmake_file="i370/t-i370"
        xmake_file=i370/x-oe
+       c_target_objs="i370-c.o"
+       cxx_target_objs="i370-c.o"
        ;;
 i370-*-mvs*)
        xm_defines='POSIX FATAL_EXIT_CODE=12'
        tm_file=i370/mvs.h
+       tmake_file="i370/t-i370"
+       c_target_objs="i370-c.o"
+       cxx_target_objs="i370-c.o"
        ;;
 i370-*-linux*)
        xmake_file=x-linux
-       tm_file="i370/linux.h ${tm_file}"
+       tm_file="elfos.h svr4.h linux.h i370/linux.h ${tm_file}"
        tmake_file="t-slibgcc-elf-ver t-linux"
        # broken_install=yes
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
@@ -933,7 +975,7 @@ i370-*-linux*)
        ;;
 i[34567]86-*-chorusos*)
        xm_defines=POSIX
-       tm_file="i386/i386.h i386/att.h elfos.h i386/i386elf.h i386/chorus.h"
+       tm_file="${tm_file} i386/att.h elfos.h i386/i386elf.h chorus.h"
        tmake_file=i386/t-i386elf
        xmake_file=x-svr4
        case x${enable_threads} in
@@ -944,7 +986,7 @@ i[34567]86-*-chorusos*)
        ;;
 i[34567]86-*-elf*)
        xm_defines=POSIX
-       tm_file="i386/i386.h i386/att.h elfos.h i386/i386elf.h"
+       tm_file="${tm_file} i386/att.h elfos.h i386/i386elf.h"
        tmake_file=i386/t-i386elf
        xmake_file=x-svr4
        ;;
@@ -966,7 +1008,7 @@ i[34567]86-ncr-sysv4*)             # NCR 3000 - ix86 running system V.4
        then
                tm_file=i386/sysv4gdb.h
        else
-               tm_file=i386/sysv4.h
+               tm_file="${tm_file} i386/att.h elfos.h svr4.h i386/sysv4.h"
        fi
        extra_parts="crtbegin.o crtend.o"
        tmake_file=i386/t-crtpic
@@ -981,7 +1023,7 @@ i[34567]86-next-*)
        fi
        ;;
 i[34567]86-*-netware)          # Intel 80386's running netware
-       tm_file=i386/netware.h
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h i386/sysv4.h netware.h i386/netware.h"
        tmake_file=i386/t-netware
        ;;
 i[34567]86-sequent-bsd*)               # 80386 from Sequent
@@ -1014,7 +1056,7 @@ i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
        fi
        xm_defines="POSIX SMALL_ARG_MAX"
        xmake_file=x-svr4
-       tm_file=i386/ptx4-i.h
+       tm_file="${tm_file} i386/att.h elfos.h ptx4.h i386/ptx4-i.h"
        tmake_file=t-svr4
        extra_parts="crtbegin.o crtend.o"
        install_headers_dir=install-headers-cpio
@@ -1034,7 +1076,7 @@ i[34567]86-*-aout*)
 i[34567]86-*-beoself* | i[34567]86-*-beos*)
        xm_defines=POSIX
        tmake_file='i386/t-beos i386/t-crtpic'
-       tm_file=i386/beos-elf.h
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h i386/beos-elf.h"
        xmake_file=i386/x-beos
        extra_parts='crtbegin.o crtend.o'
        ;;
@@ -1053,7 +1095,14 @@ i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12].* | i[34567]86-*-freebsd*aou
        tmake_file=t-freebsd
        ;;
 i[34567]86-*-freebsd*)
-       tm_file="${tm_file} i386/att.h svr4.h ${fbsd_tm_file} i386/freebsd.h"
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h ${fbsd_tm_file} i386/freebsd.h"
+       ;;
+i[34567]86-*-netbsdelf*)
+       xm_defines=POSIX
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h i386/netbsd-elf.h"
+       tmake_file=t-netbsd
+       gnu_ld=yes
+       float_format=i386
        ;;
 i[34567]86-*-netbsd*)
        tm_file=i386/netbsd.h
@@ -1061,6 +1110,8 @@ i[34567]86-*-netbsd*)
        use_collect2=yes
        ;;
 i[34567]86-*-openbsd*)
+       # needed to unconfuse gdb
+       tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
        # we need collect2 until our bug is fixed...
        use_collect2=yes
        ;;
@@ -1100,7 +1151,7 @@ i[34567]86-*-linux*libc1) # Intel 80386's running GNU/Linux
                                # with ELF format using the
                                # GNU/Linux C library 5
        xmake_file=x-linux      
-       tm_file="i386/i386.h i386/att.h linux.h i386/linux.h"
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h linux.h i386/linux.h"
        tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 i386/t-crtstuff"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        gnu_ld=yes
@@ -1113,7 +1164,19 @@ i[34567]86-*-linux*)     # Intel 80386's running GNU/Linux
                        # with ELF format using glibc 2
                        # aka GNU/Linux C library 6
        xmake_file=x-linux
-       tm_file="i386/i386.h i386/att.h linux.h i386/linux.h"
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h linux.h i386/linux.h"
+       tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff"
+       extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+       gnu_ld=yes
+       float_format=i386
+       if test x$enable_threads = xyes; then
+               thread_file='posix'
+       fi
+       ;;
+x86_64-*-linux*)
+       xmake_file=x-linux
+       tm_file="i386/biarch64.h i386/i386.h i386/att.h elfos.h svr4.h linux.h \
+                i386/x86-64.h i386/linux64.h"
        tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        gnu_ld=yes
@@ -1143,7 +1206,7 @@ i[34567]86-pc-msdosdjgpp*)
        esac
        ;;
 i[34567]86-moss-msdos* | i[34567]86-*-moss*)
-       tm_file="i386/i386.h i386/att.h linux.h i386/linux.h i386/moss.h"
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h linux.h i386/linux.h i386/moss.h"
        tmake_file=t-libc-ok
        gnu_ld=yes
        gas=yes
@@ -1174,15 +1237,13 @@ i[34567]86-*-osfrose*)          # 386 using OSF/rose
        extra_objs=halfpic.o
        ;;
 i[34567]86-go32-rtems*)
-       cpu_type=i386
-       tm_file=i386/go32-rtems.h
+       tm_file=i386/djgpp-rtems.h
        tmake_file=t-rtems
        if test x$enable_threads = xyes; then
          thread_file='rtems'
        fi
        ;;
 i[34567]86-*-rtemscoff*)
-       cpu_type=i386
        tm_file=i386/rtems.h
        tmake_file=t-rtems
        if test x$enable_threads = xyes; then
@@ -1190,8 +1251,7 @@ i[34567]86-*-rtemscoff*)
        fi
        ;;
 i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
-       cpu_type=i386
-       tm_file=i386/rtemself.h
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h linux.h i386/rtemself.h rtems.h"
        extra_parts="crtbegin.o crtend.o crti.o crtn.o"
        tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
        if test x$enable_threads = xyes; then
@@ -1214,7 +1274,7 @@ i[34567]86-*-sco3.2v5*)   # 80386 running SCO Open Server 5
        ;;
 i[34567]86-*-solaris2*)
        xm_defines="POSIX SMALL_ARG_MAX"
-       tm_file=i386/sol2.h
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h i386/sysv4.h i386/sol2.h"
        if test x$gas = xyes; then
                # Only needed if gas does not support -s
                tm_file="i386/sol2gas.h ${tm_file}"
@@ -1243,7 +1303,7 @@ i[34567]86-*-solaris2*)
        ;;
 i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
        xm_defines=POSIX
-       tm_file=i386/sysv5.h
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h"
        if test x$stabs = xyes
        then
                tm_file="${tm_file} dbx.h"
@@ -1257,7 +1317,7 @@ i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
        ;;
 i[34567]86-*-sysv4*)           # Intel 80386's running system V.4
        xm_defines="POSIX SMALL_ARG_MAX"
-       tm_file=i386/sysv4.h
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h i386/sysv4.h"
        if test x$stabs = xyes
        then
                tm_file="${tm_file} dbx.h"
@@ -1268,21 +1328,20 @@ i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
        ;;
 i[34567]86-*-udk*)      # Intel x86 on SCO UW/OSR5 Dev Kit
        xm_defines=POSIX
-       tm_file=i386/udk.h
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h i386/udk.h"
        tmake_file="i386/t-crtpic i386/t-udk"
        xmake_file=x-svr4
        extra_parts="crtbegin.o crtend.o"
        install_headers_dir=install-headers-cpio
        ;;
 i[34567]86-*-osf1*)            # Intel 80386's running OSF/1 1.3+
-       cpu_type=i386
        xm_file=i386/xm-osf1elf.h
        xm_defines='POSIX USE_C_ALLOCA SMALL_ARG_MAX'
        if test x$stabs = xyes
        then
-               tm_file=i386/osf1elfgdb.h
+               tm_file="${tm_file} i386/att.h elfos.h svr4.h i386/sysv4.h i386/osf1elf.h i386/osf1elfgdb.h"
        else
-               tm_file=i386/osf1elf.h
+               tm_file="${tm_file} i386/att.h elfos.h svr4.h i386/sysv4.h i386/osf1elf.h"
        fi
        tmake_file=i386/t-osf1elf
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
@@ -1351,11 +1410,11 @@ i[34567]86-*-mingw32*)
        fi
        exeext=.exe
        case $machine in
-               *mingw32msv*)
-                       ;;
-               *minwg32crt* | *mingw32*)
+               *mingw32crt*)
                        tm_file="${tm_file} i386/crtdll.h"
                        ;;
+               *minwg32msv* | *mingw32*)
+                       ;;
        esac
        ;;
 i[34567]86-*-uwin*)
@@ -1384,14 +1443,13 @@ i[34567]86-*-interix*)
        ;;
 i[34567]86-dg-dgux*)
        xm_defines=POSIX
-       out_file=i386/dgux.c
-       tm_file=i386/dgux.h
+       tm_file="${tm_file} i386/att.h elfos.h svr4.h i386/sysv4.h i386/dgux.h"
        tmake_file=i386/t-dgux
        xmake_file=i386/x-dgux
        install_headers_dir=install-headers-cpio
       ;;
 i860-alliant-*)                # Alliant FX/2800
-       tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
+       tm_file="${tm_file} elfos.h svr4.h i860/sysv4.h i860/fx2800.h"
        tmake_file=i860/t-fx2800
        extra_parts="crtbegin.o crtend.o"
        ;;
@@ -1417,7 +1475,7 @@ i860-*-sysv3*)
        extra_parts="crtbegin.o crtend.o"
        ;;
 i860-*-sysv4*)
-       tm_file="${tm_file} svr4.h i860/sysv4.h"
+       tm_file="${tm_file} elfos.h svr4.h i860/sysv4.h"
        xm_defines=POSIX
        tmake_file=t-svr4
        extra_parts="crtbegin.o crtend.o"
@@ -1449,14 +1507,12 @@ i960-wrs-vxworks*)
 i960-*-coff*)
        tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
        tmake_file=i960/t-960bare
-       use_collect2=yes
        c_target_objs="i960-c.o"
        cxx_target_objs="i960-c.o"
        ;;
 i960-*-rtems)
        tmake_file="i960/t-960bare t-rtems"
        tm_file="${tm_file} dbxcoff.h i960/rtems.h"
-       use_collect2=yes
        if test x$enable_threads = xyes; then
          thread_file='rtems'
        fi
@@ -1465,11 +1521,17 @@ i960-*-rtems)
        ;;
 i960-*-*)                      # Default i960 environment.
        use_collect2=yes
+       tmake_file=i960/t-960bare
        c_target_objs="i960-c.o"
        cxx_target_objs="i960-c.o"
        ;;
+ia64*-*-aix*)
+       tm_file="${tm_file} elfos.h svr4.h ia64/sysv4.h ia64/aix.h"
+       tmake_file="ia64/t-ia64 ia64/t-aix"
+       target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
+       ;;
 ia64*-*-elf*)
-       tm_file=ia64/elf.h
+       tm_file="${tm_file} elfos.h ia64/sysv4.h ia64/elf.h"
        tmake_file="ia64/t-ia64"
        target_cpu_default="0"
        if test x$gas = xyes
@@ -1482,8 +1544,14 @@ ia64*-*-elf*)
        fi
        float_format=i386
        ;;
+ia64*-*-freebsd*)
+       tm_file="${tm_file} ${fbsd_tm_file} elfos.h ia64/sysv4.h ia64/freebsd.h"
+       target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
+       tmake_file="${tmake_file} ia64/t-ia64"
+       float_format=i386
+       ;;
 ia64*-*-linux*)
-       tm_file=ia64/linux.h
+       tm_file="${tm_file} elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
        tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 ia64/t-glibc"
        target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
        if test x$enable_threads = xyes; then
@@ -1492,7 +1560,8 @@ ia64*-*-linux*)
        float_format=i386
        ;;
 ia64*-*-hpux*)
-       tm_file="ia64/ia64.h svr4.h ia64/sysv4.h ia64/hpux.h"
+       tm_file="${tm_file} elfos.h svr4.h ia64/sysv4.h ia64/hpux.h ia64/hpux_longdouble.h"
+       tmake_file="ia64/t-ia64 ia64/t-hpux"
        target_cpu_default="MASK_GNU_AS"
        if test x$enable_threads = xyes; then
                thread_file='posix'
@@ -1500,6 +1569,7 @@ ia64*-*-hpux*)
        float_format=i386
        ;;
 m32r-*-elf*)
+       tm_file="elfos.h svr4.h ${tm_file}"
        extra_parts="crtinit.o crtfini.o"
        ;;
 # m68hc11 and m68hc12 share the same machine description.
@@ -1837,6 +1907,7 @@ m68020-*-elf* | m68k-*-elf*)
        xm_defines=POSIX
        tmake_file=m68k/t-m68kelf
        header_files=math-68881.h
+       extra_parts="crtbegin.o crtend.o"
        ;;
 m68k-*-lynxos*)
        if test x$gas = xyes
@@ -1856,6 +1927,8 @@ m68k*-*-netbsd*)
        use_collect2=yes
        ;;
 m68k*-*-openbsd*)
+       # needed to unconfuse gdb
+       tmake_file="t-libc-ok t-openbsd m68k/t-openbsd"
        float_format=m68k
        # we need collect2 until our bug is fixed...
        use_collect2=yes
@@ -1928,6 +2001,7 @@ m68k-*-rtemself*|m68k-*-rtems*)
        tm_file=m68k/rtemself.h
        extra_headers=math-68881.h
        float_format=m68k
+       extra_parts="crtbegin.o crtend.o"
        if test x$enable_threads = xyes; then
          thread_file='rtems'
        fi
@@ -1936,11 +2010,11 @@ m88k-dg-dgux*)
        xm_defines=POSIX
        case $machine in
          m88k-dg-dguxbcs*)
-           tm_file=m88k/dguxbcs.h
+           tm_file="elfos.h svr4.h m88k/dgux.h m88k/dguxbcs.h"
            tmake_file=m88k/t-dguxbcs
            ;;
          *)
-           tm_file=m88k/dgux.h
+           tm_file="elfos.h svr4.h m88k/dgux.h"
            tmake_file=m88k/t-dgux
            ;;
        esac
@@ -2005,12 +2079,12 @@ m88k-*-sysv3*)
        ;;
 m88k-*-sysv4*)
        xm_defines=POSIX
-       tm_file=m88k/sysv4.h
+       tm_file="elfos.h svr4.h m88k/sysv4.h"
        extra_parts="crtbegin.o crtend.o"
        tmake_file=m88k/t-sysv4
        ;;
 mcore-*-elf)
-       tm_file=mcore/mcore-elf.h
+       tm_file="elfos.h svr4.h ${tm_file} mcore/mcore-elf.h"
        tmake_file=mcore/t-mcore
        ;;
 mcore-*-pe*)
@@ -2187,9 +2261,17 @@ mipsel-*-netbsd* | mips-dec-netbsd*)    # Decstation running NetBSD
        ;;
 mips*-*-linux*)                                # Linux MIPS, either endian.
        xmake_file=x-linux
+        tm_file="elfos.h svr4.h linux.h mips/linux.h"
        case $machine in
-              mips*el-*)  tm_file="elfos.h mips/elfl.h mips/linux.h" ;;
-              *)         tm_file="elfos.h mips/elf.h mips/linux.h" ;;
+        mipsisa32*-*)
+                tm_file="$tm_file mips/isa32-linux.h"
+                target_cpu_default="MASK_SOFT_FLOAT"
+                ;;
+        esac
+        case $machine in
+        mips*el-*)
+                tm_file="mips/little.h $tm_file"
+                ;;
        esac
        tmake_file="t-slibgcc-elf-ver t-linux"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
@@ -2392,8 +2474,6 @@ mips-*-riscos[56789]*)            # Default MIPS RISC-OS 5.0.
                use_collect2=yes
        fi
        ;;
-mips-*-gnu*)
-       ;;
 mipsel-*-ecoff*)
        tm_file=mips/ecoffl.h
        if test x$stabs = xyes; then
@@ -2408,6 +2488,11 @@ mips-*-ecoff*)
        fi
        tmake_file=mips/t-ecoff
        ;;
+mipsisa32-*-elf*)
+       tm_file="mips/isa3264.h mips/abi64.h"
+       tmake_file=mips/t-isa3264
+       target_cpu_default="MASK_SOFT_FLOAT"
+       ;;
 mipsel-*-elf*)
        tm_file="mips/elfl.h"
        tmake_file=mips/t-elf
@@ -2449,6 +2534,7 @@ mips*-*-rtems*)
 mipstx39el-*-elf*)
        tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
        tmake_file=mips/t-r3900
+       target_cpu_default="MASK_SOFT_FLOAT"
        ;;
 mipstx39-*-elf*)
        tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
@@ -2468,10 +2554,11 @@ mips-*-*)                               # Default MIPS RISC-OS 4.0.
                use_collect2=yes
        fi
        ;;
+mmix-knuth-mmixware)
+       ;;
 mn10200-*-*)
        float_format=i32
-       cpu_type=mn10200
-       tm_file="mn10200/mn10200.h"
+       tm_file="elfos.h svr4.h ${tm_file}"
        if test x$stabs = xyes
        then
                tm_file="${tm_file} dbx.h"
@@ -2479,8 +2566,7 @@ mn10200-*-*)
        use_collect2=no
        ;;
 mn10300-*-*)
-       cpu_type=mn10300
-       tm_file="mn10300/mn10300.h"
+       tm_file="elfos.h svr4.h ${tm_file}"
        if test x$stabs = xyes
        then
                tm_file="${tm_file} dbx.h"
@@ -2533,12 +2619,12 @@ ns32k-*-openbsd*)
        # Nothing special
        ;;
 pj*-linux*)
-       tm_file="svr4.h pj/linux.h ${tm_file}"
+       tm_file="elfos.h svr4.h pj/linux.h ${tm_file}"
        ;;
 pj-*)
        ;;
 pjl-*)
-       tm_file="svr4.h pj/pjl.h ${tm_file}"
+       tm_file="elfos.h svr4.h pj/pjl.h ${tm_file}"
        ;;
 
 romp-*-aos*)
@@ -2553,15 +2639,20 @@ romp-*-openbsd*)
 powerpc-*-openbsd*)
        tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
        ;;
+powerpc64-*-linux*)
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/linux64.h"
+       out_file=rs6000/rs6000.c
+       tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
+       xmake_file=x-linux
+       extra_headers=ppc-asm.h
+       ;;
 powerpc-*-beos*)
-       cpu_type=rs6000
-       tm_file="${tm_file} rs6000/aix.h rs6000/beos.h"
+       tm_file="${tm_file} rs6000/aix.h rs6000/beos.h rs6000/xcoff.h"
        xm_defines=POSIX
        xm_file=rs6000/xm-beos.h
        tmake_file=rs6000/t-beos
        ;;
 powerpc-*-darwin*)
-       cpu_type=rs6000
        tm_file="${tm_file} darwin.h rs6000/darwin.h"
        tm_p_file="${tm_p_file} darwin-protos.h"
        tmake_file=rs6000/t-darwin
@@ -2571,18 +2662,26 @@ powerpc-*-darwin*)
        # fixed and we can get rid of this silliness.
        xm_defines="HAVE_DESIGNATED_INITIALIZERS=0"
        extra_objs="darwin.o"
+       c_target_objs="darwin-c.o"
+       cxx_target_objs="darwin-c.o"
        # Darwin linker does collect2 functionality
        use_collect2=no
        ;;
 powerpc-*-sysv*)
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h"
        xm_defines=POSIX
        extra_headers=ppc-asm.h
        tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
        ;;
+powerpc-*-netbsd*)
+       xm_defines=POSIX
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/netbsd.h"
+       tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
+       extra_headers=ppc-asm.h
+       ;;
 powerpc-*-chorusos*)
        xm_defines=POSIX
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/chorus.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h chorus.h"
        tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        case x${enable_threads} in
@@ -2593,31 +2692,31 @@ powerpc-*-chorusos*)
        ;;
 powerpc-*-eabiaix*)
        xm_defines=POSIX
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
        tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        ;;
 powerpc-*-eabisim*)
        xm_defines=POSIX
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
        tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        ;;
 powerpc-*-elf*)
        xm_defines=POSIX
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h"
        tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        ;;
 powerpc-*-eabi*)
        xm_defines=POSIX
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/eabi.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/eabi.h"
        tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        ;;
 powerpc-*-rtems*)
        xm_defines=POSIX
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/eabi.h rtems.h rs6000/rtems.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/eabi.h rtems.h rs6000/rtems.h"
        tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        if test x$enable_threads = xyes; then
@@ -2625,7 +2724,7 @@ powerpc-*-rtems*)
        fi
        ;;
 powerpc-*-linux*libc1)
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/linux.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/linux.h"
        out_file=rs6000/rs6000.c
        tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
        xmake_file=x-linux
@@ -2635,7 +2734,7 @@ powerpc-*-linux*libc1)
        fi
        ;;
 powerpc-*-linux*)
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/linux.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/linux.h"
        out_file=rs6000/rs6000.c
        tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
        xmake_file=x-linux
@@ -2645,74 +2744,72 @@ powerpc-*-linux*)
        fi
        ;;
 powerpc-wrs-vxworks*)
-        cpu_type=rs6000
        xm_defines=POSIX
-        tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/vxppc.h"
+        tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/vxppc.h"
         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        thread_file='vxworks'
         ;;
 powerpcle-wrs-vxworks*)
-        cpu_type=rs6000
        xm_defines=POSIX
-        tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
+        tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        thread_file='vxworks'
         ;;
 powerpcle-*-sysv*)
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/sysv4le.h"
        xm_defines=POSIX
        tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        ;;
 powerpcle-*-elf*)
        xm_defines=POSIX
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/sysv4le.h"
        tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        ;;
 powerpcle-*-eabisim*)
        xm_defines=POSIX
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
        tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        ;;
 powerpcle-*-eabi*)
        xm_defines=POSIX
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
        tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        ;;
 powerpcle-*-solaris2*)
-       tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
+       tm_file="${tm_file} elfos.h svr4.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
        xm_defines=POSIX
        tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
        extra_headers=ppc-asm.h
        ;;
 rs6000-ibm-aix3.[01]*)
        xm_defines=POSIX
-       tm_file="${tm_file} rs6000/aix.h rs6000/aix31.h"
+       tm_file="${tm_file} rs6000/aix.h rs6000/aix31.h rs6000/xcoff.h"
        float_format=none
        use_collect2=yes
        ;;
 rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
        xm_defines=POSIX
-       tm_file="${tm_file} rs6000/aix.h rs6000/aix3newas.h"
+       tm_file="${tm_file} rs6000/aix.h rs6000/aix3newas.h rs6000/xcoff.h"
        tmake_file=rs6000/t-newas
        float_format=none
        use_collect2=yes
        ;;
 rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
        xm_defines=POSIX
-       tm_file="${tm_file} rs6000/aix.h rs6000/aix41.h"
+       tm_file="${tm_file} rs6000/aix.h rs6000/aix41.h rs6000/xcoff.h"
        tmake_file=rs6000/t-newas
        float_format=none
        use_collect2=yes
        ;;
 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
        xm_defines=POSIX
-       tm_file="${tm_file} rs6000/aix.h rs6000/aix43.h"
+       tm_file="${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h"
        tmake_file=rs6000/t-aix43
        float_format=none
        use_collect2=yes
@@ -2720,7 +2817,7 @@ rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
        ;;
 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
        xm_defines=POSIX
-       tm_file="${tm_file} rs6000/aix.h rs6000/aix51.h"
+       tm_file="${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h"
        tmake_file=rs6000/t-aix43
        float_format=none
        use_collect2=yes
@@ -2728,18 +2825,18 @@ rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
        ;;
 rs6000-ibm-aix*)
        xm_defines=POSIX
-       tm_file="${tm_file} rs6000/aix.h"
+       tm_file="${tm_file} rs6000/aix.h rs6000/xcoff.h"
        float_format=none
        use_collect2=yes
        ;;
 rs6000-bull-bosx)
        xm_defines=POSIX
-       tm_file="${tm_file} rs6000/aix.h"
+       tm_file="${tm_file} rs6000/aix.h rs6000/xcoff.h"
        float_format=none
        use_collect2=yes
        ;;
 rs6000-*-mach*)
-       tm_file="rs6000/rs6000.h rs6000/mach.h"
+       tm_file="${tm_file} rs6000/mach.h"
        xm_defines=POSIX
        use_collect2=yes
        ;;
@@ -2748,14 +2845,35 @@ rs6000-*-lynxos*)
        tmake_file=rs6000/t-rs6000
        use_collect2=yes
        ;;
+s390-*-linux*)
+       xmake_file=x-linux
+       tm_file="s390/s390.h elfos.h svr4.h linux.h s390/linux.h"
+       tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux"
+       extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+       if test x$enable_threads = xyes; then
+               thread_file='posix'
+       fi
+       ;;
+s390x-*-linux*)
+       xmake_file=x-linux
+       tm_file="s390/s390.h elfos.h svr4.h linux.h s390/linux.h s390/linux64.h"
+       tm_p_file=s390/s390-protos.h
+       md_file=s390/s390.md
+       out_file=s390/s390.c
+       tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux"
+       extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+       if test x$enable_threads = xyes; then
+               thread_file='posix'
+       fi
+       ;;
 sh-*-elf*)
        tmake_file="sh/t-sh sh/t-elf"
-       tm_file="sh/sh.h sh/elf.h"
+       tm_file="${tm_file} sh/elf.h"
        float_format=sh
        ;;
 sh-*-rtemself*)
        tmake_file="sh/t-sh sh/t-elf t-rtems"
-       tm_file="sh/sh.h sh/elf.h sh/rtemself.h"
+       tm_file="${tm_file} sh/elf.h sh/rtemself.h"
        float_format=sh
        if test x$enable_threads = xyes; then
          thread_file='rtems'
@@ -2763,14 +2881,14 @@ sh-*-rtemself*)
        ;;
 sh-*-rtems*)
        tmake_file="sh/t-sh t-rtems"
-       tm_file="sh/sh.h sh/rtems.h"
+       tm_file="${tm_file} sh/rtems.h"
        float_format=sh
        if test x$enable_threads = xyes; then
          thread_file='rtems'
        fi
        ;;
 sh-*-linux*)
-       tm_file="sh/sh.h sh/elf.h sh/linux.h"
+       tm_file="${tm_file} sh/elf.h sh/linux.h"
        tmake_file="sh/t-sh sh/t-elf sh/t-linux"
        xmake_file=x-linux
        gas=yes gnu_ld=yes
@@ -2807,14 +2925,16 @@ sparc-*-netbsd*)
        use_collect2=yes
        ;;
 sparc-*-openbsd*)
+       # needed to unconfuse gdb
+       tmake_file="t-libc-ok t-openbsd sparc/t-openbsd"
        # we need collect2 until our bug is fixed...
        use_collect2=yes
        ;;
 sparc-*-bsd*)
-       tm_file=sparc/bsd.h
+       tm_file="${tm_file} sparc/bsd.h"
        ;;
 sparc-*-chorusos*)
-       tm_file="sparc/sol2.h sparc/elf.h sparc/chorus.h"
+       tm_file="sparc/sol2.h sparc/elf.h chorus.h"
        tmake_file=sparc/t-chorus-elf
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
        float_format=i64
@@ -2881,7 +3001,7 @@ sparc-*-rtems*|sparc-*-rtemself*)
          thread_file='rtems'
        fi
        ;;
-sparcv9-*-solaris2*)
+sparcv9-*-solaris2* | sparc64-*-solaris2*)
        if test x$gnu_ld = xyes
        then
                tm_file=sparc/sol2-64.h
@@ -2946,19 +3066,18 @@ sparc-*-solaris2*)
                tmake_file="$tmake_file t-slibgcc-sld"
        fi
        extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
-# At the moment, 32-to-64 cross compilation doesn't work.
-#      case $machine in
-#      *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
-#      *-*-solaris2*)
-#              if test x$gnu_ld = xyes
-#              then
-#                      tm_file=sparc/sol2-64.h
-#              else
-#                      tm_file=sparc/sol2-sld-64.h
-#              fi
-#              tmake_file="$tmake_file sparc/t-sol2-64"
-#              ;;
-#      esac
+       case $machine in
+       *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
+       *-*-solaris2*)
+               if test x$gnu_ld = xyes
+               then
+                       tm_file=sparc/sol2-64.h
+               else
+                       tm_file=sparc/sol2-sld-64.h
+               fi
+               tmake_file="$tmake_file sparc/t-sol2-64"
+               ;;
+       esac
        case $machine in
        *-*-solaris2.[0-4])
                float_format=i128
@@ -3029,8 +3148,8 @@ sparc86x-*-aout*)
        tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h"
        tmake_file=sparc/t-sp86x
        ;;
-sparc86x-*-elf*)       
-       tm_file="sparc/sol2.h sparc./elf.h sparc/sp86x-elf.h"
+sparc86x-*-elf*)
+       tm_file="sparc/sol2.h sparc/elf.h sparc/sp86x-elf.h"
        tmake_file=sparc/t-sp86x
         extra_parts="crtbegin.o crtend.o"
        ;;
@@ -3053,7 +3172,7 @@ sparc64-*-linux*)         # 64-bit Sparc's running GNU/Linux
        float_format=sparc
        ;;
 strongarm-*-elf*)
-       tm_file=arm/strongarm-elf.h
+       tm_file="arm/strongarm-elf.h elfos.h arm/unknown-elf.h arm/elf.h"
        tmake_file=arm/t-strongarm-elf
        out_file=arm/arm.c
        md_file=arm/arm.md
@@ -3078,8 +3197,7 @@ thumb*-*-*)
 *** when the -mthumb switch is given to the compiler." 1>&2; exit 1; }
        ;;
 v850-*-rtems*)
-       cpu_type=v850
-       tm_file="v850/rtems.h"
+       tm_file="elfos.h svr4.h ${tm_file} v850/rtems.h"
        tmake_file="v850/t-v850 t-rtems"
        if test x$stabs = xyes
        then
@@ -3091,8 +3209,7 @@ v850-*-rtems*)
        ;;
 v850-*-*)
        target_cpu_default="TARGET_CPU_generic"
-       cpu_type=v850
-       tm_file="v850/v850.h"
+       tm_file="elfos.h svr4.h ${tm_file}"
        tmake_file=v850/t-v850
        if test x$stabs = xyes
        then
@@ -3102,11 +3219,11 @@ v850-*-*)
        c_target_objs="v850-c.o"
        cxx_target_objs="v850-c.o"
        ;;
-vax-*-bsd*)                    # vaxen running BSD
+vax-*-bsd*)                    # VAXen running BSD
        use_collect2=yes
        float_format=vax
        ;;
-vax-*-sysv*)                   # vaxen running system V
+vax-*-sysv*)                   # VAXen running system V
        tm_file="${tm_file} vax/vaxv.h"
        xm_defines=POSIX
        float_format=vax
@@ -3122,16 +3239,16 @@ vax-*-openbsd*)
        float_format=vax
        use_collect2=yes
        ;;
-vax-*-ultrix*)                 # vaxen running ultrix
+vax-*-ultrix*)                 # VAXen running ultrix
        tm_file="${tm_file} vax/ultrix.h"
        float_format=vax
        ;;
-vax-*-vms*)                    # vaxen running VMS
+vax-*-vms*)                    # VAXen running VMS
        xm_file=vax/xm-vms.h
        tm_file=vax/vms.h
        float_format=vax
        ;;
-vax-*-*)                       # vax default entry
+vax-*-*)                       # VAX default entry
        float_format=vax
        ;;
 we32k-att-sysv*)
@@ -3139,7 +3256,7 @@ we32k-att-sysv*)
        use_collect2=yes
        ;;
 xscale-*-elf)
-       tm_file=arm/xscale-elf.h
+       tm_file="arm/xscale-elf.h elfos.h arm/unknown-elf.h arm/elf.h"
        tmake_file=arm/t-xscale-elf
        out_file=arm/arm.c
        md_file=arm/arm.md
@@ -3150,6 +3267,15 @@ xscale-*-coff)
        out_file=arm/arm.c
        md_file=arm/arm.md
        ;;
+xstormy16-*-elf)
+       # For historical reasons, the target files omit the 'x'.
+       tm_file="elfos.h svr4.h stormy16/stormy16.h"
+       tm_p_file=stormy16/stormy16-protos.h
+       md_file=stormy16/stormy16.md
+       out_file=stormy16/stormy16.c
+       tmake_file="stormy16/t-stormy16"
+       extra_parts="crtbegin.o crtend.o"
+       ;;
 *)
        echo "Configuration $machine not supported" 1>&2
        exit 1
@@ -3181,7 +3307,14 @@ i586-*-*)
        esac
        ;;
 i686-*-* | i786-*-*)
-       target_cpu_default2=3
+       case $target_alias in
+               athlon-*)
+                       target_cpu_default2=5
+                       ;;
+               *)
+                       target_cpu_default2=3
+                       ;;
+       esac
        ;;
 alpha*-*-*)
        case $machine in
@@ -3201,7 +3334,7 @@ alpha*-*-*)
                        target_cpu_default2="MASK_CPU_EV5"
                        ;;
        esac
-                       
+
        if test x$gas = xyes
        then
                if test "$target_cpu_default2" = ""
@@ -3278,7 +3411,7 @@ powerpc*-*-* | rs6000-*-*)
                  | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
                  | xec603e | x740 | x750 | x401 \
                  | x403 | x505 | x801 | x821 | x823 | x860)
-                       target_cpu_default2="\"$with_cpu\""
+                       target_cpu_default2="\\\"$with_cpu\\\""
                        ;;
 
                xyes | xno)
@@ -3324,15 +3457,6 @@ then
        fi
 fi
 
-# No need for collect2 if we have the GNU linker.
-# Actually, there is now; GNU ld doesn't handle the EH info or
-# collecting for shared libraries.
-#case x$gnu_ld in
-#xyes)
-#      use_collect2=
-#      ;;
-#esac
-
 # Save data on machine being used to compile GCC in build_xm_file.
 # Save data on host machine in vars host_xm_file and host_xmake_file.
 if test x$pass1done = x