OSDN Git Service

2001-08-08 H.J. Lu <hjl@gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / config.gcc
index f9d4d09..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"
@@ -517,7 +559,7 @@ arm-semi-aout | armel-semi-aout)
        ;;
 arm-semi-aof | armel-semi-aof)
        tm_file=arm/semiaof.h
-       tmake_file=arm/t-semiaof
+       tmake_file=arm/t-semi
        ;;
 arm*-*-netbsd*)
        tm_file=arm/netbsd.h
@@ -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
@@ -866,17 +908,15 @@ i370-*-opened*)                    # IBM 360/370/390 Architecture
        xm_defines='POSIX FATAL_EXIT_CODE=12'
        tm_file=i370/oe.h
        xmake_file=i370/x-oe
-       tmake_file=i370/t-oe
        ;;
 i370-*-mvs*)
        xm_defines='POSIX FATAL_EXIT_CODE=12'
        tm_file=i370/mvs.h
-       tmake_file=i370/t-mvs
        ;;
 i370-*-linux*)
        xmake_file=x-linux
        tm_file="i370/linux.h ${tm_file}"
-       tmake_file="t-linux i370/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"
@@ -889,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
@@ -982,12 +1022,10 @@ i386-sun-sunos*)         # Sun i386 roadrunner
        ;;
 i[34567]86-wrs-vxworks*)
        tm_file=i386/vxi386.h
-       tmake_file=i386/t-i386bare
        thread_file='vxworks'
        ;;
 i[34567]86-*-aout*)
        tm_file=i386/i386-aout.h
-       tmake_file=i386/t-i386bare
        ;;
 i[34567]86-*-beoself* | i[34567]86-*-beos*)
        xm_defines=POSIX
@@ -997,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,22 +1045,18 @@ i[34567]86-*-bsd*)
 #      use_collect2=yes
        ;;
 i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12].* | i[34567]86-*-freebsd*aout*)
-       tm_file="i386/freebsd-aout.h i386/perform.h"
+       tm_file=i386/freebsd-aout.h
        tmake_file=t-freebsd
        ;;
 i[34567]86-*-freebsd*)
-       tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd.h i386/perform.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
@@ -1030,12 +1064,13 @@ 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
        ;;
 i[34567]86-*-coff*)
        tm_file=i386/i386-coff.h
-       tmake_file=i386/t-i386bare
        ;;
 i[34567]86-*-isc*)             # 80386 running ISC system
        xm_defines=POSIX
@@ -1049,7 +1084,6 @@ i[34567]86-*-isc*)                # 80386 running ISC system
                tmake_file=i386/t-crtstuff
                extra_parts="crtbegin.o crtend.o"
        fi
-       tmake_file="$tmake_file i386/t-i386bare"
        install_headers_dir=install-headers-cpio
        ;;
 i[34567]86-*-linux*oldld*)     # Intel 80386's running GNU/Linux
@@ -1072,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
@@ -1085,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
@@ -1103,7 +1137,6 @@ i[34567]86-go32-msdos | i[34567]86-*-go32*)
 i[34567]86-pc-msdosdjgpp*)
        xm_file=i386/xm-djgpp.h
        tm_file=i386/djgpp.h
-       tmake_file=i386/t-djgpp
        xmake_file=i386/x-djgpp
        gnu_ld=yes
        gas=yes
@@ -1127,7 +1160,6 @@ i[34567]86-*-lynxos*)
        else
                tm_file=i386/lynx-ng.h
        fi
-       tmake_file=i386/t-i386bare
        ;;
 i[34567]86-*-mach*)
        tm_file=i386/mach.h
@@ -1157,7 +1189,7 @@ i[34567]86-go32-rtems*)
 i[34567]86-*-rtemscoff*)
        cpu_type=i386
        tm_file=i386/rtems.h
-       tmake_file="i386/t-i386bare t-rtems"
+       tmake_file=t-rtems
        if test x$enable_threads = xyes; then
          thread_file='rtems'
        fi
@@ -1183,7 +1215,6 @@ i[34567]86-*-sco3.2v5*)   # 80386 running SCO Open Server 5
        else
                tmake_file=i386/t-sco5
        fi
-       tmake_file="$tmake_file i386/t-i386bare"
        extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
        ;;
 i[34567]86-*-solaris2*)
