arc: Refurbish adc/sbc patterns
[gcc.git] / libgcc / config.host
index 3f8d0a84bec7de195232572d00e17f5f52b02af0..66af8343a28663d43a5b67efe7b31811197c9a67 100644 (file)
@@ -1,5 +1,5 @@
 # libgcc host-specific configuration file.
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -91,6 +91,10 @@ alpha*-*-*)
 am33_2.0-*-linux*)
        cpu_type=mn10300
        ;;
+amdgcn*-*-*)
+       cpu_type=gcn
+       tmake_file="${tmake_file} t-softfp-sfdf t-softfp"
+       ;;
 arc*-*-*)
        cpu_type=arc
        ;;
@@ -103,10 +107,13 @@ avr-*-*)
 bfin*-*)
        cpu_type=bfin
        ;;
+bpf-*-*)
+        cpu_type=bpf
+        ;;
 cr16-*-*)
        ;;
-crisv32-*-*)
-       cpu_type=cris
+csky*-*-*)
+       cpu_type=csky
        ;;
 fido-*-*)
        cpu_type=m68k
@@ -136,8 +143,6 @@ m32r*-*-*)
         ;;
 m68k-*-*)
        ;;
-mep*-*-*)
-       ;;
 microblaze*-*-*)
        cpu_type=microblaze
        ;;
@@ -164,20 +169,26 @@ nds32*-*)
 nios2*-*-*)
        cpu_type=nios2
        ;;
+or1k*-*-*)
+       cpu_type=or1k
+       ;;
 powerpc*-*-*)
        cpu_type=rs6000
        ;;
+pru-*-*)
+       cpu_type=pru
+       ;;
 rs6000*-*-*)
        ;;
+riscv*-*-*)
+       cpu_type=riscv
+       ;;
 sparc64*-*-*)
        cpu_type=sparc
        ;;
 sparc*-*-*)
        cpu_type=sparc
        ;;
-spu*-*-*)
-       cpu_type=spu
-       ;;
 s390*-*-*)
        cpu_type=s390
        ;;
@@ -204,7 +215,7 @@ case ${host} in
 *-*-darwin*)
   asm_hidden_op=.private_extern
   tmake_file="$tmake_file t-darwin ${cpu_type}/t-darwin t-libgcc-pic t-slibgcc-darwin"
-  extra_parts="crt3.o crttms.o crttme.o"
+  extra_parts="crt3.o d10-uwfef.o crttms.o crttme.o"
   ;;
 *-*-dragonfly*)
   tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
@@ -230,7 +241,11 @@ case ${host} in
       ;;
   esac
   ;;
-*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
+*-*-fuchsia*)
+  tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-fuchsia"
+  extra_parts="crtbegin.o crtend.o"
+  ;;
+*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu | *-*-uclinuxfdpiceabi)
   tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
   extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
   if test x$enable_vtable_verify = xyes; then
@@ -242,15 +257,10 @@ case ${host} in
   extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
   ;;
 *-*-netbsd*)
-  tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
-  # NetBSD 1.7 and later are set up to use GCC's crtstuff for
-  # ELF configurations.  We will clear extra_parts in the
-  # a.out configurations.
-  case ${host} in
-    *-*-netbsd*1.[7-9]* | *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
-      extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
-      ;;
-  esac
+  tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
+  tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
+  tmake_file="$tmake_file t-slibgcc-libgcc"
+  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
   ;;
 *-*-openbsd*)
   tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
@@ -277,18 +287,18 @@ case ${host} in
   tmake_file="$tmake_file $cpu_type/t-sol2"
   extra_parts="gmon.o crtbegin.o crtend.o"
   if test "${libgcc_cv_solaris_crts}" = yes; then
-    # Solaris 11.x and 12 provide crt1.o, crti.o, and crtn.o as part of the
+    # Solaris 11.4 provides crt1.o, crti.o, and crtn.o as part of the
     # base system.  crtp.o and crtpg.o implement the compiler-dependent parts.
     extra_parts="$extra_parts crtp.o crtpg.o"
     # If the Solaris CRTs are present, both ld and gld will have PIE support.
     extra_parts="$extra_parts crtbeginS.o crtendS.o"
   else
     case ${host} in
