OSDN Git Service

2001-08-08 H.J. Lu <hjl@gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / config.gcc
index f9ee01b..087101d 100644 (file)
@@ -254,7 +254,7 @@ case $machine in
        ;;
 esac   
 
-# Common parts for GNU/Linux, GNU/Hurd and OpenBSD systems.
+# Common parts for GNU/Linux, GNU/Hurd, OpenBSD and FreeBSD systems.
 case $machine in
 *-*-linux*)
        xm_defines=POSIX
@@ -274,7 +274,7 @@ case $machine in
        # These details are the same as for Linux.
        xmake_file=x-linux
        # But here we need a little extra magic.
-       tmake_file="t-linux t-gnu"
+       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}"
@@ -286,13 +286,69 @@ case $machine in
        ;;
 *-*-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'
                tmake_file="${tmake_file} t-openbsd-thread"
        fi
        ;;
+*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
+       # This is the place-holder for the generic a.out configuration
+       # of FreeBSD.  No actual configuration resides here since
+       # there was only ever a bare-bones ix86 configuration for
+       # a.out and it exists solely in the machine-specific section.
+       # This place-holder must exist to avoid dropping into
+       # the generic ELF configuration of FreeBSD (i.e. it must be
+       # ordered before that section).
+       ;;
+*-*-freebsd*)
+       # This is the generic ELF configuration of FreeBSD.  Later
+       # machine-specific sections may refine and add to this
+       # configuration.
+       #
+       # Due to tm_file entry ordering issues that vary between cpu
+       # architectures, we only define fbsd_tm_file to allow the
+       # machine-specific section to dictate the final order of all
+       # entries of tm_file with the minor exception that components
+       # of the tm_file set here will always be of the form:
+       #
+       # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd.h
+       #
+       # The machine-specific section should not tamper with this
+       # ordering but may order all other entries of tm_file as it
+       # pleases around the provided core setting.
+       gas=yes
+       gnu_ld=yes
+       extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+       case $machine in
+       *-*-freebsd3 | *-*-freebsd[3].*) fbsd_tm_file="freebsd3.h";;
+       *-*-freebsd4 | *-*-freebsd[4].*) fbsd_tm_file="freebsd4.h";;
+       *-*-freebsd5 | *-*-freebsd[5].*) fbsd_tm_file="freebsd5.h";;
+       *-*-freebsd6 | *-*-freebsd[6].*) fbsd_tm_file="freebsd6.h";;
+       *) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;;
+       esac
+       tmake_file=t-freebsd
+       xm_defines=POSIX
+       case x${enable_threads} in
+       xno) fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h";;
+       x | xyes | xpthreads | xposix)
+               thread_file='posix'
+               tmake_file="${tmake_file} t-freebsd-thread"
+               ;;
+       *) echo 'Unknown thread configuration for FreeBSD'; exit 1;;
+       esac
+       fbsd_tm_file="${fbsd_tm_file} freebsd.h"
+       if test x${thread_file} = xposix; then
+         if test x${enable_libgcj} = xyes; then
+           echo 'FreeBSD does not currently handle --enable-threads (now'
+           echo 'the default to match system compiler) and --enable-libgcj.'
+           echo 'Please explicitly configure with --disable-threads or'
+           echo '--disable-libgcj'
+           exit 1
+         fi
+       fi
+       ;;
 esac
 
 case $machine in
@@ -374,8 +430,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-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'
@@ -384,34 +439,22 @@ 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-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'
        fi
        ;;
 alpha*-*-freebsd*)
-       xm_defines=POSIX
-       tm_file="${tm_file} freebsd.h alpha/elf.h alpha/freebsd.h"
+       tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
        target_cpu_default="MASK_GAS"
-       tmake_file="t-freebsd alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
-       extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
-       gas=yes gnu_ld=yes
-       stabs=yes
-       case x${enable_threads} in
-       xyes | xpthreads | xposix)
-               thread_file='posix'
-               tmake_file="${tmake_file} t-freebsd-thread"
-               ;;
-       esac
+       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
        ;;
 
@@ -432,7 +475,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"
@@ -482,7 +525,6 @@ arm*-*-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"
@@ -527,7 +569,7 @@ arm*-*-netbsd*)
 arm*-*-linux*)                 # ARM GNU/Linux with ELF
        xmake_file=x-linux
        tm_file="arm/linux-elf.h"
-       tmake_file="t-linux arm/t-linux"
+       tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        gnu_ld=yes
        case x${enable_threads} in
@@ -642,7 +684,7 @@ hppa*-*-linux* | parisc*-*-linux*)
        target_cpu_default="MASK_PA_11"
        tm_file="${tm_file} linux.h pa/pa-linux.h \
                 pa/pa32-regs.h pa/pa32-linux.h"
-       tmake_file=pa/t-linux
+       tmake_file="t-slibgcc-elf-ver t-linux pa/t-linux"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        gas=yes gnu_ld=yes
        if test x$enable_threads = xyes; then
