Module Name: src Committed By: christos Date: Sun Apr 25 23:12:54 UTC 2021
Modified Files: src/external/gpl3/gcc/dist: config.sub src/external/gpl3/gcc/dist/gcc: config.gcc src/external/gpl3/gcc/dist/gcc/config/mips: netbsd64.h t-netbsd64 src/external/gpl3/gcc/dist/libgcc: config.host src/external/gpl3/gcc/lib/crtstuff: Makefile src/external/gpl3/gcc/lib/libgcc: Makefile.inc src/external/gpl3/gcc/lib/libgcc/libgcc_s: Makefile src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/mipso32: Makefile src/external/gpl3/gcc/lib/libtsan: Makefile Log Message: Add support for mipsn64 targets which build 64 bit binaries by default on instead of n32 To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/dist/config.sub cvs rdiff -u -r1.68 -r1.69 src/external/gpl3/gcc/dist/gcc/config.gcc cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64 cvs rdiff -u -r1.30 -r1.31 src/external/gpl3/gcc/dist/libgcc/config.host cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/lib/crtstuff/Makefile cvs rdiff -u -r1.50 -r1.51 src/external/gpl3/gcc/lib/libgcc/Makefile.inc cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/mipso32/Makefile cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/lib/libtsan/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/gcc/dist/config.sub diff -u src/external/gpl3/gcc/dist/config.sub:1.16 src/external/gpl3/gcc/dist/config.sub:1.17 --- src/external/gpl3/gcc/dist/config.sub:1.16 Sat Apr 10 20:02:10 2021 +++ src/external/gpl3/gcc/dist/config.sub Sun Apr 25 19:12:53 2021 @@ -1191,6 +1191,7 @@ case $cpu-$vendor in | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64eb | mips64el \ + | mipsn64 | mipsn64eb | mipsn64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ Index: src/external/gpl3/gcc/dist/gcc/config.gcc diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.68 src/external/gpl3/gcc/dist/gcc/config.gcc:1.69 --- src/external/gpl3/gcc/dist/gcc/config.gcc:1.68 Mon Apr 12 05:03:39 2021 +++ src/external/gpl3/gcc/dist/gcc/config.gcc Sun Apr 25 19:12:53 2021 @@ -2570,6 +2570,13 @@ riscv*-*-netbsd*) # NetBSD RISC-V gas=yes gcc_cv_initfini_array=yes ;; +mipsn64*-*-netbsd*) # NetBSD/mips64, either endian. + target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_SOFT_FLOAT_ABI" + tm_file="elfos.h ${tm_file} mips/elf.h ${nbsd_tm_file} mips/netbsd.h mips/netbsd64.h" + tmake_file="${tmake_file} mips/t-netbsd64" + tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" + ;; mips64*-*-netbsd*) # NetBSD/mips64, either endian. target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_SOFT_FLOAT_ABI" tm_file="elfos.h ${tm_file} mips/elf.h ${nbsd_tm_file} mips/netbsd.h mips/netbsd64.h" Index: src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h diff -u src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.5 src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.6 --- src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.5 Sun Mar 28 21:33:12 2021 +++ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h Sun Apr 25 19:12:54 2021 @@ -22,11 +22,19 @@ Boston, MA 02110-1301, USA. */ /* Force the default endianness and ABI flags onto the command line in order to make the other specs easier to write. */ +#if MIPS_ABI_DEFAULT == ABI_N32 +# define MIPS64_ABI "%{!mabi=*: -mabi=n32}" +# elif MIPS_ABI_DEFAULT == ABI_64 +# define MIPS64_ABI "%{!mabi=*: -mabi=64}" +#else +# error "Missing MIPS_ABI_DEFAULT " # MIPS_ABI_DEFAULT +#endif + #undef DRIVER_SELF_SPECS #define DRIVER_SELF_SPECS \ BASE_DRIVER_SELF_SPECS \ "%{!EB:%{!EL:%(endian_spec)}}", \ - "%{!mabi=*: -mabi=n32}" + MIPS64_ABI /* Define default target values. */ Index: src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64 diff -u src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64:1.1 src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64:1.2 --- src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64:1.1 Wed Jun 29 00:59:10 2011 +++ src/external/gpl3/gcc/dist/gcc/config/mips/t-netbsd64 Sun Apr 25 19:12:54 2021 @@ -1,9 +1,17 @@ # NetBSD has (will have) "non-native" libraries in /usr/lib/<arch>. -# For NetBSD/mips64 we thus have /usr/lib (n32), /usr/lib/o32 and /usr/lib/64. MULTILIB_OPTIONS = mabi=n32/mabi=64/mabi=32 MULTILIB_DIRNAMES = n32 n64 o32 + +# For NetBSD/mips64 we thus have /usr/lib (n32), /usr/lib/o32 and /usr/lib/64. +ifneq ($(filter MIPS_ABI_DEFAULT=ABI_N32,$(tm_defines)),) MULTILIB_OSDIRNAMES = . ../lib/64 ../lib/o32 +endif + +# For NetBSD/mipsn64 we thus have /usr/lib (64), /usr/lib/o32 and /usr/lib/n32. +ifneq ($(filter MIPS_ABI_DEFAULT=ABI_64,$(tm_defines)),) +MULTILIB_OSDIRNAMES = ../lib/n32 . ../lib/o32 +endif LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib Index: src/external/gpl3/gcc/dist/libgcc/config.host diff -u src/external/gpl3/gcc/dist/libgcc/config.host:1.30 src/external/gpl3/gcc/dist/libgcc/config.host:1.31 --- src/external/gpl3/gcc/dist/libgcc/config.host:1.30 Sat Apr 17 06:53:18 2021 +++ src/external/gpl3/gcc/dist/libgcc/config.host Sun Apr 25 19:12:54 2021 @@ -1056,7 +1056,7 @@ mipsr5900-*-elf* | mipsr5900el-*-elf*) tmake_file="$tmake_file mips/t-elf mips/t-crtstuff" extra_parts="$extra_parts crti.o crtn.o" ;; -mips64-*-elf* | mips64el-*-elf*) +mips64-*-elf* | mips64el-*-elf* | mipsn64-*-elf* | mipsn64el-*-elf*) tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16" extra_parts="$extra_parts crti.o crtn.o" ;; Index: src/external/gpl3/gcc/lib/crtstuff/Makefile diff -u src/external/gpl3/gcc/lib/crtstuff/Makefile:1.14 src/external/gpl3/gcc/lib/crtstuff/Makefile:1.15 --- src/external/gpl3/gcc/lib/crtstuff/Makefile:1.14 Tue Mar 15 15:21:27 2016 +++ src/external/gpl3/gcc/lib/crtstuff/Makefile Sun Apr 25 19:12:54 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2016/03/15 19:21:27 mrg Exp $ +# $NetBSD: Makefile,v 1.15 2021/04/25 23:12:54 christos Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -66,7 +66,7 @@ ${OBJS}: ${DPSRCS} ${CC} ${CPPFLAGS} ${CPPFLAGS.${.TARGET}} ${GCFLAGS} ${COPTS} ${COPTS.${.TARGET}} ${CPUFLAGS} -c ${.IMPSRC} -o ${.TARGET}.o mv ${.TARGET}.o ${.TARGET} -.if (${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el") +.if ${MACHINE_MIPS64} # Turn off as(1) warnings on MIPS, since warnings are fatal with WARNS>0 # and GCC configury passes -finhibit-size-directive which causes mips-gas # to barf. Don't know what the real fix for this is... Index: src/external/gpl3/gcc/lib/libgcc/Makefile.inc diff -u src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.50 src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.51 --- src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.50 Sat Apr 24 02:34:52 2021 +++ src/external/gpl3/gcc/lib/libgcc/Makefile.inc Sun Apr 25 19:12:54 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.50 2021/04/24 06:34:52 rin Exp $ +# $NetBSD: Makefile.inc,v 1.51 2021/04/25 23:12:54 christos Exp $ LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/} GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/powerpc.*/rs6000/:C/x86_64/i386/} @@ -69,7 +69,8 @@ LIB2FUNCS_ALL+= \ .if ${LIBGCC_MACHINE_ARCH} != "coldfire" && \ empty(LIBGCC_MACHINE_ARCH:Mearm*) && \ empty(LIBGCC_MACHINE_ARCH:Maarch64*) && \ - empty(LIBGCC_MACHINE_ARCH:Mmips64*) + empty(LIBGCC_MACHINE_ARCH:Mmips64*) && \ + empty(LIBGCC_MACHINE_ARCH:Mmipsn64*) EXTRA_FUNC_SIZES= sf df xf Index: src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile diff -u src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile:1.15 src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile:1.16 --- src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile:1.15 Sun Apr 11 20:05:55 2021 +++ src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile Sun Apr 25 19:12:54 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2021/04/12 00:05:55 mrg Exp $ +# $NetBSD: Makefile,v 1.16 2021/04/25 23:12:54 christos Exp $ USE_SHLIBDIR= yes REQUIRETOOLS= yes @@ -29,7 +29,7 @@ LIB2ADD_HACK+= ${GNUHOSTDIST}/gcc/config .endif # XXXGCC5 GCC 5.3 has all these in libgcc and we have them in libc. -.if ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb" +.if ${MACHINE_MIPS64} LIB2ADD_EDITED= ${G_LIB2ADD:T:Nfloatsisf.c:Nfloatunsisf.c:Nfloatsidf.c:Nfloatunsidf.c:Nfixsfsi.c:Nextendsfdf2.c:Naddsf3.c:Nmulsf3.c:Ndivsf3.c:Nadddf3.c:Nsubdf3.c:Nmuldf3.c:Ndivdf3.c:Nfixdfsi.c:S/.asm/.S/} .else LIB2ADD_EDITED= ${G_LIB2ADD:T:S/.asm/.S/} Index: src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/mipso32/Makefile diff -u src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/mipso32/Makefile:1.1 src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/mipso32/Makefile:1.2 --- src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/mipso32/Makefile:1.1 Sat Mar 1 05:00:48 2014 +++ src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/mipso32/Makefile Sun Apr 25 19:12:54 2021 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.1 2014/03/01 10:00:48 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2021/04/25 23:12:54 christos Exp $ GCC_MACHINE_ARCH=mipso32 .include "../Makefile.arch_bits" # mips o32 files are in mipse[lb] subdirs. -.PATH: ${.CURDIR}/../../../../arch/${MACHINE_ARCH:S/64//} +.PATH: ${.CURDIR}/../../../../arch/${MACHINE_ARCH:S/mipsn/mips/:S/64//} Index: src/external/gpl3/gcc/lib/libtsan/Makefile diff -u src/external/gpl3/gcc/lib/libtsan/Makefile:1.15 src/external/gpl3/gcc/lib/libtsan/Makefile:1.16 --- src/external/gpl3/gcc/lib/libtsan/Makefile:1.15 Mon Sep 14 11:01:58 2020 +++ src/external/gpl3/gcc/lib/libtsan/Makefile Sun Apr 25 19:12:54 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2020/09/14 15:01:58 kamil Exp $ +# $NetBSD: Makefile,v 1.16 2021/04/25 23:12:54 christos Exp $ UNSUPPORTED_COMPILER.clang= # defined NOSANITIZER= # defined @@ -52,7 +52,7 @@ TSAN_SRCS= \ TSAN_SRCS+= tsan_rtl_amd64.S .elif ${MACHINE_ARCH} == "aarch64" TSAN_SRCS+= tsan_rtl_aarch64.S -.elif ${MACHINE_ARCH} == "mips64el" +.elif ${MACHINE_MIPS64} TSAN_SRCS+= tsan_rtl_mips64.S .elif ${MACHINE_ARCH} == "powerpc64" TSAN_SRCS+= tsan_rtl_ppc64.S