-      i?86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*)
+      i?86-*-solaris2* | x86_64-*-solaris2*)
         # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
         # part of the base system.
         ;;
-      sparc*-*-solaris2.1[0-9]*)
+      sparc*-*-solaris2*)
         # Solaris 10+/SPARC lacks crt1.o and gcrt1.o.
         extra_parts="$extra_parts crt1.o gcrt1.o"
         ;;
@@ -305,6 +315,12 @@ case ${host} in
   tmake_file="vms/t-vms"
   extra_parts="crt0.o crtbegin.o crtbeginS.o crtend.o crtendS.o"
   ;;
+*-*-vxworks7*)
+  tmake_file=t-vxworks7
+  ;;
+*-*-vxworksae*)
+  tmake_file=t-vxworksae
+  ;;
 *-*-vxworks*)
   tmake_file=t-vxworks
   ;;
@@ -313,6 +329,16 @@ case ${host} in
   ;;
 esac
 
+# Except on ARM where we do not use DWARF, table based EH on VxWorks
+# relies on specially crafted crtstuff files
+case ${host} in
+arm-*-vxworks*)
+  ;;
+*-*-vxworks*)
+  tmake_file="${tmake_file} t-vxcrtstuff"
+  ;;
+esac
+
 case ${host} in
 *-*-darwin* | *-*-dragonfly* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | \
   *-*-solaris2*)
@@ -321,6 +347,9 @@ case ${host} in
 i[34567]86-*-mingw* | x86_64-*-mingw*)
   enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
   ;;
+i[34567]86-*-cygwin* | x86_64-*-cygwin*)
+  enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
+  ;;
 *)
   enable_execute_stack=enable-execute-stack-empty.c;
   ;;
@@ -329,14 +358,42 @@ esac
 case ${host} in
 aarch64*-*-elf | aarch64*-*-rtems*)
        extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
+       extra_parts="$extra_parts crtfastmath.o"
+       tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+       tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
+       tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+       md_unwind_header=aarch64/aarch64-unwind.h
+       ;;
+aarch64*-*-freebsd*)
+       extra_parts="$extra_parts crtfastmath.o"
+       tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+       tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
+       tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+       md_unwind_header=aarch64/freebsd-unwind.h
+       ;;
+aarch64*-*-netbsd*)
        extra_parts="$extra_parts crtfastmath.o"
        tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
        tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+       md_unwind_header=aarch64/aarch64-unwind.h
+       ;;
+aarch64*-*-fuchsia*)
+       tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+       tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
+       tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp"
        ;;
 aarch64*-*-linux*)
        extra_parts="$extra_parts crtfastmath.o"
        md_unwind_header=aarch64/linux-unwind.h
        tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+       tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
+       tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+       ;;
+aarch64*-*-vxworks7*)
+       extra_parts="$extra_parts crtfastmath.o"
+       md_unwind_header=aarch64/aarch64-unwind.h
+       tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+       tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
        tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
        ;;
 alpha*-*-linux*)
@@ -364,31 +421,54 @@ alpha*-dec-*vms*)
        extra_parts="$extra_parts vms-dwarf2.o vms-dwarf2eh.o"
        md_unwind_header=alpha/vms-unwind.h
        ;;
+amdgcn*-*-amdhsa)
+       tmake_file="$tmake_file gcn/t-amdgcn"
+       extra_parts="crt0.o"
+       ;;
 arc*-*-elf*)
-       tmake_file="arc/t-arc-newlib arc/t-arc"
-       extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o libgmon.a crtg.o crtgend.o"
-       extra_parts="${extra_parts} crttls.o"
+       tmake_file="arc/t-arc"
+       extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o"
+       extra_parts="$extra_parts crttls.o"
        ;;
-arc*-*-linux-uclibc*)
-       tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc700-uClibc arc/t-arc"
-       extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o libgmon.a crtg.o crtgend.o"
-       extra_parts="${extra_parts} crttls.o"
+arc*-*-linux*)
+       tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc-uClibc arc/t-arc"
+       extra_parts="$extra_parts crti.o crtn.o"
+       extra_parts="$extra_parts crttls.o"
+       md_unwind_header=arc/linux-unwind.h
        ;;
