# 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.
bfin*-*)
cpu_type=bfin
;;
+bpf-*-*)
+ cpu_type=bpf
+ ;;
cr16-*-*)
;;
-crisv32-*-*)
- cpu_type=cris
- ;;
csky*-*-*)
cpu_type=csky
;;
sparc*-*-*)
cpu_type=sparc
;;
-spu*-*-*)
- cpu_type=spu
- ;;
s390*-*-*)
cpu_type=s390
;;
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)
+*-*-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
*-*-vxworks7*)
tmake_file=t-vxworks7
;;
+*-*-vxworksae*)
+ tmake_file=t-vxworksae
+ ;;
*-*-vxworks*)
tmake_file=t-vxworks
;;
;;
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*)
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*-*-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*)
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"
;;
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"
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"
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="$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"
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 i386/t-msabi"
tm_file="$tm_file i386/darwin-lib.h"
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"
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"
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.
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-*-*)
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"
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"
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}"
+ 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}"
+ 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*-*-*)
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"
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
;;
;;
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 \
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