gcc10-aux has been rebased on gcc10 from -current.
gcc6-aux has been made into an explicit dependency so as to
not rely on the pkgsrc infra. Therefore, USE_LANGUAGES = ada
has been dropped.
pkglint errors have been fixed, mainly renaming and documentation
of packages.
Further fixes to buildlink3.mk and to the Makefile may be needed.
-The GNU Compiler Collection (GCC) includes front ends for C, C++, Objective-C,
-Fortran, and Go.
+The GNU Compiler Collection (GCC) with Ada support. Includes front ends for Ada,
+C, C++ and Fortran.
-# $NetBSD: Makefile,v 1.10 2021/04/22 12:08:16 adam Exp $
+# $NetBSD: Makefile,v 1.14 2021/10/12 13:46:14 tnn Exp $
-GCC_PKGNAME= gcc10
+GCC_PKGNAME= gcc10-aux
+PKGREVISION= 1
.include "version.mk"
DISTNAME= gcc-${GCC10_DIST_VERSION}
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC10_DIST_VERSION}/}
EXTRACT_SUFX= .tar.xz
-MAINTAINER= pkgsrc-users@NetBSD.org
+MAINTAINER= irvise@irvise.xyz
HOMEPAGE= https://gcc.gnu.org/
-COMMENT= The GNU Compiler Collection (GCC) - 10.0 Release Series
+COMMENT= The GNU Compiler Collection (GCC) with Ada support v10
LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
DISTFILES= ${DEFAULT_DISTFILES}
EXTRACT_ONLY= ${DEFAULT_DISTFILES}
+# Relocations result in a linker error on AArch64, but not x86.
+MKPIE_SUPPORTED= no
+
NOT_FOR_PLATFORM= Interix-*-*
-USE_LANGUAGES= c99 c++ ada
-USE_TOOLS+= gmake makeinfo sed:run tar:build
+USE_LANGUAGES= c99 c++
+USE_TOOLS+= gcc6-aux gmake makeinfo sed:run tar:build
USE_TOOLS.NetBSD+= gsed
GNU_CONFIGURE= yes
MAKE_ENV.NetBSD+= ac_cv_func_uselocale=no
MAKE_ENV.SunOS+= ac_cv_func_mkostemp=no
-CONFIGURE_ARGS.DragonFly+= --disable-bootstrap
+.if !empty(PKGSRC_COMPILER:Mclang) || ${OPSYS} == "DragonFly"
+CONFIGURE_ARGS+= --disable-bootstrap
+CHECK_RELRO_SKIP+= ${GCC_PKGNAME}/lib/*
+.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386)
CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486
GENERATE_PLIST+= \
cd ${DESTDIR}${PREFIX} && \
- ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT};
+ ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT}
+# Add gcc6-aux as an explicit dependency. It is needed to bootstrap.
+.include "../../lang/gcc6-aux/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
BUILDLINK_API_DEPENDS.gcc10+= gcc10>=${_GCC_REQD}
BUILDLINK_ABI_DEPENDS.gcc10+= gcc10>=10.0
-BUILDLINK_PKGSRCDIR.gcc10= ../../lang/gcc10
+BUILDLINK_PKGSRCDIR.gcc10= ../../wip/gcc10-aux
BUILDLINK_DEPMETHOD.gcc10?= build
BUILDLINK_PASSTHRU_DIRS+= ${BUILDLINK_PREFIX.gcc10}/gcc10
-$NetBSD$
+$NetBSD: distinfo,v 1.12 2021/10/26 10:51:35 nia Exp $
-SHA1 (gcc-10.3.0.tar.xz) = fb51ed1660c065898c75951fb38e1ebad7d49feb
RMD160 (gcc-10.3.0.tar.xz) = 8edb715cf1159fd8de773d0d5208d2e83ca36402
+BLAKE2s (gcc-10.3.0.tar.xz) = 6d7c42f9386e5e32a3148122471cb207e5f65d7b5f53b3c9adba2d45a4f28715
SHA512 (gcc-10.3.0.tar.xz) = 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
Size (gcc-10.3.0.tar.xz) = 76692288 bytes
-SHA1 (isl-0.16.1.tar.bz2) = c5a2b201bf05229647e73203c0bf2d9679d4d21f
RMD160 (isl-0.16.1.tar.bz2) = 5a99db3fe0d0a1f6bbac1ed4448f2403495c55b2
+BLAKE2s (isl-0.16.1.tar.bz2) = 01c3fc657326e81414986eb7ede6f73e540b97009745ced125cdf7f4a8d80f61
SHA512 (isl-0.16.1.tar.bz2) = c188667a84dc5bdddb4ab7c35f89c91bf15a8171f4fcaf41301cf285fb7328846d9a367c096012fec4cc69d244f0bc9e95d84c09ec097394cd4093076f2a041b
Size (isl-0.16.1.tar.bz2) = 1626446 bytes
-SHA1 (patch-ada_adaint.c) = a6a0cca403676f767a1177a36f2e6f508984147c
-SHA1 (patch-ada_adaint.h) = c6f4822ec5599b4faebf5fe072d521407b871c6e
-SHA1 (patch-ada_configure) = 70ba7ec19a72bda7d4ff0cf0d36db4f50432baff
-SHA1 (patch-ada_configure.ac) = 0ee07e9e169a391e4e080757ca1494eed4325dd6
-SHA1 (patch-ada_cstreams.c) = 551d6b84eeb539e74d6a32df16c7ff27a8fbb4eb
-SHA1 (patch-ada_g-socthi.ads) = 25b7a2831a4d319250eb1627aa20b410eb844434
-SHA1 (patch-ada_g-socthi__bsd.adb) = 3471d97d775c37d33ac9b668c083f5577afcb7d8
-SHA1 (patch-ada_makefile.rtl) = 98e3167b5ee6ef63539403d47ca3f39f2314d3f9
-SHA1 (patch-ada_netbsd-symbols) = da3d9c627b71d79bdd38ffd8804edd990ee4b652
-SHA1 (patch-ada_s-oscons-tmplt.c) = dce4ceb3359e323ece8bee637c60ce53b14b5ab0
-SHA1 (patch-ada_s-osinte__netbsd.adb) = 8316d58c868e977d50cd1e5409ed52956c5d6ed9
-SHA1 (patch-ada_s-osinte__netbsd.ads) = 33fa950179a4356c0a91ccd4dfe9cadbce15b9bf
-SHA1 (patch-ada_s-osprim__posix.adb) = 81ed2c90dde6bfedf244cd897d4da051f5a06670
-SHA1 (patch-ada_s-taprop__posix.adb) = 34f8525d577091322b49e4effa24de62059d22d4
-SHA1 (patch-ada_sysdep.c) = d77db0600b77668bb754c9bb9dd3a5fab4962fb7
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_ada_Makefile.rtl) = 1b6a18dce5ffe752be942f6e328d487692f3b33a
+SHA1 (patch-gcc_ada_adaint.c) = 465b3e3d6db193b2729f1d4e1c74eefcc3dc85bf
+SHA1 (patch-gcc_ada_adaint.h) = 57befa67b18f97345db05672f1e53e8ec70e1935
+SHA1 (patch-gcc_ada_cstreams.c) = 047746f1da085917082dafe8b87fdc5e757e1237
+SHA1 (patch-gcc_ada_libgnarl_s-osinte____netbsd.adb) = 84268061686b15a8ef9013242e3d258b82b9f13e
+SHA1 (patch-gcc_ada_libgnarl_s-osinte____netbsd.ads) = 2d1179230289a243bb004b9f16c747cda9761b60
+SHA1 (patch-gcc_ada_libgnarl_s-taprop____posix.adb) = 505d0ba78a21a8a6cc6213a9809c44c284fe2334
+SHA1 (patch-gcc_ada_libgnat_g-socthi.ads) = e2fbc2589814aa630165d3cf4ddc15baf9dce1c9
+SHA1 (patch-gcc_ada_libgnat_g-socthi____bsd.adb) = cbc8aca2b0be1c183cffb0a93091a95b35d78abd
+SHA1 (patch-gcc_ada_libgnat_s-osprim____posix.adb) = 018dce870dd06febeb83719149f10e469c4bcc00
+SHA1 (patch-gcc_ada_s-oscons-tmplt.c) = a48b5ae3c061144b8406e27cbbc084385fef5131
+SHA1 (patch-gcc_ada_sysdep.c) = 5b8705680ee1a2c9c2686d14d4cbbba8c5fb4fb2
+SHA1 (patch-gcc_config.gcc) = 4bf07441b6893e9b510f9ad775b4b95aa23e9791
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_darwin-driver.c) = fd57dcca96ce5ddc330e7c7b3b811f64856d7611
SHA1 (patch-gcc_config_sparc_sparc.c) = e9cb956f3769642bcd0ba4a477d16c73dea46014
SHA1 (patch-gcc_configure) = 6a2d8eeeed2bf08c3c81291178e669dc91c913ce
SHA1 (patch-gcc_ggc-common.c) = 3e325767922ab7d2079fdb9a3d6b6aa531a2fea5
SHA1 (patch-gcc_lto_lto.c) = 7bd85ac8ade76a28c394f6fbe5d495f91824f79f
SHA1 (patch-gcc_targhooks.c) = b28d8a9696d07bbfb00b7d8c55193ba99447ff1d
+SHA1 (patch-gnattools_configure) = aa6181ee8723a1199d84acea1331645205b558cc
SHA1 (patch-isl_configure) = 5523c76d95b229b3cd25461b4c2b7af24bf2534e
SHA1 (patch-libffi_configure) = 22006b20d7f655e2455a7ad613d676703b6c1ccc
SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 27b84a11378fb648dfaad0c70abedd77a0a1c1a8
-# $NetBSD: options.mk,v 1.1 2020/05/10 15:02:44 maya Exp $
+# $NetBSD: options.mk,v 1.2 2021/10/01 11:56:13 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.${GCC_PKGNAME}
-
-###
-### MODIFIED BY FERNANDO OLEO BLANCO 13/05/21
-### Added Ada support
-###
-
-PKG_SUPPORTED_OPTIONS= nls gcc-inplace-math gcc-c++ gcc-fortran \
+PKG_SUPPORTED_OPTIONS= nls gcc-inplace-math gcc-c++ gcc-fortran gcc-ada \
gcc-go gcc-objc gcc-objc++ gcc-graphite \
- always-libgcc gcc-ada
-PKG_SUGGESTED_OPTIONS= gcc-ada \
- gcc-graphite gcc-inplace-math \
- gcc-c++ gcc-fortran
- # gcc-objc gcc-objc++ \
+ always-libgcc
+PKG_SUGGESTED_OPTIONS= gcc-ada gcc-c++ gcc-fortran \
+ gcc-graphite gcc-inplace-math
.if ${OPSYS} == "NetBSD"
PKG_SUGGESTED_OPTIONS+= nls
###
### Optional languages
-### Ada could be added although there is a bootstrapping issue. See
-### ../gcc34-ada for guidance
###
+.if !empty(PKG_OPTIONS:Mgcc-ada)
+LANGS+= ada
+USE_TOOLS+= perl
+.endif
+
.if !empty(PKG_OPTIONS:Mgcc-objc++)
. if empty(PKG_OPTIONS:Mgcc-c++)
PKG_OPTIONS+= gcc-c++
LANGS+= fortran
.endif
-.if !empty(PKG_OPTIONS:Mgcc-ada)
-LANGS+= ada
-.endif
-
.if !empty(PKG_OPTIONS:Mgcc-c++)
LANGS+= c++
USE_TOOLS+= perl
+++ /dev/null
---- gnattools/configure.ac.orig 2021-08-28 14:58:27.669166093 +0000
-+++ gnattools/configure.ac 2021-08-28 14:59:57.168648867 +0000
-@@ -80,6 +80,11 @@
- mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
- indepsw.adb<indepsw-gnu.adb"
- ;;
-+ *-*-netbsd*)
-+ TOOLS_TARGET_PAIRS="\
-+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
-+ indepsw.adb<indepsw-gnu.adb"
-+ ;;
- *-*-linux*)
- TOOLS_TARGET_PAIRS="\
- mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
+++ /dev/null
---- gcc/ada/libgnat/s-osprim__posix.adb.orig 2021-08-30 15:32:58.056688539 +0000
-+++ gcc/ada/libgnat/s-osprim__posix.adb 2021-08-30 15:35:17.972574099 +0000
-@@ -47,7 +47,7 @@
- pragma Convention (C, timespec);
-
- function nanosleep (rqtp, rmtp : not null access timespec) return Integer;
-- pragma Import (C, nanosleep, "nanosleep");
-+ pragma Import (C, nanosleep, "__nanosleep50");
-
- -----------
- -- Clock --
-@@ -77,7 +77,7 @@
- function gettimeofday
- (Tv : access timeval;
- Tz : System.Address := System.Null_Address) return Integer;
-- pragma Import (C, gettimeofday, "gettimeofday");
-+ pragma Import (C, gettimeofday, "__gettimeofday50");
-
- begin
- -- The return codes for gettimeofday are as follows (from man pages):
+$NetBSD$
+
+Add NetBSD as a target and generate the required files correctly.
+
--- gcc/ada/Makefile.rtl.orig 2021-04-08 13:56:27.725736525 +0200
+++ gcc/ada/Makefile.rtl 2021-10-09 18:43:45.974586137 +0200
@@ -1739,6 +1739,131 @@
+$NetBSD$
+
+NetBSD does not use symbol versioning, which requires some functions
+to be preprocessed in C. This patch adds those functions definitions,
+not only for NetBSD, but for any other system too.
+
--- gcc/ada/adaint.c.orig 2021-04-08 13:56:27.725736525 +0200
+++ gcc/ada/adaint.c 2021-10-09 17:27:52.413919872 +0200
@@ -817,7 +817,8 @@
+ return nanosleep (rqtp, rmtp);
+}
+int
-+__gnat_gettimeofday (struct timeval * tp, void * tzp) {
++__gnat_gettimeofday (struct timeval * tp, struct timezone * tzp) {
+ return gettimeofday (tp, tzp);
+}
+
+$NetBSD$
+
+Due to the lack of symbol versioning in NetBSD, some functions need
+to be exported from C to be used correctly. This patch addresses
+that issue and makes sure that other systems also work correclty.
+
--- gcc/ada/adaint.h.orig 2021-10-09 19:21:39.117755578 +0200
+++ gcc/ada/adaint.h 2021-10-09 19:02:38.871872061 +0200
@@ -345,6 +345,28 @@
+#endif
+#include <time.h>
+extern int __gnat_nanosleep (const struct timespec *, struct timespec *);
-+extern int __gnat_gettimeofday (struct timeval *, void *);
++extern int __gnat_gettimeofday (struct timeval *, struct timezone *);
+#include <sys/select.h>
+extern int __gnat_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
+#include <sys/socket.h>
+$NetBSD$
+
+Add missing defines
+
--- gcc/ada/cstreams.c.orig 2021-08-28 18:42:21.323680378 +0000
+++ gcc/ada/cstreams.c 2021-08-28 18:43:48.045445919 +0000
@@ -188,7 +188,8 @@
+$NetBSD$
+
+Add NetBSD interface.
+
--- gcc/ada/libgnarl/s-osinte__netbsd.adb.orig 2021-10-08 11:29:30.470090202 +0200
+++ gcc/ada/libgnarl/s-osinte__netbsd.adb 2021-10-08 11:29:30.472274837 +0200
@@ -0,0 +1,140 @@
+$NetBSD$
+
+Add NetBSD interface.
+
--- gcc/ada/libgnarl/s-osinte__netbsd.ads.orig 2021-10-08 11:29:30.503927461 +0200
+++ gcc/ada/libgnarl/s-osinte__netbsd.ads 2021-10-09 18:31:14.947869872 +0200
@@ -0,0 +1,663 @@
+$NetBSD$
+
+When using SCHED_OTHER, the minimum and maximum in NetBSD is -1.
+In most other OSs it is 0. Change the behaviour to try to set the
+params using the default priority, if that fails, use 0, otherwise
+use -1. If none are valid, the tasking system will fail if assertions
+are on.
+
--- gcc/ada/libgnarl/s-taprop__posix.adb.orig 2021-09-23 19:55:24.471842046 +0000
+++ gcc/ada/libgnarl/s-taprop__posix.adb 2021-09-23 20:01:31.689253592 +0000
@@ -654,6 +654,16 @@
+$NetBSD$
+
+Fix symbol to make it use the C processed one.
+
--- gcc/ada/libgnat/g-socthi.ads.orig 2021-10-09 18:09:40.607907149 +0200
+++ gcc/ada/libgnat/g-socthi.ads 2021-10-09 18:24:39.373733909 +0200
@@ -53,8 +53,6 @@
+$NetBSD$
+
+Create a g-socthi package that is common to all *BSD systems.
+
--- /dev/null 2021-10-09 18:50:23.845256363 +0200
+++ gcc/ada/libgnat/g-socthi__bsd.adb 2021-10-09 18:07:08.069557825 +0200
@@ -0,0 +1,356 @@
+$NetBSD$
+
+Use C preprocessed symbols.
+
--- gcc/ada/libgnat/s-osprim__posix.adb.orig 2021-10-09 19:24:46.671910328 +0200
+++ gcc/ada/libgnat/s-osprim__posix.adb 2021-10-09 19:28:33.938823233 +0200
@@ -47,7 +47,7 @@
pragma Convention (C, timespec);
function nanosleep (rqtp, rmtp : not null access timespec) return Integer;
-- pragma Import (C, nanosleep, "__nanosleep50");
+- pragma Import (C, nanosleep, "nanosleep");
+ pragma Import (C, nanosleep, "__gnat_nanosleep");
-----------
function gettimeofday
(Tv : access timeval;
Tz : System.Address := System.Null_Address) return Integer;
-- pragma Import (C, gettimeofday, "__gettimeofday50");
+- pragma Import (C, gettimeofday, "gettimeofday");
+ pragma Import (C, gettimeofday, "__gnat_gettimeofday");
begin
+$NetBSD$
+
+Add NetBSD to some defined parts and bump the version of
+_XOPEN_SOURCE and add _NETBSD_SOURCE.
+
--- gcc/ada/s-oscons-tmplt.c.orig 2021-04-08 13:56:27.913738795 +0200
+++ gcc/ada/s-oscons-tmplt.c 2021-10-09 18:26:07.630440685 +0200
@@ -86,16 +86,25 @@
+$NetBSD$
+
+Add NetBSD to some defined sections.
+
--- gcc/ada/sysdep.c.orig 2021-08-28 13:11:25.681014624 +0000
+++ gcc/ada/sysdep.c 2021-08-28 13:21:14.748176113 +0000
@@ -320,7 +320,7 @@
-$NetBSD: patch-gcc_config.gcc,v 1.1 2021/04/24 09:35:31 mrg Exp $
+$NetBSD: patch-gcc_config.gcc,v 1.2 2021/09/23 09:53:21 adam Exp $
-Match what is in NetBSD src. Fixes at least aarch64eb, and
+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 @@
+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*-*-*)
cpu_type=m32r
extra_options="${extra_options} g.opt"
;;
m68k-*-*)
extra_headers=math-68881.h
extra_options="${extra_options} m68k/m68k-tables.opt"
-@@ -877,6 +887,11 @@
+@@ -691,7 +701,7 @@ case ${target} in
+ *-*-darwin[4-9]* | *-*-darwin1[0-9]*)
+ macos_min=`expr $darwin_maj - 4`
+ ;;
+- *-*-darwin20*)
++ *-*-darwin2[01]*)
+ # Darwin 20 corresponds to macOS 11.
+ macos_maj=11
+ def_ld64=609.0
+@@ -877,6 +887,11 @@ case ${target} in
case ${enable_threads} in
"" | yes | posix) thread_file='posix' ;;
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 @@
+@@ -1111,6 +1126,11 @@ aarch64*-*-netbsd*)
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"
;;
aarch64*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
-@@ -1252,7 +1272,6 @@
+@@ -1252,7 +1272,6 @@ arm*-*-freebsd*) # ARM Fr
with_tls=${with_tls:-gnu}
;;
arm*-*-netbsdelf*)
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 @@
+@@ -1261,26 +1280,33 @@ arm*-*-netbsdelf*)
esac
case ${target} in
arm*-*-netbsdelf-*eabi*)
;;
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 @@
+@@ -1928,6 +1954,7 @@ i[34567]86-*-netbsdelf*)
;;
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"
extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
;;
i[34567]86-*-openbsd*)
-@@ -2250,6 +2277,16 @@
+@@ -2250,6 +2277,16 @@ ia64*-*-elf*)
target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
fi
;;
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 @@
+@@ -2362,8 +2399,25 @@ m68k-*-elf* | fido-*-elf*)
;;
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 @@
+@@ -2503,6 +2557,26 @@ riscv*-*-freebsd*)
# automatically detect that GAS supports it, yet we require it.
gcc_cv_initfini_array=yes
;;
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 @@
+@@ -2918,11 +2992,24 @@ powerpc*-*-freebsd*)
;;
esac
;;
;;
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 @@
+@@ -3394,9 +3481,11 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*
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"
;;
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 @@
+@@ -3911,6 +4000,9 @@ if test x$with_cpu = x ; then
frv550-*-*linux*)
with_cpu=fr550
;;
m68k*-*-*)
case "$with_arch" in
"cf")
-@@ -4421,7 +4513,7 @@
+@@ -4421,7 +4513,7 @@ case "${target}" in
esac
;;
--- /dev/null
+$NetBSD: patch-gcc_config_darwin-driver.c,v 1.1 2021/10/13 12:38:52 adam Exp $
+
+Allow macOS 12.
+
+--- gcc/config/darwin-driver.c.orig 2021-10-13 11:50:13.000000000 +0000
++++ gcc/config/darwin-driver.c
+@@ -64,7 +64,7 @@ validate_macosx_version_min (const char
+
+ major = strtoul (version_str, &end, 10);
+
+- if (major < 10 || major > 11 ) /* MacOS 10 and 11 are known. */
++ if (major < 10 || major > 12 ) /* MacOS 10 and 11 and 12 are known. */
+ return NULL;
+
+ /* Skip a separating period, if there's one. */
+$NetBSD$
+
+Include NetBSD in the gnat tools configure.
+
--- gnattools/configure.orig 2021-08-28 14:19:25.404806918 +0000
+++ gnattools/configure 2021-08-28 14:25:51.208977452 +0000
@@ -2079,6 +2079,11 @@