-arm-wrs-vxworks)
-       tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
+arm-wrs-vxworks7*)
+       tmake_file="$tmake_file arm/t-arm arm/t-elf arm/t-bpabi arm/t-vxworks7"
+        tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
+       tm_file="$tm_file arm/bpabi-lib.h"
+       unwind_header=config/arm/unwind-arm.h
        extra_parts="$extra_parts crti.o crtn.o"
        ;;
 arm*-*-freebsd*)                # ARM FreeBSD EABI
        tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix arm/t-elf"
-       tmake_file="${tmake_file} arm/t-bpabi arm/t-freebsd t-slibgcc-libgcc"
+       tmake_file="${tmake_file} arm/t-bpabi arm/t-freebsd"
        tm_file="${tm_file} arm/bpabi-lib.h"
        unwind_header=config/arm/unwind-arm.h
        tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
        ;;
+arm*-*-fuchsia*)
+       tmake_file="${tmake_file} arm/t-arm arm/t-elf arm/t-bpabi"
+       tmake_file="${tmake_file} arm/tsoftfp t-softfp"
+       tm_file="${tm_file} arm/bpabi-lib.h"
+       unwind_header=config/arm/unwind-arm.h
+       ;;
 arm*-*-netbsdelf*)
-       tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover"
+       tmake_file="$tmake_file arm/t-arm"
+       case ${host} in
+         arm*-*-netbsdelf-*eabi*)
+           tmake_file="${tmake_file} arm/t-netbsd-eabi"
+           unwind_header=config/arm/unwind-arm.h
+           ;;
+         *)
+           tmake_file="${tmake_file} arm/t-netbsd t-slibgcc-gld-nover"
+           ;;
+       esac
        ;;
-arm*-*-linux*)                 # ARM GNU/Linux with ELF
+arm*-*-linux* | arm*-*-uclinuxfdpiceabi)
        tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm"
        tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
        tm_file="$tm_file arm/bpabi-lib.h"
@@ -404,6 +484,13 @@ arm*-*-uclinux*)           # ARM ucLinux
        unwind_header=config/arm/unwind-arm.h
        extra_parts="$extra_parts crti.o crtn.o"
        ;;
+arm*-*-phoenix*)
+       tmake_file="t-hardfp t-softfp arm/t-arm arm/t-elf arm/t-softfp arm/t-phoenix"
+       tmake_file="${tmake_file} arm/t-bpabi"
+       tm_file="$tm_file arm/bpabi-lib.h"
+       extra_parts="crtbegin.o crtend.o crti.o crtn.o"
+       unwind_header=config/arm/unwind-arm.h
+       ;;
 arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
        tmake_file="${tmake_file} arm/t-arm arm/t-elf t-fixedpoint-gnu-prefix"
        tm_file="$tm_file arm/bpabi-lib.h"
@@ -422,19 +509,39 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
        extra_parts="$extra_parts crtfastmath.o"
        unwind_header=config/arm/unwind-arm.h
        ;;
-avr-*-rtems*)
-       tmake_file="$tmake_file avr/t-avr avr/t-rtems t-fpbit"
-       tm_file="$tm_file avr/avr-lib.h"
-       # Don't use default.
-       extra_parts=
-       ;;
 avr-*-*)
        # Make HImode functions for AVR
        tmake_file="${cpu_type}/t-avr t-fpbit"
+       # Make some DFmode functions from libf7, part of avr-libgcc.
+       # This must be prior to adding t-avrlibc.
+       case "y${with_libf7}" in
+           yno)
+               # No libf7 support.
+               ;;
+           ylibgcc)
+               tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7"
+               ;;
+           ymath)
+               tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7-math"
+               tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7"
+               ;;
+           ymath-symbols | yyes | y)
+               tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7-math-symbols"
+               tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7-math"
+               tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7"
+               ;;
+           *)
+               echo "Error: --with-libf7=${with_libf7} but can only be used with: 'libgcc', 'math', 'math-symbols', 'yes', 'no'" 1>&2
+               exit 1
+               ;;
+       esac
        if test x${with_avrlibc} != xno; then
            tmake_file="$tmake_file ${cpu_type}/t-avrlibc"
        fi
        tm_file="$tm_file avr/avr-lib.h"