@@ -874,7 +916,7 @@ i370-*-mvs*)
 i370-*-linux*)
        xmake_file=x-linux
        tm_file="i370/linux.h ${tm_file}"
-       tmake_file=t-linux
+       tmake_file="t-slibgcc-elf-ver t-linux"
        # broken_install=yes
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        # extra_parts="crtbegin.o crtend.o"
@@ -887,7 +929,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="i386/i386.h i386/att.h elfos.h i386/i386elf.h chorus.h"
        tmake_file=i386/t-i386elf
        xmake_file=x-svr4
        case x${enable_threads} in
@@ -993,7 +1035,7 @@ i[34567]86-*-beoself* | i[34567]86-*-beos*)
        extra_parts='crtbegin.o crtend.o'
        ;;
 i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
-       tm_file=i386/bsd386.h
+       tm_file="i386/386bsd.h i386/bsd386.h"
 #      tmake_file=t-libc-ok
        ;;
 i[34567]86-*-bsd*)
@@ -1007,18 +1049,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="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd.h"
-       extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
-       tmake_file=t-freebsd
-       gas=yes
+       tm_file="${tm_file} i386/att.h svr4.h ${fbsd_tm_file} i386/freebsd.h"
+       ;;
+i[34567]86-*-netbsdelf*)
+       xm_defines=POSIX
+       tm_file="${tm_file} i386/att.h svr4.h i386/netbsd-elf.h"
+       tmake_file=t-netbsd
        gnu_ld=yes
-       stabs=yes
-       case x${enable_threads} in
-       xyes | xpthreads | xposix)
-               thread_file='posix'
-               tmake_file="${tmake_file} t-freebsd-thread"
-               ;;
-       esac
+       float_format=i386
        ;;
 i[34567]86-*-netbsd*)
        tm_file=i386/netbsd.h
@@ -1026,6 +1064,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
        ;;
@@ -1066,7 +1106,7 @@ i[34567]86-*-linux*libc1) # Intel 80386's running GNU/Linux
                                # GNU/Linux C library 5
        xmake_file=x-linux      
        tm_file="i386/i386.h i386/att.h linux.h i386/linux.h"
-       tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
+       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
        float_format=i386
@@ -1079,7 +1119,7 @@ i[34567]86-*-linux*)      # Intel 80386's running GNU/Linux
                        # aka GNU/Linux C library 6
        xmake_file=x-linux
        tm_file="i386/i386.h i386/att.h linux.h i386/linux.h"
-       tmake_file="t-linux i386/t-crtstuff"
+       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
@@ -1185,6 +1225,11 @@ i[34567]86-*-solaris2*)
                tm_file="i386/sol2gas.h ${tm_file}"
        fi
        tmake_file=i386/t-sol2
+       if test x$gnu_ld = xyes; then
+               tmake_file="$tmake_file t-slibgcc-elf-ver"
+       else
+               tmake_file="$tmake_file t-slibgcc-sld"
+       fi
        extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
        xmake_file=x-svr4
        if test x${enable_threads} = x; then
@@ -1409,14 +1454,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
@@ -1428,6 +1471,11 @@ i960-*-*)                        # Default i960 environment.
        c_target_objs="i960-c.o"
        cxx_target_objs="i960-c.o"
        ;;
+ia64*-*-aix*)
+       tm_file="${tm_file} 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
        tmake_file="ia64/t-ia64"
@@ -1444,7 +1492,7 @@ ia64*-*-elf*)
        ;;
 ia64*-*-linux*)
        tm_file=ia64/linux.h
-       tmake_file="t-linux ia64/t-ia64 ia64/t-glibc"
+       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
                thread_file='posix'
@@ -1452,7 +1500,8 @@ ia64*-*-linux*)
        float_format=i386
        ;;
 ia64*-*-hpux*)
-       tm_file="ia64/ia64.h svr4.h ia64/sysv4.h ia64/hpux.h"
+       tm_file="ia64/ia64.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'
@@ -1797,6 +1846,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
@@ -1816,6 +1866,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
@@ -1848,7 +1900,7 @@ m68k-*-linux*libc1)               # Motorola m68k's running GNU/Linux
                                # GNU/Linux C library 5
        xmake_file=x-linux
        tm_file=m68k/linux.h
-       tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
+       tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 m68k/t-linux"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        extra_headers=math-68881.h
        float_format=m68k
@@ -1859,7 +1911,7 @@ m68k-*-linux*)            # Motorola m68k's running GNU/Linux
                                # aka the GNU/Linux C library 6.
        xmake_file=x-linux
        tm_file=m68k/linux.h
-       tmake_file="t-linux m68k/t-linux"
+       tmake_file="t-slibgcc-elf-ver t-linux m68k/t-linux"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        extra_headers=math-68881.h
        float_format=m68k
@@ -1888,6 +1940,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
@@ -2147,11 +2200,11 @@ mipsel-*-netbsd* | mips-dec-netbsd*)    # Decstation running NetBSD
        ;;
 mips*-*-linux*)                                # Linux MIPS, either endian.
        xmake_file=x-linux
