gcc10-aux: Fix package
authorirvise <irvise@irvise.xyz>
Sun, 31 Oct 2021 13:52:33 +0000 (14:52 +0100)
committerirvise <irvise@irvise.xyz>
Sun, 31 Oct 2021 13:52:33 +0000 (14:52 +0100)
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.

22 files changed:
gcc10-aux/DESCR
gcc10-aux/Makefile
gcc10-aux/buildlink3.mk
gcc10-aux/distinfo
gcc10-aux/options.mk
gcc10-aux/patches/patch-ada_configure.ac [deleted file]
gcc10-aux/patches/patch-ada_netbsd-symbols [deleted file]
gcc10-aux/patches/patch-gcc_ada_Makefile.rtl [moved from gcc10-aux/patches/patch-ada_makefile.rtl with 98% similarity]
gcc10-aux/patches/patch-gcc_ada_adaint.c [moved from gcc10-aux/patches/patch-ada_adaint.c with 89% similarity]
gcc10-aux/patches/patch-gcc_ada_adaint.h [moved from gcc10-aux/patches/patch-ada_adaint.h with 80% similarity]
gcc10-aux/patches/patch-gcc_ada_cstreams.c [moved from gcc10-aux/patches/patch-ada_cstreams.c with 96% similarity]
gcc10-aux/patches/patch-gcc_ada_libgnarl_s-osinte____netbsd.adb [moved from gcc10-aux/patches/patch-ada_s-osinte__netbsd.adb with 99% similarity]
gcc10-aux/patches/patch-gcc_ada_libgnarl_s-osinte____netbsd.ads [moved from gcc10-aux/patches/patch-ada_s-osinte__netbsd.ads with 99% similarity]
gcc10-aux/patches/patch-gcc_ada_libgnarl_s-taprop____posix.adb [moved from gcc10-aux/patches/patch-ada_s-taprop__posix.adb with 72% similarity]
gcc10-aux/patches/patch-gcc_ada_libgnat_g-socthi.ads [moved from gcc10-aux/patches/patch-ada_g-socthi.ads with 92% similarity]
gcc10-aux/patches/patch-gcc_ada_libgnat_g-socthi____bsd.adb [moved from gcc10-aux/patches/patch-ada_g-socthi__bsd.adb with 99% similarity]
gcc10-aux/patches/patch-gcc_ada_libgnat_s-osprim____posix.adb [moved from gcc10-aux/patches/patch-ada_s-osprim__posix.adb with 82% similarity]
gcc10-aux/patches/patch-gcc_ada_s-oscons-tmplt.c [moved from gcc10-aux/patches/patch-ada_s-oscons-tmplt.c with 96% similarity]
gcc10-aux/patches/patch-gcc_ada_sysdep.c [moved from gcc10-aux/patches/patch-ada_sysdep.c with 97% similarity]
gcc10-aux/patches/patch-gcc_config.gcc
gcc10-aux/patches/patch-gcc_config_darwin-driver.c [new file with mode: 0644]
gcc10-aux/patches/patch-gnattools_configure [moved from gcc10-aux/patches/patch-ada_configure with 89% similarity]

index 902190a23099e111e54261de80be90f4afc52dfb..da4045c8b283308771a329f4b97b0bb229f6df09 100644 (file)
@@ -1,2 +1,2 @@
-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.
index 74cab739c1cf87b3e7aedc57534cd475ff71c22d..9c569055e8d90df693d7546dcdbe19a932d958e6 100644 (file)
@@ -1,6 +1,7 @@
-# $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}
@@ -12,18 +13,21 @@ CATEGORIES= lang
 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
@@ -119,7 +123,10 @@ MAKE_ENV.NetBSD+=  ac_cv_func_newlocale=no
 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
@@ -190,8 +197,10 @@ post-install:
 
 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"
index 01e4c8840c00a4232948eb28763358652cf25fb1..83df60bfac8e043fdfc1b867b66b5ae2173eb57a 100644 (file)
@@ -7,7 +7,7 @@ GCC10_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
index 91c34683e34a3a08ced80c85836044408b49b993..3e5ceced0376ac0d80fe148e235b6a57e286a592 100644 (file)
@@ -1,41 +1,40 @@
-$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
index 639ed2a40a93d5b9679f19bd7c6948b51ddf4d5e..ac908c77aed068b3327adcfe23945e038ac2e424 100644 (file)
@@ -1,19 +1,11 @@
-# $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
@@ -134,10 +126,13 @@ DISTFILES+=               ${ISL16}.tar.bz2
 
 ###
 ### 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++