+       if test x${with_fixed_point} = xno; then
+           fixed_point=no
+       fi
        ;;
 bfin*-elf*)
        tmake_file="bfin/t-bfin bfin/t-crtlibid bfin/t-crtstuff t-libgcc-pic t-fdpbit"
@@ -460,21 +567,28 @@ bfin*-*)
        tmake_file="$tmake_file bfin/t-bfin t-fdpbit"
        extra_parts="crtbegin.o crtend.o crti.o crtn.o"
         ;;
+bpf-*-*)
+        tmake_file="$tmake_file ${cpu_type}/t-${cpu_type}"
+        extra_parts="crti.o crtn.o"
+       ;;
 cr16-*-elf)
        tmake_file="${tmake_file} cr16/t-cr16 cr16/t-crtlibid t-fdpbit"
        extra_parts="$extra_parts crti.o crtn.o crtlibid.o"
         ;;
-crisv32-*-elf)
-       tmake_file="$tmake_file cris/t-cris t-softfp-sfdf t-softfp"
-       ;;
 cris-*-elf)
        tmake_file="$tmake_file cris/t-cris t-softfp-sfdf t-softfp cris/t-elfmulti"
        ;;
-cris-*-linux* | crisv32-*-linux*)
-       tmake_file="$tmake_file cris/t-cris t-softfp-sfdf t-softfp cris/t-linux"
+csky-*-elf*)
+       tmake_file="csky/t-csky t-fdpbit"
+       extra_parts="crtbegin.o crtend.o crti.o crtn.o"
+       ;;
+csky-*-linux*)
+       tmake_file="$tmake_file csky/t-csky t-slibgcc-libgcc t-fdpbit csky/t-linux-csky"
+       extra_parts="$extra_parts crti.o crtn.o"
+       md_unwind_header=csky/linux-unwind.h
        ;;
-epiphany-*-elf*)
-       tmake_file="epiphany/t-epiphany t-fdpbit epiphany/t-custom-eqsf"
+epiphany-*-elf* | epiphany-*-rtems*)
+       tmake_file="$tmake_file epiphany/t-epiphany t-fdpbit epiphany/t-custom-eqsf"
        extra_parts="$extra_parts crti.o crtint.o crtrunc.o crtm1reg-r43.o crtm1reg-r63.o crtn.o"
        ;;
 fr30-*-elf)
@@ -539,6 +653,7 @@ hppa*64*-*-hpux11*)
            tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
        fi
        tmake_file="$tmake_file pa/t-slibgcc-hpux t-slibgcc-hpux"
+       tm_file="$tm_file pa/pa64-hpux-lib.h"
        extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \
                     libgcc_stub.a"
        md_unwind_header=pa/hpux-unwind.h
@@ -558,13 +673,16 @@ hppa[12]*-*-hpux11*)
 hppa*-*-openbsd*)
        tmake_file="$tmake_file pa/t-openbsd"
        ;;
+hppa*-*-netbsd*)
+       tmake_file="$tmake_file pa/t-netbsd"
+       ;;
 i[34567]86-*-darwin*)
-       tmake_file="$tmake_file i386/t-crtpc t-crtfm"
+       tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
        tm_file="$tm_file i386/darwin-lib.h"
        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
        ;;
 x86_64-*-darwin*)
-       tmake_file="$tmake_file i386/t-crtpc t-crtfm"
+       tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
        tm_file="$tm_file i386/darwin-lib.h"
        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
        ;;
@@ -576,6 +694,14 @@ i[34567]86-*-elf*)
        ;;
 x86_64-*-elf* | x86_64-*-rtems*)
        tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
+       case ${host} in
+         x86_64-*-rtems*)
+           extra_parts="$extra_parts crti.o crtn.o"
+           ;;
+       esac
+       ;;
+x86_64-*-fuchsia*)
+       tmake_file="$tmake_file t-libgcc-pic"
        ;;
 i[34567]86-*-dragonfly*)
        tmake_file="${tmake_file} i386/t-dragonfly i386/t-crtstuff"
