$NetBSD: patch-gcc_config.gcc,v 1.5 2019/01/20 09:19:44 he Exp $ Adjust for target includes and crt make. --- gcc/config.gcc.orig 2017-11-21 10:41:34.000000000 +0100 +++ gcc/config.gcc 2019-01-12 11:23:37.360661984 +0100 @@ -769,10 +769,16 @@ target_has_targetcm=yes ;; *-*-netbsd*) - tmake_file="t-slibgcc" + use_gcc_stdint=wrap + tmake_file="t-slibgcc t-netbsd" gas=yes gnu_ld=yes + # cabs/cabsf are renamed to __c99_cabs/cabsf + tm_p_file="${tm_p_file} netbsd-protos.h" + target_gtfiles="${target_gtfiles} \$(srcdir)/config/netbsd.c" + extra_objs="${extra_objs} netbsd.o" + # NetBSD 2.0 and later get POSIX threads enabled by default. # Allow them to be explicitly enabled on any other version. case ${enable_threads} in @@ -989,7 +995,7 @@ extra_options="${extra_options} alpha/elf.opt" ;; alpha*-*-netbsd*) - tm_file="elfos.h ${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h" + tm_file="elfos.h ${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h netbsd-stdint.h" extra_options="${extra_options} netbsd.opt netbsd-elf.opt \ alpha/elf.opt" ;; @@ -1465,12 +1471,14 @@ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h" ;; i[34567]86-*-netbsdelf*) - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h" + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h netbsd-stdint.h" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" + tmake_file="${tmake_file} i386/t-crtstuff" ;; x86_64-*-netbsd*) - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h" + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h netbsd-stdint.h" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" + tmake_file="${tmake_file} i386/t-crtstuff" ;; i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123]) tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h" @@ -2358,7 +2366,7 @@ esac ;; powerpc-*-netbsd*) - tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h" + tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h netbsd-stdint.h" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" tmake_file="${tmake_file} rs6000/t-netbsd" extra_options="${extra_options} rs6000/sysv4.opt"