arc: Refurbish adc/sbc patterns
[gcc.git] / libgcc / config.host
index 1c8d63be83793fd6d9351a81343bcf2524c799af..66af8343a28663d43a5b67efe7b31811197c9a67 100644 (file)
@@ -1,5 +1,5 @@
 # libgcc host-specific configuration file.
-# Copyright (C) 1997-2019 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -112,9 +112,6 @@ bpf-*-*)
         ;;
 cr16-*-*)
        ;;
-crisv32-*-*)
-       cpu_type=cris
-       ;;
 csky*-*-*)
        cpu_type=csky
        ;;
@@ -396,6 +393,7 @@ 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*)
@@ -438,18 +436,12 @@ arc*-*-linux*)
        extra_parts="$extra_parts crttls.o"
        md_unwind_header=arc/linux-unwind.h
        ;;
-arm-wrs-vxworks|arm-wrs-vxworks7)
-       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"
-       case ${host} in
-       *-*-vxworks7)
-         # Note that arm/t-bpabi will reset the LIB2ADDEH macro.
-         # This is intentional.
-         tmake_file="$tmake_file arm/t-bpabi arm/t-vxworks7"
-         tm_file="$tm_file arm/bpabi-lib.h"
-         unwind_header=config/arm/unwind-arm.h
-         ;;
-       esac
        ;;
 arm*-*-freebsd*)                # ARM FreeBSD EABI
        tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix arm/t-elf"
@@ -520,6 +512,29 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
 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
@@ -560,18 +575,12 @@ 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="$extra_parts crti.o crtn.o"
+       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"
@@ -726,11 +735,17 @@ 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"
        tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
@@ -760,7 +775,7 @@ i[34567]86-*-solaris2* | x86_64-*-solaris2*)
        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-vxworks7|x86_64-wrs-vxworks7)
+i[4567]86-wrs-vxworks*|x86_64-wrs-vxworks*)
        ;;
 i[34567]86-*-cygwin*)
        extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
@@ -1049,9 +1064,10 @@ 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.
@@ -1094,7 +1110,8 @@ 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-*-*)
@@ -1210,6 +1227,23 @@ powerpc*-*-linux*)
        extra_parts="$extra_parts ecrti.o ecrtn.o ncrti.o ncrtn.o"
        md_unwind_header=rs6000/linux-unwind.h
        ;;
+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"
@@ -1257,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"
@@ -1282,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
        ;;
@@ -1537,3 +1571,10 @@ vxworks)
                ;;
        esac
 esac
+
+case ${host} in
+*-*-musl*)
+  # The gthr weak references are unsafe with static linking
+  tmake_file="$tmake_file t-gthr-noweak"
+  ;;
+esac