@@ -594,6 +720,7 @@ x86_64-*-freebsd*)
        md_unwind_header=i386/freebsd-unwind.h
        ;;
 i[34567]86-*-netbsdelf*)
+       tmake_file="${tmake_file} i386/t-crtstuff"
        ;;
 x86_64-*-netbsd*)
        tmake_file="${tmake_file} i386/t-crtstuff"
@@ -608,10 +735,16 @@ i[34567]86-*-linux*)
        tm_file="${tm_file} i386/elf-lib.h"
        md_unwind_header=i386/linux-unwind.h
        ;;
-i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
+i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-kopensolaris*-gnu)
+       extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
+       tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
+       tm_file="${tm_file} i386/elf-lib.h"
+       ;;
+i[34567]86-*-gnu*)
        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
        tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
        tm_file="${tm_file} i386/elf-lib.h"
+       md_unwind_header=i386/gnu-unwind.h
        ;;
 x86_64-*-linux*)
        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
@@ -633,16 +766,16 @@ i[34567]86-*-nto-qnx*)
        extra_parts=crtbegin.o
        ;;
 i[34567]86-*-rtems*)
-       tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdf t-softfp"
+       tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdftf i386/32/t-softfp i386/t-softfp t-softfp"
        extra_parts="$extra_parts crti.o crtn.o"
        ;;
-i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
-       tmake_file="$tmake_file i386/t-crtpc t-crtfm"
+i[34567]86-*-solaris2* | x86_64-*-solaris2*)
+       tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
        tm_file="${tm_file} i386/elf-lib.h"
        md_unwind_header=i386/sol2-unwind.h
        ;;
-i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
+i[4567]86-wrs-vxworks*|x86_64-wrs-vxworks*)
        ;;
 i[34567]86-*-cygwin*)
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
@@ -747,11 +880,11 @@ x86_64-*-mingw*)
        ;;
 ia64*-*-elf*)
        extra_parts="$extra_parts crtbeginS.o crtendS.o crtfastmath.o"
-       tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm"
+       tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm t-softfp-tf ia64/t-softfp t-softfp ia64/t-softfp-compat"
        ;;
 ia64*-*-freebsd*)
        extra_parts="$extra_parts crtfastmath.o"
-       tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm"
+       tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm t-softfp-tf ia64/t-softfp t-softfp ia64/t-softfp-compat"
        ;;
 ia64*-*-linux*)
        # Don't use crtbeginT.o from *-*-linux* default.
@@ -766,7 +899,7 @@ ia64*-*-hpux*)
        tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-hpux t-slibgcc ia64/t-slibgcc-hpux t-slibgcc-hpux"
        ;;
 ia64-hp-*vms*)
-       tmake_file="$tmake_file ia64/t-ia64 ia64/t-eh-ia64 ia64/t-vms t-slibgcc-vms"
+       tmake_file="$tmake_file ia64/t-ia64 ia64/t-eh-ia64 ia64/t-vms t-slibgcc-vms t-softfp-tf ia64/t-softfp t-softfp"
        extra_parts="$extra_parts crtinitS.o"
        md_unwind_header=ia64/vms-unwind.h
        ;;
@@ -788,7 +921,8 @@ lm32-*-uclinux*)
         tmake_file="lm32/t-lm32 lm32/t-uclinux t-libgcc-pic t-softfp-sfdf t-softfp"
        ;;      
 m32r-*-elf*)
-       tmake_file=t-fdpbit
+       tmake_file="$tmake_file m32r/t-m32r t-fdpbit"
+       extra_parts="$extra_parts crtinit.o crtfini.o"
        ;;
 m32rle-*-elf*)
        tmake_file=t-fdpbit
@@ -930,9 +1064,27 @@ moxie-*-elf | moxie-*-moxiebox* | moxie-*-uclinux* | moxie-*-rtems*)
        tmake_file="$tmake_file moxie/t-moxie t-softfp-sfdf t-softfp-excl t-softfp"
        extra_parts="$extra_parts crti.o crtn.o crtbegin.o crtend.o"
        ;;