@@ -1193,7 +1224,12 @@ i[34567]86-*-solaris2*)
                # Only needed if gas does not support -s
                tm_file="i386/sol2gas.h ${tm_file}"
        fi
-       tmake_file="i386/t-i386bare i386/t-sol2"
+       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
@@ -1217,7 +1253,7 @@ i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
        then
                tm_file="${tm_file} dbx.h"
        fi
-       tmake_file="i386/t-i386bare i386/t-crtpic"
+       tmake_file=i386/t-crtpic
        xmake_file=x-svr4
        extra_parts="crtbegin.o crtend.o"
        if test x$enable_threads = xyes; then
@@ -1231,14 +1267,14 @@ i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
        then
                tm_file="${tm_file} dbx.h"
        fi
-       tmake_file="i386/t-i386bare i386/t-crtpic"
+       tmake_file=i386/t-crtpic
        xmake_file=x-svr4
        extra_parts="crtbegin.o crtend.o"
        ;;
 i[34567]86-*-udk*)      # Intel x86 on SCO UW/OSR5 Dev Kit
        xm_defines=POSIX
        tm_file=i386/udk.h
-       tmake_file="i386/t-i386bare i386/t-crtpic i386/t-udk"
+       tmake_file="i386/t-crtpic i386/t-udk"
        xmake_file=x-svr4
        extra_parts="crtbegin.o crtend.o"
        install_headers_dir=install-headers-cpio
@@ -1280,7 +1316,6 @@ i[34567]86-*-sysv*)               # Intel 80386's running system V
 i386-*-vsta)                   # Intel 80386's running VSTa kernel
        xm_file=i386/xm-vsta.h
        tm_file=i386/vsta.h
-       tmake_file=i386/t-vsta
        ;;
 i[34567]86-*-win32)
        xm_defines=POSIX
@@ -1419,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
@@ -1438,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"
@@ -1454,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'
@@ -1462,7 +1500,7 @@ 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
@@ -1808,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
@@ -1827,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
@@ -1859,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
@@ -1870,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
@@ -1899,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
@@ -2035,7 +2077,6 @@ mips-sni-sysv4)
                tm_file=mips/sni-svr4.h
        fi
        xm_defines=POSIX
-        tmake_file=mips/t-mips-gas
         if test x$gnu_ld != xyes
         then
                 use_collect2=yes
@@ -2056,7 +2097,6 @@ mips-sgi-irix5*)          # SGI System V.4., IRIX 5
        xm_file=mips/xm-iris5.h
        xmake_file=mips/x-iris
        # mips-tfile doesn't work yet
-       tmake_file=mips/t-mips-gas
        # See comment in mips/iris5.h file.
        use_collect2=yes
 #      if test x$enable_threads = xyes; then
@@ -2071,8 +2111,7 @@ mips-sgi-irix4loser*)             # Mostly like a MIPS.
        xm_defines=POSIX
        xmake_file=mips/x-iris
        if test x$gas = xyes
-       then
-               tmake_file=mips/t-mips-gas
+       then    :
        else
                extra_passes="mips-tfile mips-tdump"
        fi
@@ -2092,8 +2131,7 @@ mips-sgi-irix4*)          # Mostly like a MIPS.
        xm_defines=POSIX
        xmake_file=mips/x-iris
        if test x$gas = xyes
-       then
-               tmake_file=mips/t-mips-gas
+       then    :
        else
                extra_passes="mips-tfile mips-tdump"
        fi
@@ -2112,8 +2150,7 @@ mips-sgi-*)                       # Mostly like a MIPS.
        fi
        xm_defines=POSIX
        if test x$gas = xyes
-       then
-               tmake_file=mips/t-mips-gas
+       then    :
        else
                extra_passes="mips-tfile mips-tdump"
        fi
@@ -2124,7 +2161,6 @@ mips-sgi-*)                       # Mostly like a MIPS.
        ;;
 mips-dec-osfrose*)             # Decstation running OSF/1 reference port with OSF/rose.
        tm_file="mips/osfrose.h ${tm_file}"
-       tmake_file=mips/t-osfrose
        extra_objs=halfpic.o
        use_collect2=yes
        ;;
@@ -2134,8 +2170,7 @@ mips-dec-osf*)                    # Decstation running OSF/1 as shipped by DIGITAL
                tm_file="${tm_file} dbx.h"
        fi
        if test x$gas = xyes
