pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/gcc10 pull in fixes for arm64eb from netbsd src.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/49b957047a5e
branches:  trunk
changeset: 451066:49b957047a5e
user:      mrg <mrg%pkgsrc.org@localhost>
date:      Sat Apr 24 09:35:31 2021 +0000

description:
pull in fixes for arm64eb from netbsd src.

diffstat:

 lang/gcc10/distinfo                                          |    5 +-
 lang/gcc10/patches/patch-gcc_config.gcc                      |  236 +++++++++++
 lang/gcc10/patches/patch-gcc_config_aarch64_aarch64-netbsd.h |   18 +
 lang/gcc10/patches/patch-gcc_config_aarch64_driver-aarch64.c |  184 ++++++++
 4 files changed, 442 insertions(+), 1 deletions(-)

diffs (truncated from 471 to 300 lines):

diff -r 209fb8050763 -r 49b957047a5e lang/gcc10/distinfo
--- a/lang/gcc10/distinfo       Sat Apr 24 08:47:53 2021 +0000
+++ b/lang/gcc10/distinfo       Sat Apr 24 09:35:31 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2021/04/16 15:03:42 ryoon Exp $
+$NetBSD: distinfo,v 1.8 2021/04/24 09:35:31 mrg Exp $
 
 SHA1 (gcc-10.3.0.tar.xz) = fb51ed1660c065898c75951fb38e1ebad7d49feb
 RMD160 (gcc-10.3.0.tar.xz) = 8edb715cf1159fd8de773d0d5208d2e83ca36402
@@ -11,8 +11,11 @@
 SHA1 (patch-contrib_download__prerequisites) = 9cdcde21ab174052911447d20762ddfd40aa8791
 SHA1 (patch-fixincludes_inclhack.def) = 7b00974d3f52a8364190a607f52a5d7e8a6db41a
 SHA1 (patch-gcc_Makefile.in) = c0f97c75ba1d37eae894141edd58bb36b734f651
+SHA1 (patch-gcc_config.gcc) = 6523fd234687e13abd54009a770f1c0acbcd62c7
 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_sparc_sparc.c) = e9cb956f3769642bcd0ba4a477d16c73dea46014
 SHA1 (patch-gcc_configure) = 6a2d8eeeed2bf08c3c81291178e669dc91c913ce
 SHA1 (patch-gcc_ggc-common.c) = 3e325767922ab7d2079fdb9a3d6b6aa531a2fea5