-msp430*-*-elf)
+msp430-*-elf*)
        tmake_file="$tm_file t-crtstuff t-fdpbit msp430/t-msp430"
-        extra_parts="$extra_parts libmul_none.a libmul_16.a libmul_32.a libmul_f5.a"
+       extra_parts="crtbegin.o crtend.o crtbegin_no_eh.o crtend_no_eh.o"
+       extra_parts="$extra_parts libmul_none.a libmul_16.a libmul_32.a libmul_f5.a"
+       ;;
+nds32*-linux*)
+       # Basic makefile fragment and extra_parts for crt stuff.
+       # We also append c-isr library implementation.
+       tmake_file="${tmake_file} t-slibgcc-libgcc"
+       tmake_file="${tmake_file} nds32/t-nds32-glibc nds32/t-crtstuff t-softfp-sfdf t-softfp"
+       # The header file of defining MD_FALLBACK_FRAME_STATE_FOR.
+       md_unwind_header=nds32/linux-unwind.h
+       # Append library definition makefile fragment according to --with-nds32-lib=X setting.
+       case "${with_nds32_lib}" in
+       "" | glibc | uclibc )
+               ;;
+       *)
+               echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: glibc uclibc" 1>&2
+               exit 1
+               ;;
+       esac
        ;;
 nds32*-elf*)
        # Basic makefile fragment and extra_parts for crt stuff.
@@ -958,13 +1110,23 @@ nds32*-elf*)
        esac
        ;;
 nios2-*-linux*)
-       tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-slibgcc-libgcc"
+       tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-eh-dw2-dip t-slibgcc-libgcc"
+       tm_file="$tm_file nios2/elf-lib.h"
        md_unwind_header=nios2/linux-unwind.h
        ;;
 nios2-*-*)
        tmake_file="$tmake_file nios2/t-nios2 t-softfp-sfdf t-softfp-excl t-softfp"
        extra_parts="$extra_parts crti.o crtn.o"
        ;;
+or1k-*-linux*)
+       tmake_file="$tmake_file or1k/t-or1k"
+       tmake_file="$tmake_file t-softfp-sfdf t-softfp"
+       md_unwind_header=or1k/linux-unwind.h
+       ;;
+or1k-*-*)
+       tmake_file="$tmake_file or1k/t-or1k"
+       tmake_file="$tmake_file t-softfp-sfdf t-softfp"
+       ;;
 pdp11-*-*)
        tmake_file="pdp11/t-pdp11 t-fdpbit"
        ;;
@@ -978,12 +1140,12 @@ powerpc-*-darwin*)
          md_unwind_header=rs6000/darwin-unwind.h
          ;;
        esac
-       tmake_file="$tmake_file rs6000/t-ibm-ldouble"
-       extra_parts="$extra_parts crt2.o"
+       tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble"
+       extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
        ;;
 powerpc64-*-darwin*)
        tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble"
-       extra_parts="$extra_parts crt2.o"
+       extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
        ;;
 powerpc*-*-freebsd*)
        tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-freebsd t-softfp-sfdf t-softfp-excl t-softfp"
@@ -1065,8 +1227,26 @@ powerpc*-*-linux*)
        extra_parts="$extra_parts ecrti.o ecrtn.o ncrti.o ncrtn.o"
        md_unwind_header=rs6000/linux-unwind.h
        ;;
-powerpc-wrs-vxworks|powerpc-wrs-vxworksae|powerpc-wrs-vxworksmils)
+powerpc*-wrs-vxworks7*)
+        tmake_file="$tmake_file rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-linux t-dfprules config/rs6000/t-ppc64-fp t-slibgcc-libgcc"
+        case $ppc_fp_type in
+        64)
+                ;;
+        hard)
+                tmake_file="${tmake_file} t-hardfp-sfdf"
+                ;;
+        soft)
+                tmake_file="${tmake_file} t-softfp-sfdf t-softfp"
+                ;;
+        *)
+                echo "Unknown ppc_fp_type $ppc_fp_type" 1>&2
+                exit 1
+                ;;
+        esac
+        ;;
+powerpc-wrs-vxworks*)
        tmake_file="$tmake_file rs6000/t-ppccomm rs6000/t-savresfgpr t-fdpbit"
