pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/gcc8 port the arm64 support to GCC 8.
details: https://anonhg.NetBSD.org/pkgsrc/rev/c0be3dfe4c38
branches: trunk
changeset: 325147:c0be3dfe4c38
user: mrg <mrg%pkgsrc.org@localhost>
date: Sat Nov 10 11:45:27 2018 +0000
description:
port the arm64 support to GCC 8.
diffstat:
lang/gcc8/distinfo | 13 +-
lang/gcc8/patches/patch-gcc_config.gcc | 32 ++-
lang/gcc8/patches/patch-gcc_config_aarch64_aarch64-builtins.c | 16 +
lang/gcc8/patches/patch-gcc_config_aarch64_aarch64-netbsd.h | 104 ++++++++++
lang/gcc8/patches/patch-gcc_config_aarch64_aarch64.h | 15 +
lang/gcc8/patches/patch-gcc_config_aarch64_t-aarch64-netbsd | 28 ++
lang/gcc8/patches/patch-gcc_config_netbsd-elf.h | 37 +++-
lang/gcc8/patches/patch-gcc_ginclude_stddef.h | 62 +++++
lang/gcc8/patches/patch-libgcc_config.host | 23 +-
9 files changed, 310 insertions(+), 20 deletions(-)
diffs (truncated from 425 to 300 lines):
diff -r 4101937f0e8e -r c0be3dfe4c38 lang/gcc8/distinfo
--- a/lang/gcc8/distinfo Sat Nov 10 11:41:40 2018 +0000
+++ b/lang/gcc8/distinfo Sat Nov 10 11:45:27 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2018/11/07 04:32:32 maya Exp $
+$NetBSD: distinfo,v 1.6 2018/11/10 11:45:27 mrg Exp $
SHA1 (gcc-8.2.0.tar.xz) = 19926bdb6c4b58891015929853d41aeff019d400
RMD160 (gcc-8.2.0.tar.xz) = 4fba19867980d04bed1e62d46d4787c99f4fd13d
@@ -10,20 +10,25 @@
Size (isl-0.16.1.tar.bz2) = 1626446 bytes
SHA1 (patch-contrib_download__prerequisites) = 86c6c16e0e3e3a0bcb38579a8b4004f603fac1ca
SHA1 (patch-gcc_Makefile.in) = c0f97c75ba1d37eae894141edd58bb36b734f651
-SHA1 (patch-gcc_config.gcc) = c57c3668688a96950a706cb9643b40e5631545f9
+SHA1 (patch-gcc_config.gcc) = 4a971d1df7f05cfaefdf462d1b7c6dea1e838713
+SHA1 (patch-gcc_config_aarch64_aarch64-builtins.c) = b10ef4b9ad39e605fc4e2a0c8dffdae677842e94
+SHA1 (patch-gcc_config_aarch64_aarch64-netbsd.h) = ed7bc42813b33c87242f5ef0a304a621b873c9eb
+SHA1 (patch-gcc_config_aarch64_aarch64.h) = 54b90eb2cfedb6c57d01c1a1094c851756648f09
+SHA1 (patch-gcc_config_aarch64_t-aarch64-netbsd) = 0e7feb6f238b0a752ccc50e95e09b017cb368a90
SHA1 (patch-gcc_config_arm_arm.h) = aba0bab2489cb7224d45eca0977156fe4f7a74a8
-SHA1 (patch-gcc_config_netbsd-elf.h) = 0fcfadfe0734f9583fdec7817112a42fb7be0eb3
+SHA1 (patch-gcc_config_netbsd-elf.h) = e392918cce01627d64d4153329775c7ad03b4a45
SHA1 (patch-gcc_config_netbsd-protos.h) = 6d28864b4ccc8c1a63fe28e43601b84b63a00633
SHA1 (patch-gcc_config_t-netbsd) = 802ad5706aa7ca9629f8e237f08fbb1569d28846
SHA1 (patch-gcc_config_x-netbsd) = 6dc3d78e26df62054ea29f98ca51592858e671e3
SHA1 (patch-gcc_configure) = 15fb7af267b79965f83bc64ce8aad1279b0ea52d
SHA1 (patch-gcc_ggc-common.c) = a5d2dba635859f5d680c3f80d7c30b42461c752b
+SHA1 (patch-gcc_ginclude_stddef.h) = 583b7931aad14058be75569b0138efad8ac74113
SHA1 (patch-gcc_lto_lto.c) = 7bd85ac8ade76a28c394f6fbe5d495f91824f79f
SHA1 (patch-gcc_targhooks.c) = b28d8a9696d07bbfb00b7d8c55193ba99447ff1d
SHA1 (patch-isl_configure) = 36b37778ee13c0b364fb24d5864d6a9e65b29b7d
SHA1 (patch-libffi_configure) = bcfbfe8abddc378e2de4a39ad0669583b37e0292
SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 6321dde308579448c27c2b6e1e30633699dd145f
-SHA1 (patch-libgcc_config.host) = bdd4cd27249c8b62793204428d95c977d58f06fb
+SHA1 (patch-libgcc_config.host) = 8d8fab73ae6b6476f648f73ad9c05436926f5d13
SHA1 (patch-libgcc_crtstuff.c) = e3a3b02a26229992851f195b5701cb1b86c29efe
SHA1 (patch-libgfortran_io_io.h) = d44676239a7f45e42054d24bd5224f43c20055c0
SHA1 (patch-libsanitizer_configure.tgt) = 0a47782f01631d1c91e28a8735865c8571fbcf7d
diff -r 4101937f0e8e -r c0be3dfe4c38 lang/gcc8/patches/patch-gcc_config.gcc
--- a/lang/gcc8/patches/patch-gcc_config.gcc Sat Nov 10 11:41:40 2018 +0000
+++ b/lang/gcc8/patches/patch-gcc_config.gcc Sat Nov 10 11:45:27 2018 +0000
@@ -1,20 +1,38 @@
-$NetBSD: patch-gcc_config.gcc,v 1.1 2018/05/05 04:08:36 maya Exp $
+$NetBSD: patch-gcc_config.gcc,v 1.2 2018/11/10 11:45:27 mrg Exp $
+
+add arm64 support
+
+build cabs* rename support
---- gcc/config.gcc.orig 2017-10-21 21:09:53.000000000 +0000
-+++ gcc/config.gcc
-@@ -801,6 +801,11 @@ case ${target} in
+fix x86 crtstuff.
+
+--- gcc/config.gcc.orig 2018-06-25 19:34:01.000000000 +0000
++++ gcc/config.gcc 2018-11-10 00:20:47.655130032 +0000
+@@ -812,6 +812,9 @@
gas=yes
gnu_ld=yes
use_gcc_stdint=wrap
+ # 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"
+ default_gnu_indirect_function=yes
case ${enable_threads} in
"" | yes | posix) thread_file='posix' ;;
esac
-@@ -1498,10 +1503,12 @@ x86_64-*-freebsd*)
+@@ -980,6 +983,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"
+@@ -1523,10 +1533,12 @@
i[34567]86-*-netbsdelf*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/netbsd-elf.h"
extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
diff -r 4101937f0e8e -r c0be3dfe4c38 lang/gcc8/patches/patch-gcc_config_aarch64_aarch64-builtins.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc8/patches/patch-gcc_config_aarch64_aarch64-builtins.c Sat Nov 10 11:45:27 2018 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-gcc_config_aarch64_aarch64-builtins.c,v 1.1 2018/11/10 11:45:27 mrg Exp $
+
+initialise subtarget builtins so cabs*() are renamed.
+
+--- gcc/config/aarch64/aarch64-builtins.c.orig 2017-01-20 21:03:41.000000000 +0000
++++ gcc/config/aarch64/aarch64-builtins.c 2018-11-10 00:44:41.905576216 +0000
+@@ -991,6 +991,9 @@
+ register them. */
+ if (!TARGET_ILP32)
+ aarch64_init_pauth_hint_builtins ();
++#ifdef SUBTARGET_INIT_BUILTINS
++ SUBTARGET_INIT_BUILTINS;
++#endif
+ }
+
+ tree
diff -r 4101937f0e8e -r c0be3dfe4c38 lang/gcc8/patches/patch-gcc_config_aarch64_aarch64-netbsd.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc8/patches/patch-gcc_config_aarch64_aarch64-netbsd.h Sat Nov 10 11:45:27 2018 +0000
@@ -0,0 +1,104 @@
+$NetBSD: patch-gcc_config_aarch64_aarch64-netbsd.h,v 1.1 2018/11/10 11:45:27 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 4101937f0e8e -r c0be3dfe4c38 lang/gcc8/patches/patch-gcc_config_aarch64_aarch64.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc8/patches/patch-gcc_config_aarch64_aarch64.h Sat Nov 10 11:45:27 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-gcc_config_aarch64_aarch64.h,v 1.1 2018/11/10 11:45:27 mrg Exp $
+
+support arm64.
+
+--- gcc/config/aarch64/aarch64.h.orig 2018-02-21 14:05:45.000000000 +0000
++++ gcc/config/aarch64/aarch64.h 2018-11-09 12:07:14.375232698 +0000
+@@ -1000,7 +1000,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 HAVE_LOCAL_CPU_DETECT
+ # define EXTRA_SPEC_FUNCTIONS \
diff -r 4101937f0e8e -r c0be3dfe4c38 lang/gcc8/patches/patch-gcc_config_aarch64_t-aarch64-netbsd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc8/patches/patch-gcc_config_aarch64_t-aarch64-netbsd Sat Nov 10 11:45:27 2018 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-gcc_config_aarch64_t-aarch64-netbsd,v 1.1 2018/11/10 11:45:27 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 4101937f0e8e -r c0be3dfe4c38 lang/gcc8/patches/patch-gcc_config_netbsd-elf.h
--- a/lang/gcc8/patches/patch-gcc_config_netbsd-elf.h Sat Nov 10 11:41:40 2018 +0000
+++ b/lang/gcc8/patches/patch-gcc_config_netbsd-elf.h Sat Nov 10 11:45:27 2018 +0000
@@ -1,12 +1,13 @@
-$NetBSD: patch-gcc_config_netbsd-elf.h,v 1.1 2018/11/07 04:32:32 maya Exp $
+$NetBSD: patch-gcc_config_netbsd-elf.h,v 1.2 2018/11/10 11:45:27 mrg Exp $
Link PIE executables with crtbeginS/crtendS on NetBSD.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87221
+Add NETBSD_SUBTARGET_EXTRA_SPECS and NETBSD_LINK_LD_ELF_SO_SPEC.
--- gcc/config/netbsd-elf.h.orig 2018-01-03 10:03:58.000000000 +0000
-+++ gcc/config/netbsd-elf.h
-@@ -40,8 +40,11 @@ along with GCC; see the file COPYING3.
++++ gcc/config/netbsd-elf.h 2018-11-10 06:47:49.835868835 +0000
+@@ -40,8 +40,11 @@
%{!p:crt0%O%s}}} \
%:if-exists(crti%O%s) \
%{static:%:if-exists-else(crtbeginT%O%s crtbegin%O%s)} \
@@ -20,7 +21,7 @@
#undef STARTFILE_SPEC
#define STARTFILE_SPEC NETBSD_STARTFILE_SPEC
-@@ -52,7 +55,10 @@ along with GCC; see the file COPYING3.
+@@ -52,7 +55,10 @@
C++ file-scope static objects deconstructed after exiting "main". */
#define NETBSD_ENDFILE_SPEC \
@@ -32,3 +33,31 @@
%:if-exists(crtn%O%s)"
#undef ENDFILE_SPEC
+@@ -67,6 +73,9 @@
Home |
Main Index |
Thread Index |
Old Index