@@ -160,10 +155,6 @@ LANGS+=                    go
 LANGS+=                        fortran
 .endif
 
-.if !empty(PKG_OPTIONS:Mgcc-ada)
-LANGS+=                        ada
-.endif
-
 .if !empty(PKG_OPTIONS:Mgcc-c++)
 LANGS+=                        c++
 USE_TOOLS+=            perl
diff --git a/gcc10-aux/patches/patch-ada_configure.ac b/gcc10-aux/patches/patch-ada_configure.ac
deleted file mode 100644 (file)
index 609156c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- 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 \
diff --git a/gcc10-aux/patches/patch-ada_netbsd-symbols b/gcc10-aux/patches/patch-ada_netbsd-symbols
deleted file mode 100644 (file)
index 9a7aa70..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- 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):
similarity index 98%
rename from gcc10-aux/patches/patch-ada_makefile.rtl
rename to gcc10-aux/patches/patch-gcc_ada_Makefile.rtl
index e29cb8c1442a4d353d9ca3d7b7e8628dbdc6c2f3..62b3b30c493ec7fd8509aed54bde28ba4b494fc3 100644 (file)
@@ -1,3 +1,7 @@
+$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 @@
similarity index 89%
rename from gcc10-aux/patches/patch-ada_adaint.c
rename to gcc10-aux/patches/patch-gcc_ada_adaint.c
index 81784fe99073d4f8c90bc1c7638fd8608ff2f2c5..7570718d10bb1b1bd01b54e48b7e1c1ff74ccb31 100644 (file)
@@ -1,3 +1,9 @@
+$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 @@
@@ -63,7 +69,7 @@
 +   return nanosleep (rqtp, rmtp);
 +}
 +int