+       extra_parts="$extra_parts crtbegin.o crtend.o"
        ;;
 powerpc-*-lynxos*)
        tmake_file="$tmake_file rs6000/t-lynx t-fdpbit"
@@ -1083,6 +1263,23 @@ powerpcle-*-eabi*)
        tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
        extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
        ;;
+pru-*-*)
+       tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl t-softfp t-gnu-prefix pru/t-pru"
+       tm_file="$tm_file pru/pru-abi.h"
+       ;;
+riscv*-*-linux*)
+       tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address} t-slibgcc-libgcc"
+       extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o crtendS.o crtbeginT.o"
+       md_unwind_header=riscv/linux-unwind.h
+       ;;
+riscv*-*-freebsd*)
+       tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address} t-slibgcc-libgcc"
+       extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o crtendS.o crtbeginT.o"
+       ;;
+riscv*-*-*)
+       tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address}"
+       extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
+       ;;
 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
        md_unwind_header=rs6000/aix-unwind.h
        tmake_file="t-fdpbit rs6000/t-ppc64-fp rs6000/t-slibgcc-aix rs6000/t-ibm-ldouble"
@@ -1094,7 +1291,7 @@ rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
        md_unwind_header=rs6000/aix-unwind.h
        tmake_file="t-fdpbit rs6000/t-ppc64-fp rs6000/t-slibgcc-aix rs6000/t-ibm-ldouble rs6000/t-aix-cxa"
-       extra_parts="crtcxa.o crtcxa_s.o crtdbase.o"
+       extra_parts="crtcxa.o crtcxa_s.o crtdbase.o crtcxa_64.o crtcxa_64_s.o crtdbase_64.o"
        ;;
 rl78-*-elf)
        tmake_file="$tm_file t-fdpbit rl78/t-rl78"
@@ -1103,6 +1300,10 @@ rx-*-elf)
        tmake_file="rx/t-rx t-fdpbit"
        tm_file="$tm_file rx/rx-abi.h rx/rx-lib.h"
        ;;
+rx-*-linux*)
+       tmake_file="rx/t-rx t-fdpbit"
+       tm_file="$tm_file rx/rx-lib.h"
+       ;;
 s390-*-linux*)
        tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/32/t-floattodi t-stack s390/t-stack-s390"
        md_unwind_header=s390/linux-unwind.h
@@ -1115,7 +1316,7 @@ s390x-*-linux*)
        md_unwind_header=s390/linux-unwind.h
        ;;
 s390x-ibm-tpf*)
-       tmake_file="${tmake_file} s390/t-crtstuff t-libgcc-pic t-eh-dw2-dip"
+       tmake_file="${tmake_file} s390/t-crtstuff t-libgcc-pic t-eh-dw2-dip s390/t-tpf"
        extra_parts="crtbeginS.o crtendS.o"
        md_unwind_header=s390/tpf-unwind.h
        ;;
@@ -1232,13 +1433,6 @@ sparc64-*-linux*)                # 64-bit SPARC's running GNU/Linux
        ;;
 sparc64-*-netbsd*)
        ;;
-spu-*-elf*)
-       tmake_file="$tmake_file spu/t-elf t-libgcc-pic t-fdpbit"
-       extra_parts="$extra_parts \
-               libgcc_cachemgr.a libgcc_cachemgr_nonatomic.a \
-               libgcc_cache8k.a libgcc_cache16k.a libgcc_cache32k.a \
-               libgcc_cache64k.a libgcc_cache128k.a"
-       ;;
 tic6x-*-uclinux)
        tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl t-softfp \
                c6x/t-elf  c6x/t-uclinux t-crtstuff-pic t-libgcc-pic \
@@ -1261,7 +1455,7 @@ tilegx*-*-linux*)
        md_unwind_header=tilepro/linux-unwind.h
         ;;
 tilepro*-*-linux*)
