Received: by mail.netbsd.org (Postfix, from userid 605) id 51C8984DFC; Fri, 9 Nov 2018 11:22:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 5205884DA9 for ; Fri, 9 Nov 2018 11:22:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id SjEDKSfkhPnz for ; Fri, 9 Nov 2018 11:22:13 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 65C3084CDA for ; Fri, 9 Nov 2018 11:22:13 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 53FEDFB1F; Fri, 9 Nov 2018 11:22:13 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1541762533166090" MIME-Version: 1.0 Date: Fri, 9 Nov 2018 11:22:13 +0000 From: "matthew green" Subject: CVS commit: pkgsrc/lang/gcc7 To: pkgsrc-changes@NetBSD.org Reply-To: mrg@netbsd.org X-Mailer: log_accum Message-Id: <20181109112213.53FEDFB1F@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1541762533166090 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: mrg Date: Fri Nov 9 11:22:13 UTC 2018 Modified Files: pkgsrc/lang/gcc7: distinfo pkgsrc/lang/gcc7/patches: patch-gcc_config.gcc patch-libgcc_config.host Added Files: pkgsrc/lang/gcc7/patches: patch-gcc_config_aarch64_aarch64-netbsd.h patch-gcc_config_aarch64_aarch64.h patch-gcc_config_aarch64_t-aarch64-netbsd Log Message: port our gcc arm64 patches over to gcc 7. only real change is to add 'md_unwind_header=aarch64/aarch64-unwind.h' to the new netbsd/arm64 section of libgcc/config.host. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 pkgsrc/lang/gcc7/distinfo cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/gcc7/patches/patch-gcc_config.gcc cvs rdiff -u -r0 -r1.1 \ pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_aarch64-netbsd.h \ pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_aarch64.h \ pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_t-aarch64-netbsd cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/gcc7/patches/patch-libgcc_config.host Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1541762533166090 Content-Disposition: inline Content-Length: 14013 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/lang/gcc7/distinfo diff -u pkgsrc/lang/gcc7/distinfo:1.11 pkgsrc/lang/gcc7/distinfo:1.12 --- pkgsrc/lang/gcc7/distinfo:1.11 Wed Jul 18 22:55:07 2018 +++ pkgsrc/lang/gcc7/distinfo Fri Nov 9 11:22:13 2018 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.11 2018/07/18 22:55:07 maya Exp $ +$NetBSD: distinfo,v 1.12 2018/11/09 11:22:13 mrg Exp $ SHA1 (gcc-7.3.0.tar.xz) = 9689b9cae7b2886fdaa08449a26701f095c04e48 RMD160 (gcc-7.3.0.tar.xz) = 31f6934a0e0c0ca84b6668110f9afdb91c1f9023 @@ -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: pkgsrc/lang/gcc7/patches/patch-gcc_config.gcc diff -u pkgsrc/lang/gcc7/patches/patch-gcc_config.gcc:1.3 pkgsrc/lang/gcc7/patches/patch-gcc_config.gcc:1.4 --- pkgsrc/lang/gcc7/patches/patch-gcc_config.gcc:1.3 Sun Jun 17 19:50:52 2018 +++ pkgsrc/lang/gcc7/patches/patch-gcc_config.gcc Fri Nov 9 11:22:13 2018 @@ -1,4 +1,4 @@ -$NetBSD: patch-gcc_config.gcc,v 1.3 2018/06/17 19:50:52 maya Exp $ +$NetBSD: patch-gcc_config.gcc,v 1.4 2018/11/09 11:22:13 mrg Exp $ Workaround netbsd's compatibility non-C99 cabs (causes gfortran link failures) netbsd/arm eabi support @@ -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: pkgsrc/lang/gcc7/patches/patch-libgcc_config.host diff -u pkgsrc/lang/gcc7/patches/patch-libgcc_config.host:1.1 pkgsrc/lang/gcc7/patches/patch-libgcc_config.host:1.2 --- pkgsrc/lang/gcc7/patches/patch-libgcc_config.host:1.1 Sun Jun 17 19:50:52 2018 +++ pkgsrc/lang/gcc7/patches/patch-libgcc_config.host Fri Nov 9 11:22:13 2018 @@ -1,10 +1,25 @@ -$NetBSD: patch-libgcc_config.host,v 1.1 2018/06/17 19:50:52 maya Exp $ +$NetBSD: patch-libgcc_config.host,v 1.2 2018/11/09 11:22:13 mrg Exp $ 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*) Added files: Index: pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_aarch64-netbsd.h diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_aarch64-netbsd.h:1.1 --- /dev/null Fri Nov 9 11:22:13 2018 +++ pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_aarch64-netbsd.h Fri Nov 9 11:22:13 2018 @@ -0,0 +1,104 @@ +$NetBSD: patch-gcc_config_aarch64_aarch64-netbsd.h,v 1.1 2018/11/09 11:22:13 mrg Exp $ + +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: pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_aarch64.h diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_aarch64.h:1.1 --- /dev/null Fri Nov 9 11:22:13 2018 +++ pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_aarch64.h Fri Nov 9 11:22:13 2018 @@ -0,0 +1,15 @@ +$NetBSD: patch-gcc_config_aarch64_aarch64.h,v 1.1 2018/11/09 11:22:13 mrg Exp $ + +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: pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_t-aarch64-netbsd diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_t-aarch64-netbsd:1.1 --- /dev/null Fri Nov 9 11:22:13 2018 +++ pkgsrc/lang/gcc7/patches/patch-gcc_config_aarch64_t-aarch64-netbsd Fri Nov 9 11:22:13 2018 @@ -0,0 +1,28 @@ +$NetBSD: patch-gcc_config_aarch64_t-aarch64-netbsd,v 1.1 2018/11/09 11:22:13 mrg Exp $ + +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 --_----------=_1541762533166090--