+       tm_file="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" ;;
+              mips*el-*)  tm_file="mips/little.h $tm_file" ;;
        esac
-       tmake_file=t-linux
+       tmake_file="t-slibgcc-elf-ver t-linux"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        gnu_ld=yes
        gas=yes
@@ -2513,9 +2566,16 @@ romp-*-openbsd*)
 powerpc-*-openbsd*)
        tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
        ;;
+powerpc64-*-linux*)
+       tm_file="${tm_file} 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
@@ -2531,6 +2591,8 @@ 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
        ;;
@@ -2540,9 +2602,15 @@ powerpc-*-sysv*)
        extra_headers=ppc-asm.h
        tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
        ;;
+powerpc-*-netbsd*)
+       xm_defines=POSIX
+       tm_file="${tm_file} 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} 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
@@ -2587,7 +2655,7 @@ powerpc-*-rtems*)
 powerpc-*-linux*libc1)
        tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/linux.h"
        out_file=rs6000/rs6000.c
-       tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
+       tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
        xmake_file=x-linux
        extra_headers=ppc-asm.h
        if test x$enable_threads = xyes; then
@@ -2597,7 +2665,7 @@ powerpc-*-linux*libc1)
 powerpc-*-linux*)
        tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/linux.h"
        out_file=rs6000/rs6000.c
-       tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
+       tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
        xmake_file=x-linux
        extra_headers=ppc-asm.h
        if test x$enable_threads = xyes; then
@@ -2652,27 +2720,27 @@ powerpcle-*-solaris2*)
        ;;
 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
@@ -2680,7 +2748,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
@@ -2688,13 +2756,13 @@ 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
        ;;
@@ -2708,6 +2776,24 @@ rs6000-*-lynxos*)
        tmake_file=rs6000/t-rs6000
        use_collect2=yes
        ;;
+s390-*-linux*) 
+       xmake_file=x-linux
+       tm_file=s390/linux.h
+       tmake_file="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/linux64.h
+       tmake_file="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"
@@ -2767,14 +2853,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
@@ -2799,7 +2887,7 @@ sparc-*-linux*aout*)              # Sparc's running GNU/Linux, a.out
 sparc-*-linux*libc1*)  # Sparc's running GNU/Linux, libc5
        xmake_file=x-linux
        tm_file=sparc/linux.h
-       tmake_file="t-linux t-linux-gnulibc1"
+       tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        gnu_ld=yes
        float_format=sparc
@@ -2807,7 +2895,7 @@ sparc-*-linux*libc1*)     # Sparc's running GNU/Linux, libc5
 sparc-*-linux*)                # Sparc's running GNU/Linux, libc6
        xmake_file=x-linux
        tm_file=sparc/linux.h
-       tmake_file="t-linux"
+       tmake_file="t-slibgcc-elf-ver t-linux"
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
        gnu_ld=yes
        if test x$enable_threads = xyes; then
@@ -2851,9 +2939,9 @@ sparcv9-*-solaris2*)
        xm_defines=POSIX
        tmake_file="sparc/t-sol2 sparc/t-sol2-64"
        if test x$gnu_ld = xyes; then
-               tmake_file="$tmake_file sparc/t-slibgcc"
+               tmake_file="$tmake_file t-slibgcc-elf-ver"
        else
-               tmake_file="$tmake_file sparc/t-slibgcc-sld"
+               tmake_file="$tmake_file t-slibgcc-sld"
        fi
        extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
        float_format=none
@@ -2876,9 +2964,9 @@ sparc-hal-solaris2*)
         tm_file="sparc/sol2.h sparc/hal.h"
         tmake_file="sparc/t-halos sparc/t-sol2"
        if test x$gnu_ld = xyes; then
-               tmake_file="$tmake_file sparc/t-slibgcc"
+               tmake_file="$tmake_file t-slibgcc-elf-ver"
        else
-               tmake_file="$tmake_file sparc/t-slibgcc-sld"
+               tmake_file="$tmake_file t-slibgcc-sld"
        fi
         extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
         case $machine in
@@ -2901,24 +2989,23 @@ sparc-*-solaris2*)
        xm_defines=POSIX
        tmake_file=sparc/t-sol2
        if test x$gnu_ld = xyes; then
-               tmake_file="$tmake_file sparc/t-slibgcc"
+               tmake_file="$tmake_file t-slibgcc-elf-ver"
        else
-               tmake_file="$tmake_file sparc/t-slibgcc-sld"
+               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
@@ -3002,7 +3089,7 @@ sparc64-*-elf*)
        extra_parts="crtbegin.o crtend.o"
        ;;
 sparc64-*-linux*)              # 64-bit Sparc's running GNU/Linux
-       tmake_file="t-linux sparc/t-linux64"
+       tmake_file="t-slibgcc-elf-ver t-linux sparc/t-linux64"
        tm_file=sparc/linux64.h
        xmake_file=x-linux
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
@@ -3062,11 +3149,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
@@ -3082,16 +3169,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*)
@@ -3141,7 +3228,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
@@ -3238,7 +3332,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)