-       tmake_file="${tmake_file} tilepro/t-crtstuff t-softfp-sfdf t-softfp tilepro/t-tilepro"
+       tmake_file="${tmake_file} tilepro/t-crtstuff t-softfp-sfdf t-softfp tilepro/t-tilepro t-slibgcc-libgcc"
        md_unwind_header=tilepro/linux-unwind.h
         ;;
 v850*-*-*)
@@ -1302,10 +1496,6 @@ am33_2.0-*-linux*)
 m32c-*-elf*|m32c-*-rtems*)
        tmake_file="$tmake_file m32c/t-m32c"
        ;;
-mep*-*-*)
-       tmake_file="mep/t-mep t-fdpbit"
-       extra_parts="crtbegin.o crtend.o"
-       ;;
 nvptx-*)
        tmake_file="$tmake_file nvptx/t-nvptx"
        extra_parts="crt0.o"
@@ -1318,7 +1508,14 @@ esac
 
 case ${host} in
 i[34567]86-*-* | x86_64-*-*)
-       tmake_file="${tmake_file} i386/t-cpuinfo"
+       case ${host} in
+       *-musl*)
+               tmake_file="${tmake_file} i386/t-cpuinfo-static"
+               ;;
+       *)
+               tmake_file="${tmake_file} i386/t-cpuinfo"
+               ;;
+       esac
        ;;
 esac
 
@@ -1326,7 +1523,7 @@ case ${host} in
 i[34567]86-*-linux* | x86_64-*-linux* | \
   i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
   i[34567]86-*-gnu*)
-       tmake_file="${tmake_file} t-tls i386/t-linux t-slibgcc-libgcc"
+       tmake_file="${tmake_file} t-tls i386/t-linux i386/t-msabi t-slibgcc-libgcc"
        if test "$libgcc_cv_cfi" = "yes"; then
                tmake_file="${tmake_file} t-stack i386/t-stack-i386"
        fi
@@ -1334,17 +1531,10 @@ i[34567]86-*-linux* | x86_64-*-linux* | \
 esac
 
 case ${host} in
-i[34567]86-*-darwin* | x86_64-*-darwin* | \
-  i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
-  i[34567]86-*-linux* | x86_64-*-linux* | \
-  i[34567]86-*-msdosdjgpp* | \
-  i[34567]86-*-gnu* | \
-  i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \
-  i[34567]86-*-cygwin* | x86_64-*-cygwin* | \
-  i[34567]86-*-mingw* | x86_64-*-mingw* | \
-  i[34567]86-*-dragonfly* | x86_64-*-dragonfly* | \
-  i[34567]86-*-freebsd* | x86_64-*-freebsd* | \
-  i[34567]86-*-openbsd* | x86_64-*-openbsd*)
+i[34567]86-*-elfiamcu | i[34567]86-*-rtems*)
+       # These use soft-fp for SFmode and DFmode, not just TFmode.
+       ;;
+i[34567]86-*-* | x86_64-*-*)
        tmake_file="${tmake_file} t-softfp-tf"
        if test "${host_address}" = 32; then
                tmake_file="${tmake_file} i386/${host_address}/t-softfp"
@@ -1361,4 +1551,30 @@ i[34567]86-*-linux* | x86_64-*-linux*)
        fi
        tm_file="${tm_file} i386/value-unwind.h"
        ;;
+aarch64*-*-*)
+       # ILP32 needs an extra header for unwinding
+       tm_file="${tm_file} aarch64/value-unwind.h"
+       ;;
+esac
+
+# The vxworks threads implementation relies on a few extra sources,
+# which we arrange to add after everything else:
+
+case ${target_thread_file} in
+vxworks)
+       case ${host} in
+       *-*-vxworksae)
+               tmake_file="${tmake_file} t-gthr-vxworksae"
+               ;;
+       *-*-vxworks*)
+               tmake_file="${tmake_file} t-gthr-vxworks"
+               ;;
+       esac
+esac
+
+case ${host} in
+*-*-musl*)
+  # The gthr weak references are unsafe with static linking
+  tmake_file="$tmake_file t-gthr-noweak"
+  ;;
 esac