$NetBSD: patch-libgcc_config.host,v 1.1 2018/11/23 19:28:30 abs Exp $ Sync with NetBSD-current as of 2018-11-23 --- libgcc/config.host.orig 2017-11-21 09:41:34.000000000 +0000 +++ libgcc/config.host @@ -164,9 +164,15 @@ nds32*-*) nios2*-*-*) cpu_type=nios2 ;; +or1k-*-* | or1knd-*-*) + cpu_type=or1k + ;; powerpc*-*-*) cpu_type=rs6000 ;; +riscv*-*-*) + cpu_type=riscv + ;; rs6000*-*-*) ;; sparc64*-*-*) @@ -242,7 +248,7 @@ 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" + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip 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. @@ -338,6 +344,11 @@ aarch64*-*-freebsd*) tmake_file="${tmake_file} ${cpu_type}/t-aarch64" tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" ;; +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" + ;; aarch64*-*-linux*) extra_parts="$extra_parts crtfastmath.o" md_unwind_header=aarch64/linux-unwind.h @@ -389,7 +400,16 @@ arm*-*-freebsd*) # ARM Fr tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" ;; 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 tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm" @@ -573,6 +593,9 @@ 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" tm_file="$tm_file i386/darwin-lib.h" @@ -775,6 +798,10 @@ ia64*-*-linux*) fi md_unwind_header=ia64/linux-unwind.h ;; +ia64*-*-netbsd*) + extra_parts="${extra_parts} crtfastmath.o" + tmake_file="${tmake_file} ia64/t-ia64 ia64/t-ia64-elf t-crtfm ia64/t-softfp t-softfp ia64/t-eh-ia64" + ;; ia64*-*-hpux*) tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-hpux t-slibgcc ia64/t-slibgcc-hpux t-slibgcc-hpux" ;; @@ -819,7 +846,10 @@ m32rle-*-linux*) m68k-*-elf* | fido-*-elf) tmake_file="$tmake_file m68k/t-floatlib" ;; -m68k*-*-netbsdelf*) +m5407-*-netbsdelf*) + ;; +m68k*-*-netbsdelf* | m68010-*-netbsdelf*) + tmake_file="$tmake_file m68k/t-floatlib" ;; m68k*-*-openbsd*) ;; @@ -858,6 +888,17 @@ microblaze*-*-rtems*) extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o crti.o crtn.o" ;; mips*-*-netbsd*) # NetBSD/mips, either endian. + if test "${libgcc_cv_mips_hard_float}" = no; then + # Eat soft float stuff added above since the netbsd libc provides it. + xtmake_file= + for t in ${tmake_file}; do + case $t in + *softfp*) ;; + *) xtmake_file="${xtmake_file} $t";; + esac + done + tmake_file="${xtmake_file}" + fi ;; mips*-*-linux*) # Linux MIPS, either endian. extra_parts="$extra_parts crtfastmath.o" @@ -951,6 +992,17 @@ 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" ;; +or1k*-*-linux* | or1k*-*-uclinux*) + tmake_file="$tmake_file or1k/t-or1k or1k/t-linux or1k/t-crtstuff t-softfp-sfdf t-softfp" + md_unwind_header=or1k/linux-unwind.h + ;; +or1k*-*-netbsd*) + tmake_file="$tmake_file or1k/t-or1k" + ;; +or1k*-*-*) + tmake_file="$tmake_file or1k/t-or1k or1k/t-linux or1k/t-crtstuff t-softfp-sfdf t-softfp" + extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crti.o crtn.o" + ;; nds32*-elf*) # Basic makefile fragment and extra_parts for crt stuff. # We also append c-isr library implementation. @@ -1012,8 +1064,8 @@ powerpc*-*-freebsd*) ;; esac ;; -powerpc-*-netbsd*) - tmake_file="$tmake_file rs6000/t-netbsd rs6000/t-crtstuff" +powerpc*-*-netbsd*) + tmake_file="${tmake_file} rs6000/t-netbsd rs6000/t-crtstuff" ;; powerpc-*-eabispe*) tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit" @@ -1100,6 +1152,17 @@ 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" ;; +riscv*-*-linux*) + tmake_file="${tmake_file} riscv/t-fpbit riscv/t-dpbit riscv/t-tpbit riscv/t-linux" + extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o crtendS.o crtbeginT.o" + ;; +riscv*-*-netbsd*) + # nothing needed for NetBSD + ;; +riscv*-*-*) + tmake_file="${tmake_file} riscv/t-fpbit riscv/t-dpbit riscv/t-elf" + 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" @@ -1382,6 +1445,7 @@ i[34567]86-*-darwin* | x86_64-*-darwin* i[34567]86-*-mingw* | x86_64-*-mingw* | \ i[34567]86-*-dragonfly* | x86_64-*-dragonfly* | \ i[34567]86-*-freebsd* | x86_64-*-freebsd* | \ + i[34567]86-*-netbsd* | x86_64-*-netbsd* | \ i[34567]86-*-openbsd* | x86_64-*-openbsd*) tmake_file="${tmake_file} t-softfp-tf" if test "${host_address}" = 32; then