pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/gcc7 port our gcc arm64 patches over to gcc 7. o...
details: https://anonhg.NetBSD.org/pkgsrc/rev/54e2bd204d58
branches: trunk
changeset: 325082:54e2bd204d58
user: mrg <mrg%pkgsrc.org@localhost>
date: Fri Nov 09 11:22:13 2018 +0000
description:
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.
diffstat:
lang/gcc7/distinfo | 9 +-
lang/gcc7/patches/patch-gcc_config.gcc | 38 +++-
lang/gcc7/patches/patch-gcc_config_aarch64_aarch64-netbsd.h | 104 ++++++++++++
lang/gcc7/patches/patch-gcc_config_aarch64_aarch64.h | 15 +
lang/gcc7/patches/patch-gcc_config_aarch64_t-aarch64-netbsd | 28 +++
lang/gcc7/patches/patch-libgcc_config.host | 21 ++-
6 files changed, 198 insertions(+), 17 deletions(-)
diffs (truncated from 330 to 300 lines):
diff -r 63b8083f4d2e -r 54e2bd204d58 lang/gcc7/distinfo
--- a/lang/gcc7/distinfo Fri Nov 09 10:48:44 2018 +0000
+++ b/lang/gcc7/distinfo Fri Nov 09 11:22:13 2018 +0000
@@ -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 @@
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-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
diff -r 63b8083f4d2e -r 54e2bd204d58 lang/gcc7/patches/patch-gcc_config.gcc
--- a/lang/gcc7/patches/patch-gcc_config.gcc Fri Nov 09 10:48:44 2018 +0000
+++ b/lang/gcc7/patches/patch-gcc_config.gcc Fri Nov 09 11:22:13 2018 +0000
@@ -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 @@
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 @@
# 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 @@
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 @@
;;
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 @@
;;
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 @@
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 @@
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 @@
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 @@
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*)
diff -r 63b8083f4d2e -r 54e2bd204d58 lang/gcc7/patches/patch-gcc_config_aarch64_aarch64-netbsd.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc7/patches/patch-gcc_config_aarch64_aarch64-netbsd.h Fri Nov 09 11:22:13 2018 +0000
@@ -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
++ <http://www.gnu.org/licenses/>. */
++
++#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 */
diff -r 63b8083f4d2e -r 54e2bd204d58 lang/gcc7/patches/patch-gcc_config_aarch64_aarch64.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc7/patches/patch-gcc_config_aarch64_aarch64.h Fri Nov 09 11:22:13 2018 +0000
@@ -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 }, \
diff -r 63b8083f4d2e -r 54e2bd204d58 lang/gcc7/patches/patch-gcc_config_aarch64_t-aarch64-netbsd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc7/patches/patch-gcc_config_aarch64_t-aarch64-netbsd Fri Nov 09 11:22:13 2018 +0000
@@ -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
++# <http://www.gnu.org/licenses/>.
++
++LIB1ASMSRC = aarch64/lib1funcs.asm
++LIB1ASMFUNCS = _aarch64_sync_cache_range
diff -r 63b8083f4d2e -r 54e2bd204d58 lang/gcc7/patches/patch-libgcc_config.host
--- a/lang/gcc7/patches/patch-libgcc_config.host Fri Nov 09 10:48:44 2018 +0000
Home |
Main Index |
Thread Index |
Old Index