pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/gcc10 pull over the rest of netbsd arm32 configur...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0f09be74098e
branches: trunk
changeset: 372949:0f09be74098e
user: mrg <mrg%pkgsrc.org@localhost>
date: Wed Feb 02 22:07:28 2022 +0000
description:
pull over the rest of netbsd arm32 configuration from -current.
fixes PR#56679. (tested in armv7hf-el chroot on armv8, and also tested
doesn't break amd64 version.)
diffstat:
lang/gcc10/distinfo | 11 +-
lang/gcc10/patches/patch-gcc_config.gcc | 39 ++++----
lang/gcc10/patches/patch-gcc_config_arm_arm.h | 45 ++++++++++
lang/gcc10/patches/patch-gcc_config_arm_bpabi.h | 22 +++++
lang/gcc10/patches/patch-gcc_config_arm_elf.h | 14 +++
lang/gcc10/patches/patch-gcc_config_arm_netbsd-eabi.h | 57 +++++++++++++
lang/gcc10/patches/patch-gcc_config_arm_netbsd-elf.h | 80 +++++++++++++++++++
lang/gcc10/patches/patch-libgcc_config.host | 22 +++-
8 files changed, 262 insertions(+), 28 deletions(-)
diffs (truncated from 461 to 300 lines):
diff -r 95e9cdba2017 -r 0f09be74098e lang/gcc10/distinfo
--- a/lang/gcc10/distinfo Wed Feb 02 19:05:23 2022 +0000
+++ b/lang/gcc10/distinfo Wed Feb 02 22:07:28 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2021/10/26 10:51:35 nia Exp $
+$NetBSD: distinfo,v 1.13 2022/02/02 22:07:28 mrg Exp $
BLAKE2s (gcc-10.3.0.tar.xz) = 6d7c42f9386e5e32a3148122471cb207e5f65d7b5f53b3c9adba2d45a4f28715
SHA512 (gcc-10.3.0.tar.xz) = 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
@@ -9,11 +9,16 @@
SHA1 (patch-contrib_download__prerequisites) = 9cdcde21ab174052911447d20762ddfd40aa8791
SHA1 (patch-fixincludes_inclhack.def) = 7b00974d3f52a8364190a607f52a5d7e8a6db41a
SHA1 (patch-gcc_Makefile.in) = c0f97c75ba1d37eae894141edd58bb36b734f651
-SHA1 (patch-gcc_config.gcc) = 4bf07441b6893e9b510f9ad775b4b95aa23e9791
+SHA1 (patch-gcc_config.gcc) = 310b306e58a1a3ec11b5081c6b8de5f75024e281
SHA1 (patch-gcc_config.host) = 8920ce841f6088b365c9b590e3ea9535bd880b40
SHA1 (patch-gcc_config_aarch64_aarch64-builtins.c) = 87185f5c2e2dbe4195cb19fe6213d2d616d5519b
SHA1 (patch-gcc_config_aarch64_aarch64-netbsd.h) = abf19e2445bce1773162bddef16cd7f41eb36827
SHA1 (patch-gcc_config_aarch64_driver-aarch64.c) = 7e17b49924ddd9ff33d049d6539e4df77d14d3e5
+SHA1 (patch-gcc_config_arm_arm.h) = 9d554349869d67d6393552c33a7824f0dd53cb11
+SHA1 (patch-gcc_config_arm_bpabi.h) = 0b0de5ad95442e34397cb46739ef6e36048d6f45
+SHA1 (patch-gcc_config_arm_elf.h) = 57748157084319cb92d892f2ea5b2f3355567551
+SHA1 (patch-gcc_config_arm_netbsd-eabi.h) = 85eb89de6f2e64fac50251f06d7e4eab35903dae
+SHA1 (patch-gcc_config_arm_netbsd-elf.h) = 367d83c808fd7b5b1989d0490b532ad06b425b31
SHA1 (patch-gcc_config_darwin-driver.c) = fd57dcca96ce5ddc330e7c7b3b811f64856d7611
SHA1 (patch-gcc_config_sparc_sparc.c) = e9cb956f3769642bcd0ba4a477d16c73dea46014
SHA1 (patch-gcc_configure) = 6a2d8eeeed2bf08c3c81291178e669dc91c913ce
@@ -23,7 +28,7 @@
SHA1 (patch-isl_configure) = 5523c76d95b229b3cd25461b4c2b7af24bf2534e
SHA1 (patch-libffi_configure) = 22006b20d7f655e2455a7ad613d676703b6c1ccc
SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 27b84a11378fb648dfaad0c70abedd77a0a1c1a8
-SHA1 (patch-libgcc_config.host) = ca62e9ecba9e6efe8b18dfb0d73a2ea47a818bec
+SHA1 (patch-libgcc_config.host) = d40d4d08c807eeff98cc246d1ea756b5b2c749b0
SHA1 (patch-libgcc_crtstuff.c) = a16d465039de00c195cf0694560140a9c38f3a25
SHA1 (patch-libgfortran_io_format.c) = 9bbc5e4f6277bdec785b3690fd08259939a2aa1a
SHA1 (patch-libgfortran_io_io.h) = d44676239a7f45e42054d24bd5224f43c20055c0
diff -r 95e9cdba2017 -r 0f09be74098e lang/gcc10/patches/patch-gcc_config.gcc
--- a/lang/gcc10/patches/patch-gcc_config.gcc Wed Feb 02 19:05:23 2022 +0000
+++ b/lang/gcc10/patches/patch-gcc_config.gcc Wed Feb 02 22:07:28 2022 +0000
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_config.gcc,v 1.2 2021/09/23 09:53:21 adam Exp $
+$NetBSD: patch-gcc_config.gcc,v 1.3 2022/02/02 22:07:28 mrg Exp $
Match what is in NetBSD src. Fixes at least aarch64eb, and
probably several others.
Allow builds on Darwin 21.
---- gcc/config.gcc.orig 2021-04-08 11:56:28.000000000 +0000
-+++ gcc/config.gcc
-@@ -462,6 +462,16 @@ m32r*-*-*)
+--- gcc/config.gcc.orig 2021-04-08 04:56:28.033740243 -0700
++++ gcc/config.gcc 2022-02-02 10:27:44.252878051 -0800
+@@ -462,6 +462,16 @@
cpu_type=m32r
extra_options="${extra_options} g.opt"
;;
@@ -24,7 +24,7 @@
m68k-*-*)
extra_headers=math-68881.h
extra_options="${extra_options} m68k/m68k-tables.opt"
-@@ -691,7 +701,7 @@ case ${target} in
+@@ -691,7 +701,7 @@
*-*-darwin[4-9]* | *-*-darwin1[0-9]*)
macos_min=`expr $darwin_maj - 4`
;;
@@ -33,7 +33,7 @@
# Darwin 20 corresponds to macOS 11.
macos_maj=11
def_ld64=609.0
-@@ -877,6 +887,11 @@ case ${target} in
+@@ -877,6 +887,11 @@
case ${enable_threads} in
"" | yes | posix) thread_file='posix' ;;
esac
@@ -45,7 +45,7 @@
nbsd_tm_file="netbsd.h netbsd-stdint.h netbsd-elf.h"
default_use_cxa_atexit=yes
target_has_targetdm=yes
-@@ -1111,6 +1126,11 @@ aarch64*-*-netbsd*)
+@@ -1111,6 +1126,11 @@
tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.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"
@@ -57,7 +57,7 @@
;;
aarch64*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
-@@ -1252,7 +1272,6 @@ arm*-*-freebsd*) # ARM Fr
+@@ -1252,7 +1272,6 @@
with_tls=${with_tls:-gnu}
;;
arm*-*-netbsdelf*)
@@ -65,18 +65,19 @@
tmake_file="${tmake_file} arm/t-arm"
tm_file="dbxelf.h elfos.h ${nbsd_tm_file} arm/elf.h"
extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
-@@ -1261,26 +1280,33 @@ arm*-*-netbsdelf*)
+@@ -1261,26 +1280,34 @@
esac
case ${target} in
arm*-*-netbsdelf-*eabi*)
- tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h"
- tmake_file="$tmake_file arm/t-bpabi arm/t-netbsdeabi"
+ tm_file="${tm_file} arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h"
-+ # GCC 7 vs NetBSD/eabi -> avoid arm unwinder
+ #tmake_file="$tmake_file arm/t-bpabi"
-+ tmake_file="$tmake_file arm/t-netbsdeabi"
+ # The EABI requires the use of __cxa_atexit.
+ default_use_cxa_atexit=yes
++ # NetBSD native configuration pulls this in, not sure why this must
++ # be here explicitly for pkgsrc.
++ gcc_cv_initfini_array=yes
;;
*)
- tm_file="$tm_file arm/netbsd-elf.h"
@@ -106,7 +107,7 @@
;;
arm*-*-linux-* | arm*-*-uclinuxfdpiceabi)
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"
-@@ -1928,6 +1954,7 @@ i[34567]86-*-netbsdelf*)
+@@ -1928,6 +1955,7 @@
;;
x86_64-*-netbsd*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/x86-64.h i386/netbsd64.h"
@@ -114,7 +115,7 @@
extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
;;
i[34567]86-*-openbsd*)
-@@ -2250,6 +2277,16 @@ ia64*-*-elf*)
+@@ -2250,6 +2278,16 @@
target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
fi
;;
@@ -131,7 +132,7 @@
ia64*-*-freebsd*)
tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
-@@ -2362,8 +2399,25 @@ m68k-*-elf* | fido-*-elf*)
+@@ -2362,8 +2400,25 @@
;;
esac
;;
@@ -158,7 +159,7 @@
default_cf_cpu=5475
tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} m68k/netbsd-elf.h"
extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
-@@ -2503,6 +2557,26 @@ riscv*-*-freebsd*)
+@@ -2503,6 +2558,26 @@
# automatically detect that GAS supports it, yet we require it.
gcc_cv_initfini_array=yes
;;
@@ -185,7 +186,7 @@
mips*-*-netbsd*) # NetBSD/mips, either endian.
target_cpu_default="MASK_ABICALLS"
tm_file="elfos.h ${tm_file} mips/elf.h ${nbsd_tm_file} mips/netbsd.h"
-@@ -2918,11 +2992,24 @@ powerpc*-*-freebsd*)
+@@ -2918,11 +2993,24 @@
;;
esac
;;
@@ -214,7 +215,7 @@
;;
powerpc-*-eabisimaltivec*)
tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h"
-@@ -3394,9 +3481,11 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*
+@@ -3394,9 +3482,11 @@
sparc64-*-netbsd*)
tm_file="sparc/biarch64.h ${tm_file}"
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
@@ -226,7 +227,7 @@
;;
sparc64-*-openbsd*)
tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
-@@ -3911,6 +4000,9 @@ if test x$with_cpu = x ; then
+@@ -3911,6 +4001,9 @@
frv550-*-*linux*)
with_cpu=fr550
;;
@@ -236,7 +237,7 @@
m68k*-*-*)
case "$with_arch" in
"cf")
-@@ -4421,7 +4513,7 @@ case "${target}" in
+@@ -4421,7 +4514,7 @@
esac
;;
diff -r 95e9cdba2017 -r 0f09be74098e lang/gcc10/patches/patch-gcc_config_arm_arm.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc10/patches/patch-gcc_config_arm_arm.h Wed Feb 02 22:07:28 2022 +0000
@@ -0,0 +1,45 @@
+$NetBSD: patch-gcc_config_arm_arm.h,v 1.1 2022/02/02 22:07:28 mrg Exp $
+
+--- gcc/config/arm/arm.h.orig 2021-04-08 04:56:28.057740534 -0700
++++ gcc/config/arm/arm.h 2022-01-31 21:11:39.595024008 -0800
+@@ -937,6 +937,11 @@
+ #define ARM_UNWIND_INFO 0
+ #endif
+
++/* Overriden by config/arm/netbsd-eabi.h. */
++#ifndef ARM_DWARF_UNWIND_TABLES
++#define ARM_DWARF_UNWIND_TABLES 0
++#endif
++
+ /* Use r0 and r1 to pass exception handling information. */
+ #define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? N : INVALID_REGNUM)
+
+@@ -948,11 +953,19 @@
+ #define ARM_TARGET2_DWARF_FORMAT DW_EH_PE_pcrel
+ #endif
+
++#if ARM_DWARF_UNWIND_TABLES
++/* DWARF unwinding uses the normal indirect/pcrel vs absptr format
++ for 32bit platforms. */
++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
++ (flag_pic ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
++ : DW_EH_PE_absptr)
++#else
+ /* ttype entries (the only interesting data references used)
+ use TARGET2 relocations. */
+ #define ASM_PREFERRED_EH_DATA_FORMAT(code, data) \
+ (((code) == 0 && (data) == 1 && ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \
+ : DW_EH_PE_absptr)
++#endif
+
+ /* The native (Norcroft) Pascal compiler for the ARM passes the static chain
+ as an invisible last argument (possible since varargs don't exist in
+@@ -2342,7 +2355,7 @@
+
+ /* -mcpu=native handling only makes sense with compiler running on
+ an ARM chip. */
+-#if defined(__arm__)
++#if defined(__arm__) && defined(__linux__)
+ extern const char *host_detect_local_cpu (int argc, const char **argv);
+ #define HAVE_LOCAL_CPU_DETECT
+ # define MCPU_MTUNE_NATIVE_FUNCTIONS \
diff -r 95e9cdba2017 -r 0f09be74098e lang/gcc10/patches/patch-gcc_config_arm_bpabi.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc10/patches/patch-gcc_config_arm_bpabi.h Wed Feb 02 22:07:28 2022 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-gcc_config_arm_bpabi.h,v 1.1 2022/02/02 22:07:28 mrg Exp $
+
+--- gcc/config/arm/bpabi.h.orig 2021-04-08 04:56:28.061740583 -0700
++++ gcc/config/arm/bpabi.h 2022-01-31 21:13:16.734263818 -0800
+@@ -24,6 +24,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ /* Use the AAPCS ABI by default. */
++#undef ARM_DEFAULT_ABI
+ #define ARM_DEFAULT_ABI ARM_ABI_AAPCS
+
+ /* Assume that AAPCS ABIs should adhere to the full BPABI. */
+@@ -107,7 +108,9 @@
+ /* The BPABI specifies the use of .{init,fini}_array. Therefore, we
+ do not want GCC to put anything into the .{init,fini} sections. */
+ #undef INIT_SECTION_ASM_OP
++#define INIT_SECTION_ASM_OP ""
+ #undef FINI_SECTION_ASM_OP
++#define FINI_SECTION_ASM_OP ""
+ #define INIT_ARRAY_SECTION_ASM_OP ARM_EABI_CTORS_SECTION_OP
+ #define FINI_ARRAY_SECTION_ASM_OP ARM_EABI_DTORS_SECTION_OP
+
diff -r 95e9cdba2017 -r 0f09be74098e lang/gcc10/patches/patch-gcc_config_arm_elf.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc10/patches/patch-gcc_config_arm_elf.h Wed Feb 02 22:07:28 2022 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-gcc_config_arm_elf.h,v 1.1 2022/02/02 22:07:28 mrg Exp $
+
+--- gcc/config/arm/elf.h.orig 2021-04-08 04:56:28.065740630 -0700
++++ gcc/config/arm/elf.h 2022-01-31 21:14:04.684223580 -0800
+@@ -147,6 +147,8 @@
+ #undef L_floatdidf
+ #undef L_floatdisf
+ #undef L_floatundidf
++/* XXXMRG: don't take this out, we need it! */
++# ifndef __NetBSD__
+ #undef L_floatundisf
++# endif
+ #endif
+-
diff -r 95e9cdba2017 -r 0f09be74098e lang/gcc10/patches/patch-gcc_config_arm_netbsd-eabi.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc10/patches/patch-gcc_config_arm_netbsd-eabi.h Wed Feb 02 22:07:28 2022 +0000
@@ -0,0 +1,57 @@
+$NetBSD: patch-gcc_config_arm_netbsd-eabi.h,v 1.1 2022/02/02 22:07:28 mrg Exp $
+
+--- gcc/config/arm/netbsd-eabi.h.orig 2021-04-08 04:56:28.065740630 -0700
++++ gcc/config/arm/netbsd-eabi.h 2022-01-31 21:15:29.555403989 -0800
+@@ -49,8 +49,8 @@
+
+ #undef ARM_UNWIND_INFO
+ #define ARM_UNWIND_INFO 0
+-#undef DWARF2_UNWIND_INFO
+-#define DWARF2_UNWIND_INFO 1
++#undef ARM_DWARF_UNWIND_TABLES
++#define ARM_DWARF_UNWIND_TABLES 1
+
+ #undef TARGET_OS_CPP_BUILTINS
+ #define TARGET_OS_CPP_BUILTINS() \
Home |
Main Index |
Thread Index |
Old Index