-       then
-               tmake_file=mips/t-mips-gas
+       then    :
        else
                tmake_file=mips/t-ultrix
                extra_passes="mips-tfile mips-tdump"
@@ -2148,8 +2183,7 @@ mips-dec-osf*)                    # Decstation running OSF/1 as shipped by DIGITAL
 mips-dec-bsd*)                  # Decstation running 4.4 BSD
       tm_file=mips/dec-bsd.h
       if test x$gas = xyes
-      then
-               tmake_file=mips/t-mips-gas
+      then     :
       else
                tmake_file=mips/t-ultrix
                extra_passes="mips-tfile mips-tdump"
@@ -2166,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
@@ -2191,8 +2225,7 @@ mips-sony-bsd* | mips-sony-newsos*)       # Sony NEWS 3600 or risc/news.
                tm_file="${tm_file} dbx.h"
        fi
        if test x$gas = xyes
-       then
-               tmake_file=mips/t-mips-gas
+       then    :
        else
                extra_passes="mips-tfile mips-tdump"
        fi
@@ -2210,8 +2243,7 @@ mips-sony-sysv*)          # Sony NEWS 3800 with NEWSOS5.0.
        fi
        xm_defines=POSIX
        if test x$gas = xyes
-       then
-               tmake_file=mips/t-mips-gas
+       then    :
        else
                extra_passes="mips-tfile mips-tdump"
        fi
@@ -2228,10 +2260,8 @@ mips-tandem-sysv4*)              # Tandem S2 running NonStop UX
        xm_defines=POSIX
        if test x$gas = xyes
        then
-               tmake_file=mips/t-mips-gas
                extra_parts="crtbegin.o crtend.o"
        else
-               tmake_file=mips/t-mips
                extra_passes="mips-tfile mips-tdump"
        fi
        if test x$gnu_ld != xyes
@@ -2245,8 +2275,7 @@ mips-*-ultrix* | mips-dec-mach3)  # Decstation.
                tm_file="${tm_file} dbx.h"
        fi
        if test x$gas = xyes
-       then
-               tmake_file=mips/t-mips-gas
+       then    :
        else
                tmake_file=mips/t-ultrix
                extra_passes="mips-tfile mips-tdump"
@@ -2367,8 +2396,7 @@ mips-*-riscos[56789]*)            # Default MIPS RISC-OS 5.0.
                tm_file="${tm_file} dbx.h"
        fi
        if test x$gas = xyes
-       then
-               tmake_file=mips/t-mips-gas
+       then    :
        else
                extra_passes="mips-tfile mips-tdump"
        fi
@@ -2444,8 +2472,7 @@ mips-*-*)                         # Default MIPS RISC-OS 4.0.
                tm_file="${tm_file} dbx.h"
        fi
        if test x$gas = xyes
-       then
-               tmake_file=mips/t-mips-gas
+       then    :
        else
                extra_passes="mips-tfile mips-tdump"
        fi
@@ -2539,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
@@ -2557,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
        ;;
@@ -2566,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
@@ -2613,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
@@ -2623,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
@@ -2678,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
@@ -2706,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
@@ -2714,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
        ;;
@@ -2734,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"
@@ -2793,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
@@ -2825,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
@@ -2833,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
@@ -2877,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
@@ -2902,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
@@ -2927,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
@@ -2969,7 +3030,6 @@ sparc-*-solaris2*)
        ;;
 sparc-*-sunos4.0*)
        tm_file=sparc/sunos4.h
-       tmake_file=sparc/t-sunos40
        use_collect2=yes
        ;;
 sparc-*-sunos4*)
@@ -3022,16 +3082,14 @@ sparc86x-*-elf*)
         extra_parts="crtbegin.o crtend.o"
        ;;
 sparc64-*-aout*)
-       tmake_file=sparc/t-sp64
        tm_file=sparc/sp64-aout.h
        ;;
 sparc64-*-elf*)
-       tmake_file=sparc/t-sp64
        tm_file=sparc/sp64-elf.h
        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"
@@ -3091,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
@@ -3107,21 +3165,20 @@ vax-*-netbsd*)
        use_collect2=yes
        ;;
 vax-*-openbsd*)
-       tmake_file="${tmake_file} vax/t-openbsd"
        tm_file="vax/vax.h vax/openbsd1.h openbsd.h ${tm_file}"
        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*)
@@ -3171,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
@@ -3268,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)