Index: distinfo =================================================================== RCS file: /cvsroot/pkgsrc/lang/gcc7/distinfo,v retrieving revision 1.11 diff -p -u -u -r1.11 distinfo --- distinfo 18 Jul 2018 22:55:07 -0000 1.11 +++ distinfo 9 Nov 2018 10:36:26 -0000 @@ -11,7 +11,10 @@ Size (isl-0.16.1.tar.bz2) = 1626446 byte SHA1 (patch-contrib_download__prerequisites) = 86c6c16e0e3e3a0bcb38579a8b4004f603fac1ca SHA1 (patch-gcc_Makefile.in) = d96a57a098e49a2c5ea6478dd5d22aba584fc1bc SHA1 (patch-gcc_common_config_arm_arm-common.c) = 7c973cb9554a52f4b85f8fc98708f5e5cce8e8bd -SHA1 (patch-gcc_config.gcc) = fd19774e62c2931d52eda2f979c1db65202ed4fb +SHA1 (patch-gcc_config.gcc) = 20d1444cc2c031c8adc96289e1ccc6c1d29eb72f +SHA1 (patch-gcc_config_aarch64_aarch64-netbsd.h) = ed7bc42813b33c87242f5ef0a304a621b873c9eb +SHA1 (patch-gcc_config_aarch64_aarch64.h) = 5339d9c7ce9d040097c29cc3b7ec1d2fbfff811c +SHA1 (patch-gcc_config_aarch64_t-aarch64-netbsd) = 0e7feb6f238b0a752ccc50e95e09b017cb368a90 SHA1 (patch-gcc_config_alpha_elf.h) = 05657c528109480296cbe8a98461cba7853af492 SHA1 (patch-gcc_config_alpha_linux.h) = fce1256bce232143ff6c1c1b8b9c855737adb23f SHA1 (patch-gcc_config_arm_arm.h) = 92c8bff1063e153fec4454e6dea5334a42b0dad6 @@ -34,7 +37,7 @@ SHA1 (patch-libcilkrts_runtime_os-unix.c SHA1 (patch-libdecnumber_decNumber.c) = cec90e49c829bfc6ba1ec605d2fac7daaad62762 SHA1 (patch-libffi_configure) = bcfbfe8abddc378e2de4a39ad0669583b37e0292 SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 6321dde308579448c27c2b6e1e30633699dd145f -SHA1 (patch-libgcc_config.host) = 1c2ebce3a44d935e9bbab30952b51b6f3716e47e +SHA1 (patch-libgcc_config.host) = 4fa15e83a446e026507ac4f16c4f7ef686544c43 SHA1 (patch-libgcc_config_arm_t-netbsd) = fe986b09ccbfc253aaaca263e8e38f06da4891cc SHA1 (patch-libgcc_config_arm_t-netbsd-eabi) = 1e818e92fe79f57d305ff42ce3449dddf87c3179 SHA1 (patch-libgcc_config_i386_cpuinfo.h) = d217e3c65178c96c7314cb88c740b9586d4e8fed Index: patches/patch-gcc_config.gcc =================================================================== RCS file: /cvsroot/pkgsrc/lang/gcc7/patches/patch-gcc_config.gcc,v retrieving revision 1.3 diff -p -u -u -r1.3 patch-gcc_config.gcc --- patches/patch-gcc_config.gcc 17 Jun 2018 19:50:52 -0000 1.3 +++ patches/patch-gcc_config.gcc 9 Nov 2018 10:36:26 -0000 @@ -6,9 +6,11 @@ netbsd/arm eabi support use nbsd_tm_file to make sure every netbsd target gets netbsd-stdint.h (upstreamed) +add arm64 support. + --- gcc/config.gcc.orig 2018-01-08 13:39:11.000000000 +0000 -+++ gcc/config.gcc -@@ -781,7 +781,12 @@ case ${target} in ++++ gcc/config.gcc 2018-11-09 09:20:10.688545085 +0000 +@@ -781,7 +781,12 @@ gas=yes gnu_ld=yes use_gcc_stdint=wrap @@ -21,7 +23,21 @@ use nbsd_tm_file to make sure every netb # 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 -@@ -1001,7 +1006,7 @@ alpha*-*-freebsd*) +@@ -962,6 +967,13 @@ + tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-freebsd.h" + tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd" + ;; ++aarch64*-*-netbsd*) ++ tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file}" ++ tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-netbsd.h" ++ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-netbsd" ++ extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ++ # XXX big endian ++ ;; + aarch64*-*-linux*) + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h" + tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h" +@@ -1001,7 +1013,7 @@ extra_options="${extra_options} alpha/elf.opt" ;; alpha*-*-netbsd*) @@ -30,7 +46,7 @@ use nbsd_tm_file to make sure every netb tmake_file="${tmake_file} alpha/t-alpha" extra_options="${extra_options} netbsd.opt netbsd-elf.opt \ alpha/elf.opt" -@@ -1092,10 +1097,37 @@ arm*-*-freebsd*) # ARM Fr +@@ -1092,10 +1104,37 @@ with_tls=${with_tls:-gnu} ;; arm*-*-netbsdelf*) @@ -71,7 +87,7 @@ use nbsd_tm_file to make sure every netb ;; arm*-*-linux-*) # ARM GNU/Linux with ELF tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" -@@ -1485,12 +1517,14 @@ x86_64-*-freebsd*) +@@ -1485,12 +1524,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*) @@ -88,7 +104,7 @@ use nbsd_tm_file to make sure every netb ;; i[34567]86-*-openbsd*) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h" -@@ -2381,7 +2415,7 @@ powerpc*-*-freebsd*) +@@ -2381,7 +2422,7 @@ esac ;; powerpc-*-netbsd*) @@ -97,7 +113,7 @@ use nbsd_tm_file to make sure every netb extra_options="${extra_options} netbsd.opt netbsd-elf.opt" tmake_file="${tmake_file} rs6000/t-netbsd" extra_options="${extra_options} rs6000/sysv4.opt" -@@ -2700,7 +2734,7 @@ sh-*-elf* | sh[12346l]*-*-elf* | \ +@@ -2700,7 +2741,7 @@ fi tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;; sh*-*-netbsd*) @@ -106,7 +122,7 @@ use nbsd_tm_file to make sure every netb extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; -@@ -2860,7 +2894,7 @@ sparc-*-linux*) +@@ -2860,7 +2901,7 @@ fi ;; sparc-*-netbsdelf*) @@ -115,7 +131,7 @@ use nbsd_tm_file to make sure every netb extra_options="${extra_options} netbsd.opt netbsd-elf.opt" extra_options="${extra_options} sparc/long-double-switch.opt" tmake_file="${tmake_file} sparc/t-sparc" -@@ -2908,7 +2942,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd* +@@ -2908,7 +2949,7 @@ ;; sparc64-*-netbsd*) tm_file="sparc/biarch64.h ${tm_file}" @@ -124,7 +140,7 @@ use nbsd_tm_file to make sure every netb extra_options="${extra_options} netbsd.opt netbsd-elf.opt" extra_options="${extra_options} sparc/long-double-switch.opt" tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64" -@@ -3012,7 +3046,7 @@ vax-*-linux*) +@@ -3012,7 +3053,7 @@ extra_options="${extra_options} vax/elf.opt" ;; vax-*-netbsdelf*) Index: patches/patch-gcc_config_aarch64_aarch64-netbsd.h =================================================================== RCS file: patches/patch-gcc_config_aarch64_aarch64-netbsd.h diff -N patches/patch-gcc_config_aarch64_aarch64-netbsd.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-gcc_config_aarch64_aarch64-netbsd.h 9 Nov 2018 10:36:26 -0000 @@ -0,0 +1,104 @@ +$NetBSD$ + +arm64 support. + +--- /dev/null 2018-11-09 09:25:57.929086649 +0000 ++++ gcc/config/aarch64/aarch64-netbsd.h 2018-11-09 09:23:18.308262443 +0000 +@@ -0,0 +1,97 @@ ++/* Definitions for AArch64 running NetBSD ++ Copyright (C) 2016-2017 Free Software Foundation, Inc. ++ ++ This file is part of GCC. ++ ++ GCC is free software; you can redistribute it and/or modify it ++ under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3, or (at your option) ++ any later version. ++ ++ GCC is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with GCC; see the file COPYING3. If not see ++ . */ ++ ++#ifndef GCC_AARCH64_NETBSD_H ++#define GCC_AARCH64_NETBSD_H ++ ++#define TARGET_LINKER_BIG_EMULATION "aarch64nbsdb" ++#define TARGET_LINKER_LITTLE_EMULATION "aarch64nbsd" ++ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_LINKER_EMULATION TARGET_LINKER_BIG_EMULATION ++#else ++#define TARGET_LINKER_EMULATION TARGET_LINKER_LITTLE_EMULATION ++#endif ++ ++#undef SUBTARGET_EXTRA_LINK_SPEC ++#define SUBTARGET_EXTRA_LINK_SPEC " -m" TARGET_LINKER_EMULATION ++ ++#define NETBSD_ENTRY_POINT "__start" ++ ++#define NETBSD_TARGET_LINK_SPEC "%{h*} \ ++ -X %{mbig-endian:-EB -m " TARGET_LINKER_BIG_EMULATION "} \ ++ %{mlittle-endian:-EL -m " TARGET_LINKER_LITTLE_EMULATION "} \ ++ %(netbsd_link_spec)" ++ ++#if TARGET_FIX_ERR_A53_835769_DEFAULT ++#define CA53_ERR_835769_SPEC \ ++ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}" ++#else ++#define CA53_ERR_835769_SPEC \ ++ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}" ++#endif ++ ++#ifdef TARGET_FIX_ERR_A53_843419_DEFAULT ++#define CA53_ERR_843419_SPEC \ ++ " %{!mno-fix-cortex-a53-843419:--fix-cortex-a53-843419}" ++#else ++#define CA53_ERR_843419_SPEC \ ++ " %{mfix-cortex-a53-843419:--fix-cortex-a53-843419}" ++#endif ++ ++#undef LINK_SPEC ++#define LINK_SPEC NETBSD_LINK_SPEC_ELF \ ++ NETBSD_TARGET_LINK_SPEC \ ++ CA53_ERR_835769_SPEC \ ++ CA53_ERR_843419_SPEC ++ ++#undef TARGET_OS_CPP_BUILTINS ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ NETBSD_OS_CPP_BUILTINS_ELF(); \ ++ } \ ++ while (0) ++ ++#undef SUBTARGET_CPP_SPEC ++#define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC ++ ++#if 0 ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack ++#endif ++ ++#if 0 ++/* Uninitialized common symbols in non-PIE executables, even with ++ strong definitions in dependent shared libraries, will resolve ++ to COPY relocated symbol in the executable. See PR65780. */ ++#undef TARGET_BINDS_LOCAL_P ++#define TARGET_BINDS_LOCAL_P default_binds_local_p_2 ++#endif ++ ++#if 0 ++#undef MCOUNT_NAME ++#define MCOUNT_NAME ".mcount" ++#endif ++ ++#undef EXTRA_SPECS ++#define EXTRA_SPECS \ ++ { "asm_cpu_spec", ASM_CPU_SPEC }, \ ++ NETBSD_SUBTARGET_EXTRA_SPECS ++ ++#endif /* GCC_AARCH64_NETBSD_H */ Index: patches/patch-gcc_config_aarch64_aarch64.h =================================================================== RCS file: patches/patch-gcc_config_aarch64_aarch64.h diff -N patches/patch-gcc_config_aarch64_aarch64.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-gcc_config_aarch64_aarch64.h 9 Nov 2018 10:36:26 -0000 @@ -0,0 +1,15 @@ +$NetBSD$ + +support arm64. + +--- gcc/config/aarch64/aarch64.h.orig 2017-09-21 12:16:31.000000000 +0000 ++++ gcc/config/aarch64/aarch64.h 2018-11-09 09:37:45.295152705 +0000 +@@ -930,7 +930,7 @@ + #define MCPU_TO_MARCH_SPEC_FUNCTIONS \ + { "rewrite_mcpu", aarch64_rewrite_mcpu }, + +-#if defined(__aarch64__) ++#if defined(__aarch64__) && !defined(__NetBSD__) + extern const char *host_detect_local_cpu (int argc, const char **argv); + # define EXTRA_SPEC_FUNCTIONS \ + { "local_cpu_detect", host_detect_local_cpu }, \ Index: patches/patch-gcc_config_aarch64_t-aarch64-netbsd =================================================================== RCS file: patches/patch-gcc_config_aarch64_t-aarch64-netbsd diff -N patches/patch-gcc_config_aarch64_t-aarch64-netbsd --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-gcc_config_aarch64_t-aarch64-netbsd 9 Nov 2018 10:36:26 -0000 @@ -0,0 +1,28 @@ +$NetBSD$ + +arm64 support. + +--- /dev/null 2018-11-09 09:25:57.929086649 +0000 ++++ gcc/config/aarch64/t-aarch64-netbsd 2018-11-09 09:23:36.784950907 +0000 +@@ -0,0 +1,21 @@ ++# Machine description for AArch64 architecture. ++# Copyright (C) 2016-2017 Free Software Foundation, Inc. ++# ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++LIB1ASMSRC = aarch64/lib1funcs.asm ++LIB1ASMFUNCS = _aarch64_sync_cache_range Index: patches/patch-libgcc_config.host =================================================================== RCS file: /cvsroot/pkgsrc/lang/gcc7/patches/patch-libgcc_config.host,v retrieving revision 1.1 diff -p -u -u -r1.1 patch-libgcc_config.host --- patches/patch-libgcc_config.host 17 Jun 2018 19:50:52 -0000 1.1 +++ patches/patch-libgcc_config.host 9 Nov 2018 10:36:26 -0000 @@ -2,9 +2,24 @@ $NetBSD: patch-libgcc_config.host,v 1.1 netbsd/arm EABI support +arm64 support + --- libgcc/config.host.orig 2018-01-08 13:39:11.000000000 +0000 -+++ libgcc/config.host -@@ -396,7 +396,16 @@ arm*-*-freebsd*) # ARM Fr ++++ libgcc/config.host 2018-11-09 10:07:05.711530693 +0000 +@@ -343,6 +343,12 @@ + tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" + md_unwind_header=aarch64/freebsd-unwind.h + ;; ++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" ++ md_unwind_header=aarch64/aarch64-unwind.h ++ ;; + aarch64*-*-linux*) + extra_parts="$extra_parts crtfastmath.o" + md_unwind_header=aarch64/linux-unwind.h +@@ -396,7 +402,16 @@ tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" ;; arm*-*-netbsdelf*)