-+__gnat_gettimeofday (struct timeval * tp, void * tzp) {
++__gnat_gettimeofday (struct timeval * tp, struct timezone * tzp) {
 +   return gettimeofday (tp, tzp);
 +}
 +
similarity index 80%
rename from gcc10-aux/patches/patch-ada_adaint.h
rename to gcc10-aux/patches/patch-gcc_ada_adaint.h
index 7717a8d649651b97de5136d4362c574f18033505..1f9ee9b3585c795b8fac6f2f8539b1cb239cf2ff 100644 (file)
@@ -1,3 +1,9 @@
+$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 @@
@@ -16,7 +22,7 @@
 +#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>
similarity index 96%
rename from gcc10-aux/patches/patch-ada_cstreams.c
rename to gcc10-aux/patches/patch-gcc_ada_cstreams.c
index 9132500455b185b13084dfa1f8edffb3a9368976..07eaedb1bd1ad786f2ca06affb628fee5c94b44a 100644 (file)
@@ -1,3 +1,7 @@
+$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 @@
similarity index 99%
rename from gcc10-aux/patches/patch-ada_s-osinte__netbsd.adb
rename to gcc10-aux/patches/patch-gcc_ada_libgnarl_s-osinte____netbsd.adb
index 05a9202d9b9c34b9c786bdf4c6b4b45d72aeb583..8883c76a2a90dd02a3193ef6a8f44e154432f83e 100644 (file)
@@ -1,3 +1,7 @@
+$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 @@
similarity index 99%
rename from gcc10-aux/patches/patch-ada_s-osinte__netbsd.ads
rename to gcc10-aux/patches/patch-gcc_ada_libgnarl_s-osinte____netbsd.ads
index e40abac3dbcd46b7dfdef44f8d7f58167daff855..0f85cae6cc096c0d4b20841343cc4fde49a450e3 100644 (file)
@@ -1,3 +1,7 @@
+$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 @@
similarity index 72%
rename from gcc10-aux/patches/patch-ada_s-taprop__posix.adb
rename to gcc10-aux/patches/patch-gcc_ada_libgnarl_s-taprop____posix.adb
index 92bfafc130b6da0e194a98546675576aca2679d3..431e6c6b7d82996b370eb4639938bd6ebefc1fa1 100644 (file)
@@ -1,3 +1,11 @@
+$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 @@
similarity index 92%
rename from gcc10-aux/patches/patch-ada_g-socthi.ads
rename to gcc10-aux/patches/patch-gcc_ada_libgnat_g-socthi.ads
index 4d07d2dcf3ece07f0c8e9e200085981a29acaa34..2b01a29d4200496efd3dd525dd68f9f7e660d621 100644 (file)
@@ -1,3 +1,7 @@
+$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 @@
similarity index 99%
rename from gcc10-aux/patches/patch-ada_g-socthi__bsd.adb
rename to gcc10-aux/patches/patch-gcc_ada_libgnat_g-socthi____bsd.adb
index b60547ff381550cdae854dfc5ab35d4611266212..c965233eed89d46eb01d9d505a86c0b78017316e 100644 (file)
@@ -1,3 +1,7 @@
+$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 @@
similarity index 82%
rename from gcc10-aux/patches/patch-ada_s-osprim__posix.adb
rename to gcc10-aux/patches/patch-gcc_ada_libgnat_s-osprim____posix.adb
index 78d3533e534eeea6744aad33c52f661400e3a50c..f8c310536b59fe4c0ca1291b5bc6f182d39dd355 100644 (file)
@@ -1,10 +1,14 @@
+$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");
  
     -----------
@@ -13,7 +17,7 @@
        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
similarity index 96%
rename from gcc10-aux/patches/patch-ada_s-oscons-tmplt.c
rename to gcc10-aux/patches/patch-gcc_ada_s-oscons-tmplt.c
index c1d7809d8365c7ea70560f70efe9d0b6be474a91..143fbd9c58bdc6dae807976b2260cbcc1008f3cc 100644 (file)
@@ -1,3 +1,8 @@
+$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 @@
similarity index 97%
rename from gcc10-aux/patches/patch-ada_sysdep.c
rename to gcc10-aux/patches/patch-gcc_ada_sysdep.c
index 98189568335e9e71645b507f8059d6d86b74d6aa..7277c3eb1ebd2bfe7f08e3a16ab6c5e7095f3b07 100644 (file)
@@ -1,3 +1,7 @@
+$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 @@
index b2b44ad1f8ce4b1600cc179f30c2ba5e60138e19..3256b1c243009319a9aee9f9d8d1c3d1731fca37 100644 (file)
@@ -1,11 +1,13 @@
-$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"
          ;;
@@ -22,7 +24,16 @@ probably several others.
  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
@@ -34,7 +45,7 @@ probably several others.
    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"
@@ -46,7 +57,7 @@ probably several others.
        ;;
  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*)
@@ -54,7 +65,7 @@ probably several others.
        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*)
@@ -95,7 +106,7 @@ probably several others.
        ;;
  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"
@@ -103,7 +114,7 @@ probably several others.
        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
        ;;
@@ -120,7 +131,7 @@ probably several others.
  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
        ;;
@@ -147,7 +158,7 @@ probably several others.
        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
        ;;
@@ -174,7 +185,7 @@ probably several others.
  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
        ;;
@@ -203,7 +214,7 @@ probably several others.
        ;;
  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"
@@ -215,7 +226,7 @@ probably several others.
        ;;
  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
        ;;
@@ -225,7 +236,7 @@ probably several others.
      m68k*-*-*)
        case "$with_arch" in
        "cf")
-@@ -4421,7 +4513,7 @@
+@@ -4421,7 +4513,7 @@ case "${target}" in
                esac
                ;;
  
diff --git a/gcc10-aux/patches/patch-gcc_config_darwin-driver.c b/gcc10-aux/patches/patch-gcc_config_darwin-driver.c
new file mode 100644 (file)
index 0000000..3b27d79
--- /dev/null
@@ -0,0 +1,15 @@
+$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.  */
similarity index 89%
rename from gcc10-aux/patches/patch-ada_configure
rename to gcc10-aux/patches/patch-gnattools_configure
index f903276e385c0513c433afb1370d47c47e96108b..97a33dbc56fe83abe34709aadbe9458d4acbc3a4 100644 (file)
@@ -1,3 +1,7 @@
+$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 @@