diff -r 209fb8050763 -r 49b957047a5e lang/gcc10/patches/patch-gcc_config.gcc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc10/patches/patch-gcc_config.gcc   Sat Apr 24 09:35:31 2021 +0000
@@ -0,0 +1,236 @@
+$NetBSD: patch-gcc_config.gcc,v 1.1 2021/04/24 09:35:31 mrg Exp $
+
+Match what is in NetBSD src.  Fixes at least aarch64eb, and
+probably several others.
+
+--- gcc/config.gcc.orig        2021-04-08 04:56:28.033740243 -0700
++++ gcc/config.gcc     2021-04-24 00:16:20.082096330 -0700
+@@ -462,6 +462,16 @@
+         cpu_type=m32r
+       extra_options="${extra_options} g.opt"
+         ;;
++m5200-*-*|m5407-*-*)
++      cpu_type=m68k
++      extra_headers=math-68881.h
++      extra_options="${extra_options} m68k/m68k-tables.opt"
++      ;;
++m680[012]0-*-*)
++      cpu_type=m68k
++      extra_headers=math-68881.h
++      extra_options="${extra_options} m68k/m68k-tables.opt"
++      ;;
+ m68k-*-*)
+       extra_headers=math-68881.h
+       extra_options="${extra_options} m68k/m68k-tables.opt"
+@@ -877,6 +887,11 @@
+   case ${enable_threads} in
+     "" | yes | posix) thread_file='posix' ;;
+   esac
++  case ${target} in
++    arm*-* | i[34567]86-* | powerpc*-* | sparc*-* | x86_64-*)
++      default_gnu_indirect_function=yes
++      ;;
++  esac
+   nbsd_tm_file="netbsd.h netbsd-stdint.h netbsd-elf.h"
+   default_use_cxa_atexit=yes
+   target_has_targetdm=yes
+@@ -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"
++      case $target in
++      aarch64_be-*)
++              tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++              ;;
++      esac
+       ;;
+ aarch64*-*-linux*)
+       tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
+@@ -1252,7 +1272,6 @@
+       with_tls=${with_tls:-gnu}
+       ;;
+ arm*-*-netbsdelf*)
+-      target_cpu_cname="strongarm"
+       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 @@
+       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
+           ;;
+       *)
+-          tm_file="$tm_file arm/netbsd-elf.h"
++          tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h"
++          #tmake_file="$tmake_file arm/t-bpabi arm/t-netbsdeabi"
+           tmake_file="$tmake_file arm/t-netbsd"
+           ;;
+       esac
+       tm_file="${tm_file} arm/aout.h arm/arm.h"
+       case ${target} in
+       arm*-*-netbsdelf-*eabihf*)
+-          # Hard-float requires at least Arm v5te
+-          target_cpu_cname="arm10e"
+           tm_defines="${tm_defines} TARGET_DEFAULT_FLOAT_ABI=ARM_FLOAT_ABI_HARD"
+           ;;
+       esac
+       case ${target} in
+-      armv6*) target_cpu_cname="arm1176jzf-s";;
+-      armv7*) target_cpu_cname="generic-armv7-a";;
++      armv4*) with_cpu=${with_cpu:-strongarm};;
++      armv6*) with_cpu=${with_cpu:-arm1176jzf-s};;
++      armv7*) with_cpu=${with_cpu:-cortex-a8};;
++      arm*eabihf*) with_cpu=${with_cpu:-arm10e};;
++      arm*) with_cpu=${with_cpu:-arm9e};;
+       esac
++      target_cpu_cname="$with_cpu"
+       ;;
+ 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 @@
+       ;;
+ 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"
++      tmake_file="${tmake_file} i386/t-netbsd64"
+       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+       ;;
+ i[34567]86-*-openbsd*)
+@@ -2250,6 +2277,16 @@
+               target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
+       fi
+       ;;
++ia64*-*-netbsd*)
++      tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} ia64/sysv4.h ia64/netbsd.h"
++      target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
++      tmake_file="${tmake_file} ia64/t-ia64"
++      if test x$with_system_libunwind != xyes ; then
++              tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
++      fi
++      extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
++      extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
++      ;;
+ 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 @@
+               ;;
+       esac
+       ;;
+-m68k*-*-netbsdelf*)
++m68010-*-netbsdelf* | m68k-*-netbsdelf* | m5407-*-netbsdelf*)
+       default_m68k_cpu=68020
++      case ${target} in
++      m5407*)
++              with_arch=${with_arch:-cf}
++              target_cpu_default="mcf5475"
++#             target="`echo ${target} | sed 's/m68kcf/m68k/'`"
++              ;;
++      m68010*)
++              target_cpu_default="m68010"
++              tmake_file="${tmake_file} m68k/t-m68kelf m68k/t-m68010-netbsd"
++              default_m68k_cpu=68010
++              tmake_file="${tmake_file} m68k/t-floatlib"
++              ;;
++      *)
++              with_arch=${with_arch:-m68k}
++              tmake_file="${tmake_file} m68k/t-floatlib"
++              ;;
++      esac
+       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 @@
+       # automatically detect that GAS supports it, yet we require it.
+       gcc_cv_initfini_array=yes
+       ;;
++riscv*-*-netbsd*)                     # NetBSD RISC-V
++      tm_file="elfos.h ${tm_file} ${nbsd_tm_file} riscv/netbsd.h"
++      tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
++      case ${target} in
++        riscv32*) tm_defines="${tm_defines} TARGET_64BIT_DEFAULT=0" ;;
++        *) tmake_file="${tmake_file} riscv/t-netbsd64" ;;
++      esac
++      extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
++      tmake_file="${tmake_file} riscv/t-riscv"
++      gnu_ld=yes
++      gas=yes
++      gcc_cv_initfini_array=yes
++      ;;
++mips64*-*-netbsd*)                    # NetBSD/mips64, either endian.
++      target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_SOFT_FLOAT_ABI"
++      tm_file="elfos.h ${tm_file} mips/elf.h ${nbsd_tm_file} mips/netbsd.h mips/netbsd64.h"
++      tmake_file="${tmake_file} mips/t-netbsd64"
++      tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
++      extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
++      ;;
+ 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 @@
+               ;;
+       esac
+       ;;
+-powerpc-*-netbsd*)
+-      tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${nbsd_tm_file} freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
++powerpc*-*-netbsd*)
++      tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${nbsd_tm_file} freebsd-spec.h"
++      case ${target} in
++          powerpc64*)
++              tm_file="rs6000/biarch64.h ${tm_file}"
++              tm_file="${tm_file} rs6000/sysv4.h rs6000/default64.h rs6000/netbsd64.h"
++              tmake_file="${tmake_file} rs6000/t-netbsd64"
++              ;;
++          *)
++              tm_file="${tm_file} rs6000/sysv4.h rs6000/netbsd.h"
++              tmake_file="${tmake_file} rs6000/t-netbsd"
++              ;;
++      esac
+       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+-      tmake_file="${tmake_file} rs6000/t-netbsd"
+-      extra_options="${extra_options} rs6000/sysv4.opt"
++      extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
++      if test x${enable_secureplt} != xno; then
++          tm_file="rs6000/secureplt.h ${tm_file}"
++      fi
+       ;;
+ 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-*-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"
++      tm_file="${tm_file} sparc/default64.h"
+       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"
++      with_cpu=ultrasparc
+       ;;
+ 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 @@
+     frv550-*-*linux*)
+       with_cpu=fr550
+       ;;
++    m5200-*-*|m5407-*-*)
++      with_cpu=${default_cf_cpu}
++      ;;
+     m68k*-*-*)
+       case "$with_arch" in
+       "cf")
+@@ -4421,7 +4513,7 @@
+               esac
+               ;;
+ 
+-      fido-*-* | m68k*-*-*)
++      fido-*-* | m68k*-*-* | m5200-*-* | m5407-*-*)
+               supported_defaults="arch cpu"
+               case "$with_arch" in
+               "" | "m68k"| "cf")
diff -r 209fb8050763 -r 49b957047a5e lang/gcc10/patches/patch-gcc_config_aarch64_aarch64-netbsd.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc10/patches/patch-gcc_config_aarch64_aarch64-netbsd.h      Sat Apr 24 09:35:31 2021 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-gcc_config_aarch64_aarch64-netbsd.h,v 1.1 2021/04/24 09:35:31 mrg Exp $
+
+Match what is in NetBSD src.  Fixes at least aarch64eb, and
+probably several others.
+
+--- gcc/config/aarch64/aarch64-netbsd.h.orig   2021-04-08 04:56:28.033740243 -0700
++++ gcc/config/aarch64/aarch64-netbsd.h        2021-04-24 00:16:41.451665444 -0700
+@@ -20,6 +20,10 @@
+ #ifndef GCC_AARCH64_NETBSD_H
+ #define GCC_AARCH64_NETBSD_H
+ 
++/* NetBSD malloc(3) does 64, not 128 bytes. */
++#undef MALLOC_ABI_ALIGNMENT
++#define MALLOC_ABI_ALIGNMENT  64
++
+ #define TARGET_LINKER_BIG_EMULATION "aarch64nbsdb"
+ #define TARGET_LINKER_LITTLE_EMULATION "aarch64nbsd"
+ 
diff -r 209fb8050763 -r 49b957047a5e lang/gcc10/patches/patch-gcc_config_aarch64_driver-aarch64.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc10/patches/patch-gcc_config_aarch64_driver-aarch64.c      Sat Apr 24 09:35:31 2021 +0000
@@ -0,0 +1,184 @@
+$NetBSD: patch-gcc_config_aarch64_driver-aarch64.c,v 1.1 2021/04/24 09:35:31 mrg Exp $
+
+Match what is in NetBSD src.  Fixes at least aarch64eb, and
+probably several others.
+
+--- gcc/config/aarch64/driver-aarch64.c.orig   2021-04-08 04:56:28.041740341 -0700
++++ gcc/config/aarch64/driver-aarch64.c        2021-04-24 00:16:45.471750258 -0700
+@@ -25,6 +25,7 @@
+ #include "system.h"
+ #include "coretypes.h"
+ #include "tm.h"
++#include "diagnostic-core.h"
+ 



Home | Main Index | Thread Index | Old Index