pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang



Module Name:    pkgsrc
Committed By:   dkazankov
Date:           Wed Jun 11 13:27:05 UTC 2025

Modified Files:
        pkgsrc/lang/gcc14-gnat: Makefile buildlink3.mk distinfo
        pkgsrc/lang/gcc14-gnat-libs: Makefile buildlink3.mk
        pkgsrc/lang/gcc14-gnat/patches: patch-configure patch-configure.ac
            patch-fixincludes_fixincl.x patch-fixincludes_inclhack.def
            patch-gcc_ada_init.c patch-gcc_c-family_c-attribs.cc
            patch-gcc_c-family_c-common.cc patch-gcc_c-family_c-lex.cc
            patch-gcc_c-family_c-opts.cc patch-gcc_c-family_c-pragma.h
            patch-gcc_c-family_c.opt patch-gcc_c_c-parser.cc patch-gcc_calls.cc
            patch-gcc_calls.h patch-gcc_collect2.cc patch-gcc_common.opt
            patch-gcc_common_config_aarch64_aarch64-common.cc
            patch-gcc_config.gcc patch-gcc_config_aarch64_aarch64-builtins.cc
            patch-gcc_config_aarch64_aarch64-c.cc
            patch-gcc_config_aarch64_aarch64-cores.def
            patch-gcc_config_aarch64_aarch64-protos.h
            patch-gcc_config_aarch64_aarch64-tune.md
            patch-gcc_config_aarch64_aarch64.cc
            patch-gcc_config_aarch64_aarch64.h
            patch-gcc_config_aarch64_aarch64.md
            patch-gcc_config_aarch64_aarch64.opt
            patch-gcc_config_aarch64_constraints.md
            patch-gcc_config_aarch64_driver-aarch64.cc
            patch-gcc_config_aarch64_predicates.md
            patch-gcc_config_darwin-protos.h patch-gcc_config_darwin.cc
            patch-gcc_config_darwin.h patch-gcc_config_darwin.opt
            patch-gcc_configure patch-gcc_configure.ac patch-gcc_cp_decl2.cc
            patch-gcc_cp_parser.cc patch-gcc_doc_invoke.texi
            patch-gcc_doc_tm.texi patch-gcc_doc_tm.texi.in patch-gcc_explow.h
            patch-gcc_function.cc patch-gcc_function.h
            patch-gcc_jit_libgccjit.h patch-gcc_opts.cc patch-gcc_target.def
            patch-gcc_target.h patch-gcc_targhooks.cc patch-gcc_targhooks.h
            patch-gcc_testsuite_gcc.target_aarch64_sme_aarch64-sme.exp
            patch-libgcc_config.host
            patch-libgcc_config_aarch64___arm_sme_state.S
            patch-libgcc_config_aarch64___arm_tpidr2_restore.S
            patch-libgcc_config_aarch64___arm_tpidr2_save.S
            patch-libgcc_config_aarch64___arm_za_disable.S
            patch-libgcc_config_aarch64_aarch64-asm.h
            patch-libgcc_config_aarch64_lse.S
            patch-libgcc_config_aarch64_sfp-machine.h
            patch-libgcc_config_t-darwin-libgccs1
            patch-libgcc_config_t-darwin-min-11
            patch-libitm_config_aarch64_sjlj.S
            patch-libphobos_libdruntime_core_internal_gc_impl_conservative_gc.d
Removed Files:
        pkgsrc/lang/gcc14-gnat/patches: patch-libgcc_config_i386_t-darwin
            patch-libgcc_config_rs6000_t-darwin

Log Message:
gcc14-gnat*: update to 14.3 bug-fix release


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/gcc14-gnat/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/gcc14-gnat/buildlink3.mk \
    pkgsrc/lang/gcc14-gnat/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/gcc14-gnat-libs/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/gcc14-gnat-libs/buildlink3.mk
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/gcc14-gnat/patches/patch-configure \
    pkgsrc/lang/gcc14-gnat/patches/patch-configure.ac \
    pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_fixincl.x \
    pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_inclhack.def \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_ada_init.c \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-attribs.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-common.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-lex.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-opts.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-pragma.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c.opt \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c_c-parser.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_collect2.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common.opt \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common_config_aarch64_aarch64-common.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config.gcc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-builtins.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-c.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-cores.def \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-protos.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-tune.md \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.md \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.opt \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_constraints.md \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_driver-aarch64.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_predicates.md \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin-protos.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.opt \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure.ac \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_decl2.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_parser.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_invoke.texi \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi.in \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_explow.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_jit_libgccjit.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_opts.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.def \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.cc \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-gcc_testsuite_gcc.target_aarch64_sme_aarch64-sme.exp \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config.host \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_sme_state.S \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_restore.S \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_save.S \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_za_disable.S \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_aarch64-asm.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_lse.S \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_sfp-machine.h \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-libgccs1 \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-min-11 \
    pkgsrc/lang/gcc14-gnat/patches/patch-libitm_config_aarch64_sjlj.S \
    pkgsrc/lang/gcc14-gnat/patches/patch-libphobos_libdruntime_core_internal_gc_impl_conservative_gc.d
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_i386_t-darwin \
    pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_rs6000_t-darwin

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/gcc14-gnat/Makefile
diff -u pkgsrc/lang/gcc14-gnat/Makefile:1.2 pkgsrc/lang/gcc14-gnat/Makefile:1.3
--- pkgsrc/lang/gcc14-gnat/Makefile:1.2 Sun Jun  1 07:24:36 2025
+++ pkgsrc/lang/gcc14-gnat/Makefile     Wed Jun 11 13:27:04 2025
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.2 2025/06/01 07:24:36 dkazankov Exp $
+# $NetBSD: Makefile,v 1.3 2025/06/11 13:27:04 dkazankov Exp $
 
 GCC_PKGNAME=           gcc14
-GCC_DIST_VERSION=      14.2.0
+GCC_DIST_VERSION=      14.3.0
 
 PKGNAME=       ${GCC_PKGNAME}-gnat-${GCC_DIST_VERSION}
-PKGREVISION=   1
+#PKGREVISION=  1
 COMMENT=       GNAT Compiler and Ada tools
 DISTNAME=      gcc-${GCC_DIST_VERSION}
 CATEGORIES=    lang
@@ -38,8 +38,8 @@ GNU_CONFIGURE_PREFIX= ${GNAT_PREFIX}
 INFO_FILES=            yes
 CONFIGURE_ARGS+=       --disable-libstdcxx-pch
 
-USE_PKGSRC_GCC=        yes
-GCC_REQD+=     10
+USE_PKGSRC_GCC=                yes
+GCC_REQD+=             10
 
 UNLIMIT_RESOURCES+=    datasize
 UNLIMIT_RESOURCES+=    stacksize
@@ -54,30 +54,27 @@ CHECK_PORTABILITY_SKIP+=    gcc/configure.o
 .if ${MACHINE_PLATFORM:MDarwin-*-aarch64}
 BUILDLINK_TRANSFORM+=  rm:-nodefaultrpaths
 CONFIGURE_ARGS+=       --disable-darwin-at-rpath
-PATCHFILES=            gcc-14.1.0.diff
-PATCH_SITES=           https://raw.githubusercontent.com/Homebrew/formula-patches/82b5c1c/gcc/
-PATCH_DIST_STRIP=      -p1
 .endif
 
-STAGE1_LDFLAGS=                ${LDFLAGS} -static
+LDFLAGS+=              -static
 
 # In some cases LINKER_RPATH_FLAG needs a trailing space.
 LINKER_RPATH_FLAG:=    ${LINKER_RPATH_FLAG:S/-rpath/& /}
 
+# The "-static-libstdc++ -static-libgcc" flags are normally added to the
+# boot-ldflags by configure but because we are supply the boot-ldflags
+# we mash supply them.
+LDFLAGS_FOR_TARGET=    -static-libstdc++ -static-libgcc
 ## The Library rpath to use in end programs.
-LDFLAGS_FOR_TARGET=    ${COMPILER_RPATH_FLAG}${PREFIX}/lib
 LDFLAGS_FOR_TARGET+=   ${COMPILER_RPATH_FLAG}${GNAT_PREFIX}/lib
 LDFLAGS_FOR_TARGET+=   ${COMPILER_RPATH_FLAG}${GNAT_PREFIX}/lib/gcc/${MACHINE_GNU_PLATFORM}/${GCC_DIST_VERSION}/adalib
+LDFLAGS_FOR_TARGET+=   ${COMPILER_RPATH_FLAG}${PREFIX}/lib
 
-# The "-static-libstdc++ -static-libgcc" flags are normally added to the
-# boot-ldflags by configure but because we are supply the boot-ldflags
-# we mash supply them.
-BOOT_LDFLAGS=          -static-libstdc++ -static-libgcc
-BOOT_LDFLAGS+=         ${LDFLAGS_FOR_TARGET}
 # Needed on Darwin when LDFLAGS point to a SDK
 .if !empty(OSX_SDK_PATH)
-BOOT_LDFLAGS+=         ${LDFLAGS:M-Wl,-syslibroot*}
+LDFLAGS_FOR_TARGET+=           ${LDFLAGS:M-Wl,-syslibroot*}
 .endif
+
 # GCC does not understand this option; remove it, or stage build will fail
 BUILDLINK_TRANSFORM+=  rm:-stdlib=libc++
 
@@ -103,13 +100,8 @@ SUBST_SED.libstdc= -e 's,libtool_VERSION
 CONFIGURE_ARGS+=       --enable-libssp
 .endif
 
-.if ${USE_CROSS_COMPILE:U:tl} == "yes"
-CONFIGURE_ENV+=                CC_FOR_BUILD=${NATIVE_CC:Q}
-CONFIGURE_ENV+=                CXX_FOR_BUILD=${NATIVE_CXX:Q}
-.endif
-
-CONFIGURE_ARGS+=       --enable-languages=c,c++,ada --enable-stage1-languages=c++,ada
-CONFIGURE_ARGS+=       --with-static-standard-libraries
+CONFIGURE_ARGS+=       --enable-languages=ada,c,c++ --enable-stage1-languages=ada,c,c++
+#CONFIGURE_ARGS+=      --with-static-standard-libraries
 # This will create slightly slower compiler
 CONFIGURE_ARGS+=       --enable-shared
 CONFIGURE_ARGS+=       --enable-host-shared
@@ -122,8 +114,14 @@ CONFIGURE_ARGS+=   --with-local-prefix=${G
 CONFIGURE_ARGS+=       --with-gxx-include-dir='${GNAT_PREFIX}/include/c++'
 CONFIGURE_ARGS+=       --enable-__cxa_atexit
 CONFIGURE_ARGS+=       --enable-threads=posix
-CONFIGURE_ARGS+=       --with-stage1-ldflags=${STAGE1_LDFLAGS:Q}
-CONFIGURE_ARGS+=       --with-boot-ldflags=${BOOT_LDFLAGS:Q}
+
+.if ${USE_CROSS_COMPILE:U:tl} == "yes"
+CONFIGURE_ARGS+=       --with-stage1-ldflags=${LDFLAGS_FOR_TARGET:Q}
+.else
+CONFIGURE_ARGS+=       --with-boot-ldflags=${LDFLAGS_FOR_TARGET:Q}
+CONFIGURE_ARGS+=       --with-stage1-ldflags=${LDFLAGS:Q}
+.endif
+
 # causes build errors even when using lang/gcc14 to self host
 CONFIGURE_ARGS.SunOS+= --disable-libsanitizer
 # multilib on Darwin requires fat-binaries

Index: pkgsrc/lang/gcc14-gnat/buildlink3.mk
diff -u pkgsrc/lang/gcc14-gnat/buildlink3.mk:1.1 pkgsrc/lang/gcc14-gnat/buildlink3.mk:1.2
--- pkgsrc/lang/gcc14-gnat/buildlink3.mk:1.1    Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/buildlink3.mk        Wed Jun 11 13:27:04 2025
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2025/06/11 13:27:04 dkazankov Exp $
 
 BUILDLINK_TREE+=       gcc14-gnat
 
@@ -14,7 +14,7 @@ PREPEND_PATH+=        ${BUILDLINK_DIR}/gcc14-gn
 
 GNU_TARGET_MACHINE?=   ${MACHINE_GNU_PLATFORM}
 
-ADALIB_PREFIX= gcc14-gnat/lib/gcc/${GNU_TARGET_MACHINE}/14.2.0
+ADALIB_PREFIX= gcc14-gnat/lib/gcc/${GNU_TARGET_MACHINE}/14.3.0
 
 BUILDLINK_FILES.gcc14-gnat+=   gcc14-gnat/${GNU_TARGET_MACHINE}/lib/*
 
Index: pkgsrc/lang/gcc14-gnat/distinfo
diff -u pkgsrc/lang/gcc14-gnat/distinfo:1.1 pkgsrc/lang/gcc14-gnat/distinfo:1.2
--- pkgsrc/lang/gcc14-gnat/distinfo:1.1 Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/distinfo     Wed Jun 11 13:27:04 2025
@@ -1,18 +1,18 @@
-$NetBSD: distinfo,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: distinfo,v 1.2 2025/06/11 13:27:04 dkazankov Exp $
 
-BLAKE2s (gcc-14.2.0.tar.xz) = 4cbc121d8d3982be05e1d0621363c6ec4cd34c78007a1af0599559370a93376e
-SHA512 (gcc-14.2.0.tar.xz) = 932bdef0cda94bacedf452ab17f103c0cb511ff2cec55e9112fc0328cbf1d803b42595728ea7b200e0a057c03e85626f937012e49a7515bc5dd256b2bf4bc396
-Size (gcc-14.2.0.tar.xz) = 92306460 bytes
-SHA1 (patch-configure) = 7d9225f1d9f0297a8cdb19aca2e584fc67742226
-SHA1 (patch-configure.ac) = d4229d5acd148959e8bfc2fd88745d7700828f72
-SHA1 (patch-fixincludes_fixincl.x) = 8705769847cfecbaea393960e2894517a5a05e28
-SHA1 (patch-fixincludes_inclhack.def) = 9a60dc8cbf702b374bf1e2a6c4e35009277301d9
+BLAKE2s (gcc-14.3.0.tar.xz) = 70036c7d07767bba3476d19a6fd52f0b09dc05651c6cf5d136afe18ffa3b63a9
+SHA512 (gcc-14.3.0.tar.xz) = cb4e3259640721bbd275c723fe4df53d12f9b1673afb3db274c22c6aa457865dccf2d6ea20b4fd4c591f6152e6d4b87516c402015900f06ce9d43af66d3b7a93
+Size (gcc-14.3.0.tar.xz) = 95212220 bytes
+SHA1 (patch-configure) = 5ecea55b80b6e17dc9584d688369994b4d5f9e54
+SHA1 (patch-configure.ac) = 4e1a22b7cd0935975bb3671689abfa1f6d6396e4
+SHA1 (patch-fixincludes_fixincl.x) = 7a95e277c8a87d766744d0e83d181074b9c4996d
+SHA1 (patch-fixincludes_inclhack.def) = 7054dbfaec472ac34e2acb2bbd7f57ba3a9cfeb9
 SHA1 (patch-gcc_Makefile.in) = a31ddc27f1092cfdf5ac896ca79c8590b5aceb47
 SHA1 (patch-gcc_ada_Makefile.rtl) = b5e8abf551b9aaefecc8219ac033d6e8ba0e5d80
 SHA1 (patch-gcc_ada_adaint.c) = 90a416d1ad99f8fdd1846b0bdb90caa74dd01d16
 SHA1 (patch-gcc_ada_adaint.h) = 0956155bac85df664a8761fd03aec3e12fff89a2
 SHA1 (patch-gcc_ada_cstreams.c) = 9008ec849de15df4e32a75a7353ede097eca9e38
-SHA1 (patch-gcc_ada_init.c) = 2851bff6d8de6671de6f75d769522f09e1d4efa0
+SHA1 (patch-gcc_ada_init.c) = 65d93777cf1bb4d4cc3baf04f7160869f01bcdcc
 SHA1 (patch-gcc_ada_libgnarl_s-osinte____netbsd.adb) = fe5cffa06d2ad8af6ab71bbd64fb4d3e0f65c3d8
 SHA1 (patch-gcc_ada_libgnarl_s-osinte____netbsd.ads) = d6d7eee6f7d90d006f5f6209afb7925551d4aba8
 SHA1 (patch-gcc_ada_libgnarl_s-taprop____posix.adb) = 3f3b8d4fd41a9889392021c7cb69130c9033b3b0
@@ -23,35 +23,35 @@ SHA1 (patch-gcc_ada_s-oscons-tmplt.c) = 
 SHA1 (patch-gcc_ada_sysdep.c) = 21c432655a50aadb7378e27af92f7b2dfd96a492
 SHA1 (patch-gcc_ada_terminals.c) = 81a572feb93dba76b0322336d4394ac3ab158944
 SHA1 (patch-gcc_builtins.cc) = 25b826dcd3553e5e5846a75bda7425eb9ef1f247
-SHA1 (patch-gcc_c-family_c-attribs.cc) = a0d99cc37d3c048aa86e6d2114d0b4ab719070b7
-SHA1 (patch-gcc_c-family_c-common.cc) = 0df51dabeb1210f54595767a8f4ae82475fe3556
+SHA1 (patch-gcc_c-family_c-attribs.cc) = 1f9bee3665e353fe293cbc10b0975179b1fc49e7
+SHA1 (patch-gcc_c-family_c-common.cc) = 291c314503b121f3a7e487e6097c1fac7200bec5
 SHA1 (patch-gcc_c-family_c-common.h) = 8c25883409068172483dc8062c2f0d081c745b5e
-SHA1 (patch-gcc_c-family_c-lex.cc) = d01fcdf9eb3c48bc75d262abf5f097626629fb4d
-SHA1 (patch-gcc_c-family_c-opts.cc) = cd8e02798f74c937e3a2d86a79fdbcb9a312b1f7
-SHA1 (patch-gcc_c-family_c-pragma.h) = dc842411cc9a66f28052ebcf8e7dc9acdfedeb13
-SHA1 (patch-gcc_c-family_c.opt) = f3d93a56234cd9e88aa49d31812dc657196dd17d
-SHA1 (patch-gcc_c_c-parser.cc) = 7896860134e9e0c8169c24f31496091f239ccf6f
-SHA1 (patch-gcc_calls.cc) = eb65fbe28024a5e0ac76913ce67d862e3c24c984
-SHA1 (patch-gcc_calls.h) = ab2bc8d67d489fa78cbc7736e4d7487d8028caf4
-SHA1 (patch-gcc_collect2.cc) = 5950e9fbaa0061f5c7cbf53882fff8972feb552b
-SHA1 (patch-gcc_common.opt) = a2ae6fffc3da9c1a1fa958921405007828e268de
-SHA1 (patch-gcc_common_config_aarch64_aarch64-common.cc) = 7c5554783b27e33f8de958dc9ff1cd694b080e5a
-SHA1 (patch-gcc_config.gcc) = 4be431e0c92a5f181771d92f38035d36c5e78f3c
+SHA1 (patch-gcc_c-family_c-lex.cc) = 05474bd7f97ff2c520a0925f34bbe8aea0901a0d
+SHA1 (patch-gcc_c-family_c-opts.cc) = d5552cb664f1688edfb6ae0443a630ca0cfe47f7
+SHA1 (patch-gcc_c-family_c-pragma.h) = 0612f6dd09882f14408d414d45705b66fc269c15
+SHA1 (patch-gcc_c-family_c.opt) = 9a9532efdee0298094df856141282ea32a93f1ca
+SHA1 (patch-gcc_c_c-parser.cc) = ea22dc1a78a2c601730435aa7452c56782cea50c
+SHA1 (patch-gcc_calls.cc) = 3c180f50d797f1175375cebbc28a44e6725439b0
+SHA1 (patch-gcc_calls.h) = 89b4b16d1c6d05358208ce321a00c30a9292c70d
+SHA1 (patch-gcc_collect2.cc) = 0afb813670c91221416a69a84295efe122a3b258
+SHA1 (patch-gcc_common.opt) = 1aa40a7919fc55f085316ebda18f0e8f4e724da8
+SHA1 (patch-gcc_common_config_aarch64_aarch64-common.cc) = e37205308e70a45bda90244c733e30adaef787d5
+SHA1 (patch-gcc_config.gcc) = 6799bb4f583fca42ca68fd7f9f01fecd9b867155
 SHA1 (patch-gcc_config.host) = bf95dd21bfdf79d173e745fbd35c9bb99fdf4087
-SHA1 (patch-gcc_config_aarch64_aarch64-builtins.cc) = 73fd302eedcc9b023f7acb448622cd5574778c58
-SHA1 (patch-gcc_config_aarch64_aarch64-c.cc) = 3d028fb5605a2d7218a05ccbba866265b60dfbc8
-SHA1 (patch-gcc_config_aarch64_aarch64-cores.def) = b087e883a7897c0e6fa3f5d296d7ca714f9224b0
+SHA1 (patch-gcc_config_aarch64_aarch64-builtins.cc) = 6a1d686275eec3598ffefb14973bf768846ab4a1
+SHA1 (patch-gcc_config_aarch64_aarch64-c.cc) = 32c31e906263e7790112140a528e1ca0337e43ff
+SHA1 (patch-gcc_config_aarch64_aarch64-cores.def) = ae9664ad30826fa7fc5c247faf15d7364a000ac0
 SHA1 (patch-gcc_config_aarch64_aarch64-netbsd.h) = d382c66bcecb4ca8b22a4762a3467878bea64ec2
-SHA1 (patch-gcc_config_aarch64_aarch64-protos.h) = 5477a2f86e6eab0df6772410963c124aad5711d5
-SHA1 (patch-gcc_config_aarch64_aarch64-tune.md) = e9f7d16c78c26e41e4f7a768e209e1a620a142e0
-SHA1 (patch-gcc_config_aarch64_aarch64.cc) = 69884150b196b9065d153da421005213ece94b15
-SHA1 (patch-gcc_config_aarch64_aarch64.h) = 135bbc6864d1b9ee540ccc9bc1e4fa4503476401
-SHA1 (patch-gcc_config_aarch64_aarch64.md) = 5e43addc9418c4e79f5ee7e350ec6a404b2656ad
-SHA1 (patch-gcc_config_aarch64_aarch64.opt) = 0002e6f8c1f770b4734544e0d80c4bad4a7b7d02
-SHA1 (patch-gcc_config_aarch64_constraints.md) = 948a9608a57323e2a731936b472c9898c0e17da0
+SHA1 (patch-gcc_config_aarch64_aarch64-protos.h) = d9b90df2600b7d92bca098d9dc4ac965fe94983c
+SHA1 (patch-gcc_config_aarch64_aarch64-tune.md) = 348c478781b970feefbf683b66ade0065720f099
+SHA1 (patch-gcc_config_aarch64_aarch64.cc) = 3de2cc5fe4f4da6ca25b8f7ef0ef659d7bec51f8
+SHA1 (patch-gcc_config_aarch64_aarch64.h) = b2e297c5a37d07b5d360566d111ce7b5c561209d
+SHA1 (patch-gcc_config_aarch64_aarch64.md) = 547637f1096d544897ee906c67f7d18b070ab4cc
+SHA1 (patch-gcc_config_aarch64_aarch64.opt) = 179acff4f1f9f462810a834f71908e94b341b8a3
+SHA1 (patch-gcc_config_aarch64_constraints.md) = a8d0281871e0c2ea3b8a45c2b13c94728fe0d52b
 SHA1 (patch-gcc_config_aarch64_darwin.h) = 674e39599154f63fb9d8fda7ace14ce9a3f0e046
-SHA1 (patch-gcc_config_aarch64_driver-aarch64.cc) = 82fb08124094038f5e12d2efe171a01ff3982a39
-SHA1 (patch-gcc_config_aarch64_predicates.md) = 25b2f1dbd79e77234acc2bb2ad5cca550d328d50
+SHA1 (patch-gcc_config_aarch64_driver-aarch64.cc) = 916e6db9c5ebe6ff834bdbca4a64e502b5d690fa
+SHA1 (patch-gcc_config_aarch64_predicates.md) = c1ff95040e7bbfc7e0684559672f86352302d730
 SHA1 (patch-gcc_config_aarch64_t-aarch64-darwin) = 5407d281dd34adb6da784b838484626d315afb9b
 SHA1 (patch-gcc_config_arm_arm.h) = 37dac67982d765f1d8392a549d0eb5759517d406
 SHA1 (patch-gcc_config_arm_bpabi.h) = c9790b335e3972af915208d35e13bb67a1194443
@@ -59,60 +59,58 @@ SHA1 (patch-gcc_config_arm_elf.h) = 0118
 SHA1 (patch-gcc_config_arm_netbsd-eabi.h) = 4fe33f259283e022df663bb7144af63feca7d0c0
 SHA1 (patch-gcc_config_arm_netbsd-elf.h) = 55133e13841c6dbc768f223852e0389b80705475
 SHA1 (patch-gcc_config_darwin-driver.cc) = ac24a7ff6562bd69427a86942d40653a0301d3fd
-SHA1 (patch-gcc_config_darwin-protos.h) = cdaa9848139da663d99c0ebe3b1607f81ad972d8
-SHA1 (patch-gcc_config_darwin.cc) = 8502f81a59ab598ca2c95bce48402eb0faa7142d
-SHA1 (patch-gcc_config_darwin.h) = 572f28da4ed7894a82bd0c26f38a1c3c2ce1b5f6
-SHA1 (patch-gcc_config_darwin.opt) = 1fe22bedc6ae111157506a400ba6835040d6c2fe
-SHA1 (patch-gcc_configure) = 994d5d8d55ab35c290340e5945ac6fba5f9c9455
-SHA1 (patch-gcc_configure.ac) = abef894c5b5b00a9a6f5a480d01b36e021f87bef
-SHA1 (patch-gcc_cp_decl2.cc) = a49d15680d627b7bae2833ca6eafabf109c2fa5f
-SHA1 (patch-gcc_cp_parser.cc) = 31a5e3ac6ae9fda1559358876b18770f064293cc
+SHA1 (patch-gcc_config_darwin-protos.h) = dc33fd8f7e70f08b4f723b669b6fd46ce49f091b
+SHA1 (patch-gcc_config_darwin.cc) = 2e6f967fbff313ff16fe95edeaa4380f740512ee
+SHA1 (patch-gcc_config_darwin.h) = 5ffb2337cb94148be1b2e486227761cfcefbda87
+SHA1 (patch-gcc_config_darwin.opt) = 79044a713a91254e904708dc1ad19b8aaa1565e8
+SHA1 (patch-gcc_configure) = 25597cfd04d9146597450ec9cb2ce40d432382cd
+SHA1 (patch-gcc_configure.ac) = a520e53aa0e1609e74cb95fa921091a4141c9433
+SHA1 (patch-gcc_cp_decl2.cc) = 3a567e76950b7a9adcea97a2df5179ca96e1dc8b
+SHA1 (patch-gcc_cp_parser.cc) = 7ebf0f933120389218a88620f883a0d82be38523
 SHA1 (patch-gcc_cumulative-args.h) = aade3ac31d09ca3c0938dac82220ec4ed6663ab4
-SHA1 (patch-gcc_doc_invoke.texi) = bfc27f9c71e6ed09f9538eeba7277f39477c75a1
-SHA1 (patch-gcc_doc_tm.texi) = 1130d3ec9927dc7626cf4f32f8b39d4a634acdab
-SHA1 (patch-gcc_doc_tm.texi.in) = cbb2690415fb9efde88f2cfd8e8469fb2d41f897
+SHA1 (patch-gcc_doc_invoke.texi) = 3190e93fa22147ba0079f4c2bfb966d4324f3753
+SHA1 (patch-gcc_doc_tm.texi) = 0d0ad10476608ca813ec6fa051272d92c766bbaf
+SHA1 (patch-gcc_doc_tm.texi.in) = eedada922657ae36e75b5345bf09c72d3b885760
 SHA1 (patch-gcc_exec-tool.in) = fffa1a0061e713f6f79bdc7ee3be1f92b84ba52e
 SHA1 (patch-gcc_explow.cc) = e3073e9cdbdffbec9e613aa48445aa23f2194c2c
-SHA1 (patch-gcc_explow.h) = 66e0b54bdf5d39fb4a18a1b46fa781d80129141a
-SHA1 (patch-gcc_function.cc) = ff6848b1d03f922f5e489b1b9b564645c7da8af0
-SHA1 (patch-gcc_function.h) = 0687d82c0af783cf5071aaafcf53a8bec5013f64
+SHA1 (patch-gcc_explow.h) = 1428e9cf6780abd293b8b7dbefca8492a83b5fc6
+SHA1 (patch-gcc_function.cc) = c839b97b10855d1159cc342f43d7207f8fd5b1fa
+SHA1 (patch-gcc_function.h) = c54ea1ea064eebd30de17b5fc866306786b5c777
 SHA1 (patch-gcc_ginclude_stddef.h) = a1f29f148e6cb9496415d22c079beacaaf9a5730
-SHA1 (patch-gcc_jit_libgccjit.h) = ac21412bbe6624941fa31a95d24437f06992973d
-SHA1 (patch-gcc_opts.cc) = b6f8ac594d6bab92f3a151b5e271bc8ceca20266
-SHA1 (patch-gcc_target.def) = 81a916e275d63ce7cc09c4e2c0efa1aeee9e7c6c
-SHA1 (patch-gcc_target.h) = 633e6b3fab78ba7b6da721b986bd1ff5d7699f18
-SHA1 (patch-gcc_targhooks.cc) = ab9a4ff6142853aa863bb7bed3d585950ce27744
-SHA1 (patch-gcc_targhooks.h) = e3854e57faf284c8fec535fe970eb68b35ab59c2
+SHA1 (patch-gcc_jit_libgccjit.h) = f4c90a77f7c44ae5213ac6a79e55e254490e09f7
+SHA1 (patch-gcc_opts.cc) = 5cebef0db25dc6cfd1d067a934183bda5ab481ee
+SHA1 (patch-gcc_target.def) = 492dd52d713affb9c976a184aac289ef17c4611c
+SHA1 (patch-gcc_target.h) = 8f874ab5b7894285d9ddcbabd23be9517e6775d6
+SHA1 (patch-gcc_targhooks.cc) = 96676212a086a1fe260d36364eab4abc3573e63b
+SHA1 (patch-gcc_targhooks.h) = 6769cdc38b6a586306f224c4b8bef32b8898cddb
 SHA1 (patch-gcc_testsuite_g++.dg_cpp0x_pr106435-b.cc) = a4d22c5924393b549caea0395e9490dcea356f83
 SHA1 (patch-gcc_testsuite_g++.dg_cpp0x_pr106435.C) = 3a60c331c0039c28b28ca17e97f752e6d1e59095
 SHA1 (patch-gcc_testsuite_g++.dg_cpp0x_pr106435.h) = 3a29fcb162127a477ec2977bdac1d02e10b51f04
 SHA1 (patch-gcc_testsuite_g++.target_aarch64_float128-darwin-1.C) = 9e7d6af938b6c5d32af98f0756f7b5c96a3a083e
 SHA1 (patch-gcc_testsuite_gcc.target_aarch64_darwin_float128-01.c) = fc6b2f9fa466c997c542416440106325fb145f8d
 SHA1 (patch-gcc_testsuite_gcc.target_aarch64_darwin_float128-02.c) = 3f37d4692c9d1dcb213260d115e96aea87486924
-SHA1 (patch-gcc_testsuite_gcc.target_aarch64_sme_aarch64-sme.exp) = d886766f77dc94c2801088aaf007007b6ae5a1bd
+SHA1 (patch-gcc_testsuite_gcc.target_aarch64_sme_aarch64-sme.exp) = 6ffd976b161e4cc669c0575d52f7c8b6971a48f0
 SHA1 (patch-gcc_tree.h) = 66754172db9ff6bbc8eae242fe9c821528a864b4
 SHA1 (patch-gnattools_configure) = 403e5576506d1a7f42740dcbfc79c1aee3333169
 SHA1 (patch-libcody_configure) = 361fa471f6afb578782322586395faa8f4e9a40c
 SHA1 (patch-libffi_configure) = b7e3ac7febb98e789d7b662bd2e80edae61345a1
 SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 89e2dd6aaf2c1f75726f02362d8a8bf7178694ea
-SHA1 (patch-libgcc_config.host) = b37a525ca7b884743cdc85010b31b21e56a6b4e3
-SHA1 (patch-libgcc_config_aarch64___arm_sme_state.S) = 2ebd8dabeb8e350010cdafe87dec63e2d728b607
-SHA1 (patch-libgcc_config_aarch64___arm_tpidr2_restore.S) = 6799c0babc8a8599c3dbdec80b38d429ae6ebf71
-SHA1 (patch-libgcc_config_aarch64___arm_tpidr2_save.S) = 6aeb1565a75f21dceadfed9397ace93953090383
-SHA1 (patch-libgcc_config_aarch64___arm_za_disable.S) = 09fedb2d1c27b955e24b3dbfe92117559aed2d53
-SHA1 (patch-libgcc_config_aarch64_aarch64-asm.h) = 3b2fd361794886e63a6933b3628af41007345830
-SHA1 (patch-libgcc_config_aarch64_lse.S) = 8f239f7ca27ceca19445b94a2c62dae8c000f3be
-SHA1 (patch-libgcc_config_aarch64_sfp-machine.h) = d49154b264153eec5c2f47eb0d0c69779a31bb18
+SHA1 (patch-libgcc_config.host) = 1e74d11e351eee2d5fcc4f8ff7d0bfd768c05eea
+SHA1 (patch-libgcc_config_aarch64___arm_sme_state.S) = 26884b23e784a7ae33a1edad70e79cdf4bddea90
+SHA1 (patch-libgcc_config_aarch64___arm_tpidr2_restore.S) = fde54083ada14fd00b8ecd82f0e537cc0f918a81
+SHA1 (patch-libgcc_config_aarch64___arm_tpidr2_save.S) = c706046a91e643140917910d1d468c39c3ffb9de
+SHA1 (patch-libgcc_config_aarch64___arm_za_disable.S) = b2e086b173adff83e1883dfb3b811206efeb736d
+SHA1 (patch-libgcc_config_aarch64_aarch64-asm.h) = 8ffb6af021a204871d2c215024bfa129b5f3a849
+SHA1 (patch-libgcc_config_aarch64_lse.S) = e5514c14549ab63d3d957f27b4cb8e23a18e5f28
+SHA1 (patch-libgcc_config_aarch64_sfp-machine.h) = e55d4df31ede8013eb0d0a61ac5daba39d374c3a
 SHA1 (patch-libgcc_config_aarch64_t-darwin) = 4ddd3fec628baedf4cda70aa0c97d540c38cb9c1
-SHA1 (patch-libgcc_config_i386_t-darwin) = 5c719be042134bf33f7d4d2bde63573f37df9a84
-SHA1 (patch-libgcc_config_rs6000_t-darwin) = a88cca89c7f28997e28b81d830b96613f23978ec
-SHA1 (patch-libgcc_config_t-darwin-libgccs1) = 75e5c3467bfd5716519a65f4d1a6da169486999e
-SHA1 (patch-libgcc_config_t-darwin-min-11) = 8bf932c0c2769c5e2e191626976af31f1c57df7e
+SHA1 (patch-libgcc_config_t-darwin-libgccs1) = 8cbaae6abfe53f44373b703555849d34ed9bcafe
+SHA1 (patch-libgcc_config_t-darwin-min-11) = 0f042ad1346026de4ef0936904200430a938b8d2
 SHA1 (patch-libgcc_crtstuff.c) = a16d465039de00c195cf0694560140a9c38f3a25
 SHA1 (patch-libgfortran_io_io.h) = 90f710d33bb0adafae6bbc8f2da63024211811e9
-SHA1 (patch-libitm_config_aarch64_sjlj.S) = 519aaaebda4250d91b78081bb4e12e6133cb5840
+SHA1 (patch-libitm_config_aarch64_sjlj.S) = d3661ebf118286964d0eba7c79291d6cf37abbfe
 SHA1 (patch-libitm_configure.tgt) = e48229d449374b62ee348ef5eb117dd3060ee615
-SHA1 (patch-libphobos_libdruntime_core_internal_gc_impl_conservative_gc.d) = 089dc022732ebe65aa383225743f19b00827e1a2
+SHA1 (patch-libphobos_libdruntime_core_internal_gc_impl_conservative_gc.d) = 6d7bb47b968d493e53f5603634aabef0cf20e672
 SHA1 (patch-libquadmath_printf_quadmath-printf.c) = 78e09f1e6d61ee57cee83275093cf46b2335d204
 SHA1 (patch-libquadmath_strtod_strtod__l.c) = 6142c10d34174174cce7f06c37eab04dc431b2dc
 SHA1 (patch-libstdc++-v3_libsupc++_new__opa.cc) = dc0bffea3a5172377a4bca3224cb0986a1708632

Index: pkgsrc/lang/gcc14-gnat-libs/Makefile
diff -u pkgsrc/lang/gcc14-gnat-libs/Makefile:1.4 pkgsrc/lang/gcc14-gnat-libs/Makefile:1.5
--- pkgsrc/lang/gcc14-gnat-libs/Makefile:1.4    Mon Jun  9 11:17:16 2025
+++ pkgsrc/lang/gcc14-gnat-libs/Makefile        Wed Jun 11 13:27:05 2025
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.4 2025/06/09 11:17:16 dkazankov Exp $
+# $NetBSD: Makefile,v 1.5 2025/06/11 13:27:05 dkazankov Exp $
 
 GCC_PKGNAME=           gcc14
-GNAT14_DIST_VERSION=   14.2.0
+GCC_DIST_VERSION=      14.3.0
 
-DISTNAME=      gcc-${GNAT14_DIST_VERSION}
-PKGNAME=       ${GCC_PKGNAME}-gnat-libs-${GNAT14_DIST_VERSION}
+DISTNAME=      gcc-${GCC_DIST_VERSION}
+PKGNAME=       ${GCC_PKGNAME}-gnat-libs-${GCC_DIST_VERSION}
 
 ## The PKGREVISION of this package needs to be at least 1 more than the
 ## PKGREVISION of the lang/gcc14-gnat package so that with the dependence pattern
@@ -24,8 +24,8 @@ USE_TOOLS+=   pax
 
 CHECK_RELRO_SUPPORTED= no
 
-## Depend on exactly ${GNAT14_DIST_VERSION}.
-TOOL_DEPENDS+=         ${GCC_PKGNAME}-gnat-${GNAT14_DIST_VERSION}{,nb[0-9]*}:../../lang/gcc14-gnat
+## Depend on exactly ${GCC_DIST_VERSION}.
+TOOL_DEPENDS+=         ${GCC_PKGNAME}-gnat-${GCC_DIST_VERSION}{,nb[0-9]*}:../../lang/gcc14-gnat
 TOOL_DEPENDS+=         patchelf-[0-9]*:../../devel/patchelf
 
 .include "../../mk/bsd.prefs.mk"
@@ -43,7 +43,7 @@ GENERATE_PLIST+=      cd ${DESTDIR}${PREFIX}  
                        ${ECHO} '@pkgdir ${TARGET_LIBDIR}' ;
 
 do-build:
-       ${PKG_INFO} -qL '${GCC_PKGNAME}-gnat-${GNAT14_DIST_VERSION}*' | \
+       ${PKG_INFO} -qL '${GCC_PKGNAME}-gnat-${GCC_DIST_VERSION}*' | \
        ${SED} -n -e's,^${LIBGCC_PREFIX}/,,p' | \
        ${SED} -n -e'/lib\/.*\/crt.*\.o/p' \
                -e'/lib\/.*\/adalib\/lib.*\.so.*/p' \

Index: pkgsrc/lang/gcc14-gnat-libs/buildlink3.mk
diff -u pkgsrc/lang/gcc14-gnat-libs/buildlink3.mk:1.1 pkgsrc/lang/gcc14-gnat-libs/buildlink3.mk:1.2
--- pkgsrc/lang/gcc14-gnat-libs/buildlink3.mk:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat-libs/buildlink3.mk   Wed Jun 11 13:27:05 2025
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 BUILDLINK_TREE+=       gcc14-gnat-libs
 

Index: pkgsrc/lang/gcc14-gnat/patches/patch-configure
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-configure:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-configure:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-configure:1.1  Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-configure      Wed Jun 11 13:27:04 2025
@@ -1,11 +1,11 @@
-$NetBSD: patch-configure,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-configure,v 1.2 2025/06/11 13:27:04 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- configure
+--- configure.orig     2025-05-23 11:03:15.437319779 +0000
 +++ configure
 @@ -3518,6 +3518,8 @@ esac
-
+ 
  # Disable libffi for some systems.
  case "${target}" in
 +  aarch64*-*-darwin2*)
Index: pkgsrc/lang/gcc14-gnat/patches/patch-configure.ac
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-configure.ac:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-configure.ac:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-configure.ac:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-configure.ac   Wed Jun 11 13:27:04 2025
@@ -1,11 +1,11 @@
-$NetBSD: patch-configure.ac,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-configure.ac,v 1.2 2025/06/11 13:27:04 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- configure.ac
+--- configure.ac.orig  2025-05-23 11:02:03.776189381 +0000
 +++ configure.ac
 @@ -747,6 +747,8 @@ esac
-
+ 
  # Disable libffi for some systems.
  case "${target}" in
 +  aarch64*-*-darwin2*)
Index: pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_fixincl.x
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_fixincl.x:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_fixincl.x:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_fixincl.x:1.1      Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_fixincl.x  Wed Jun 11 13:27:04 2025
@@ -1,23 +1,9 @@
-$NetBSD: patch-fixincludes_fixincl.x,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-fixincludes_fixincl.x,v 1.2 2025/06/11 13:27:04 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- fixincludes/fixincl.x
+--- fixincludes/fixincl.x.orig 2025-05-23 11:03:15.277317255 +0000
 +++ fixincludes/fixincl.x
-@@ -2,11 +2,11 @@
-  *
-  * DO NOT EDIT THIS FILE   (fixincl.x)
-  *
-- * It has been AutoGen-ed  August 17, 2023 at 10:16:38 AM by AutoGen 5.18.12
-+ * It has been AutoGen-ed  October  6, 2024 at 07:10:01 PM by AutoGen 5.18.7
-  * From the definitions    inclhack.def
-  * and the template file   fixincl
-  */
--/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Aug 17 10:16:38 CEST 2023
-+/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Oct  6 19:10:01 BST 2024
-  *
-  * You must regenerate it.  Use the ./genfixes script.
-  *
 @@ -15,7 +15,7 @@
   * certain ANSI-incompatible system header files which are fixed to work
   * correctly with ANSI C and placed in a directory that GNU C will search.
@@ -27,12 +13,10 @@ Support Darwin/aarch64, from https://git
   *
   * See README for more information.
   *
-@@ -267,56 +267,6 @@ static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = {
- #endif /* __MATH__ */",
-     (char*)NULL };
-
--/* * * * * * * * * * * * * * * * * * * * * * * * * *
-- *
+@@ -269,56 +269,6 @@ static const char* apzAab_Darwin7_9_Long
+ 
+ /* * * * * * * * * * * * * * * * * * * * * * * * * *
+  *
 - *  Description of Darwin_Api_Availability fix
 - */
 -tSCC zDarwin_Api_AvailabilityName[] =
@@ -81,24 +65,24 @@ Support Darwin/aarch64, from https://git
 -    #define API_UNAVAILABLE(...)\n",
 -    (char*)NULL };
 -
- /* * * * * * * * * * * * * * * * * * * * * * * * * *
-  *
+-/* * * * * * * * * * * * * * * * * * * * * * * * * *
+- *
   *  Description of Aab_Fd_Zero_Asm_Posix_Types_H fix
-@@ -2619,7 +2569,7 @@ tSCC zApple_Local_Stdio_Fn_DeprecationName[] =
+  */
+ tSCC zAab_Fd_Zero_Asm_Posix_Types_HName[] =
+@@ -2579,7 +2529,7 @@ tSCC zBsd_Stdio_Attrs_ConflictName[] =
   *  File name selection pattern
   */
- tSCC zApple_Local_Stdio_Fn_DeprecationList[] =
+ tSCC zBsd_Stdio_Attrs_ConflictList[] =
 -  "stdio.h\0";
 +  "stdio.h\0_stdio.h\0";
  /*
   *  Machine/OS name selection pattern
   */
-@@ -2763,51 +2713,6 @@ extern \"C\" {\n\
- #endif\n",
-     (char*)NULL };
-
--/* * * * * * * * * * * * * * * * * * * * * * * * * *
-- *
+@@ -2765,51 +2715,6 @@ extern \"C\" {\n\
+ 
+ /* * * * * * * * * * * * * * * * * * * * * * * * * *
+  *
 - *  Description of Darwin_Availabilityinternal fix
 - */
 -tSCC zDarwin_AvailabilityinternalName[] =
@@ -142,10 +126,12 @@ Support Darwin/aarch64, from https://git
 -#endif",
 -    (char*)NULL };
 -
- /* * * * * * * * * * * * * * * * * * * * * * * * * *
-  *
+-/* * * * * * * * * * * * * * * * * * * * * * * * * *
+- *
   *  Description of Darwin_9_Long_Double_Funcs_2 fix
-@@ -11169,9 +11074,9 @@ static const char* apzX11_SprintfPatch[] = {
+  */
+ tSCC zDarwin_9_Long_Double_Funcs_2Name[] =
+@@ -11169,9 +11074,9 @@ static const char* apzX11_SprintfPatch[]
   *
   *  List of all fixes
   */
@@ -154,7 +140,7 @@ Support Darwin/aarch64, from https://git
  #define MACH_LIST_SIZE_LIMIT 187
 -#define FIX_COUNT            274
 +#define FIX_COUNT            272
-
+ 
  /*
   *  Enumerate the fixes
 @@ -11180,7 +11085,6 @@ typedef enum {
@@ -176,7 +162,7 @@ Support Darwin/aarch64, from https://git
 @@ -11469,11 +11372,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
       AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
       aAab_Darwin7_9_Long_Double_FuncsTests,   apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 },
-
+ 
 -  {  zDarwin_Api_AvailabilityName,    zDarwin_Api_AvailabilityList,
 -     apzDarwin_Api_AvailabilityMachs,
 -     DARWIN_API_AVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -188,7 +174,7 @@ Support Darwin/aarch64, from https://git
 @@ -11779,11 +11677,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
       CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
       aCxx_UnreadyTests,   apzCxx_UnreadyPatch, 0 },
-
+ 
 -  {  zDarwin_AvailabilityinternalName,    zDarwin_AvailabilityinternalList,
 -     apzDarwin_AvailabilityinternalMachs,
 -     DARWIN_AVAILABILITYINTERNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
Index: pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_inclhack.def
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_inclhack.def:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_inclhack.def:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_inclhack.def:1.1   Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-fixincludes_inclhack.def       Wed Jun 11 13:27:04 2025
@@ -1,14 +1,13 @@
-$NetBSD: patch-fixincludes_inclhack.def,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-fixincludes_inclhack.def,v 1.2 2025/06/11 13:27:04 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- fixincludes/inclhack.def
+--- fixincludes/inclhack.def.orig      2025-05-23 11:02:03.804189823 +0000
 +++ fixincludes/inclhack.def
-@@ -194,33 +194,6 @@ fix = {
-       _EndOfHeader_;
+@@ -195,33 +195,6 @@ fix = {
  };
-
--/*
+ 
+ /*
 - *  SDKs for 10.13 and 10.14 omit the definitions for API_AVAILABLE where
 - *  __attribute__((availability)) is not supported.
 - */
@@ -35,22 +34,14 @@ Support Darwin/aarch64, from https://git
 -    "#define __API_UNAVAILABLE(...)\n";
 -};
 -
- /*
+-/*
   *  This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n)
   */
-@@ -1273,6 +1246,7 @@ fix = {
-     hackname  = apple_local_stdio_fn_deprecation;
-     mach      = "*-*-*darwin2*";
-     files     = stdio.h;
-+    files     = _stdio.h;
-     select    = "__deprecated_msg([^\n]*)$";
-     c_fix     = format;
-     c_fix_arg = "#if defined(__APPLE_LOCAL_DEPRECATIONS)\n"
-@@ -1350,32 +1324,6 @@ fix = {
-     test_text = "extern void* malloc( size_t );";
+ fix = {
+@@ -1352,32 +1326,6 @@ fix = {
  };
-
--/*
+ 
+ /*
 - *  macOS 10.12 <AvailabilityInternal.h> uses __attribute__((availability))
 - *  unconditionally.
 - */
@@ -76,6 +67,7 @@ Support Darwin/aarch64, from https://git
 -              "#define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg)))";
 -};
 -
- /*
+-/*
   *  For the AAB_darwin7_9_long_double_funcs fix (and later fixes for long long)
   *  to be useful, the main math.h must use <> and not "" includes.
+  */
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_ada_init.c
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_ada_init.c:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_ada_init.c:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_ada_init.c:1.1     Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_ada_init.c Wed Jun 11 13:27:04 2025
@@ -1,10 +1,10 @@
-$NetBSD: patch-gcc_ada_init.c,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_ada_init.c,v 1.2 2025/06/11 13:27:04 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/ada/init.c
+--- gcc/ada/init.c.orig        2025-05-23 11:02:04.044193610 +0000
 +++ gcc/ada/init.c
-@@ -2479,7 +2479,10 @@ __gnat_map_signal (int sig, siginfo_t *si, void *mcontext ATTRIBUTE_UNUSED)
+@@ -2479,7 +2479,10 @@ __gnat_map_signal (int sig, siginfo_t *s
        /* Reset the use of alt stack, so that the alt stack will be used
         for the next signal delivery.
         The stack can't be used in case of stack checking.  */
@@ -13,5 +13,5 @@ Support Darwin/aarch64, from https://git
        syscall (SYS_sigreturn, NULL, UC_RESET_ALT_STACK);
 +#pragma GCC diagnostic pop
        break;
-
+ 
      case SIGFPE:
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-attribs.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-attribs.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-attribs.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-attribs.cc:1.1  Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-attribs.cc      Wed Jun 11 13:27:04 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_c-family_c-attribs.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_c-family_c-attribs.cc,v 1.2 2025/06/11 13:27:04 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/c-family/c-attribs.cc
+--- gcc/c-family/c-attribs.cc.orig     2025-05-23 11:02:04.244196764 +0000
 +++ gcc/c-family/c-attribs.cc
-@@ -665,6 +665,18 @@ attribute_takes_identifier_p (const_tree attr_id)
+@@ -665,6 +665,18 @@ attribute_takes_identifier_p (const_tree
      return targetm.attribute_takes_identifier_p (attr_id);
  }
-
+ 
 +/* Returns TRUE iff the attribute indicated by ATTR_ID needs its
 +   arguments converted to string constants.  */
 +
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-common.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-common.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-common.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-common.cc:1.1   Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-common.cc       Wed Jun 11 13:27:04 2025
@@ -1,10 +1,10 @@
-$NetBSD: patch-gcc_c-family_c-common.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_c-family_c-common.cc,v 1.2 2025/06/11 13:27:04 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/c-family/c-common.cc
+--- gcc/c-family/c-common.cc.orig      2025-05-23 11:02:04.244196764 +0000
 +++ gcc/c-family/c-common.cc
-@@ -346,7 +346,11 @@ static constexpr hf_feature_info has_feature_table[] =
+@@ -346,7 +346,11 @@ static constexpr hf_feature_info has_fea
    { "enumerator_attributes",            HF_FLAG_NONE, 0 },
    { "tls",                              HF_FLAG_NONE, 0 },
    { "gnu_asm_goto_with_outputs",        HF_FLAG_EXT, 0 },
@@ -15,5 +15,5 @@ Support Darwin/aarch64, from https://git
 +  { "attribute_availability_with_replacement",  HF_FLAG_NONE, 0 },
 +  { "attribute_availability_with_version_underscores",  HF_FLAG_NONE, 0 }
  };
-
+ 
  /* Global visibility options.  */
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-lex.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-lex.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-lex.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-lex.cc:1.1      Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-lex.cc  Wed Jun 11 13:27:05 2025
@@ -1,11 +1,11 @@
-$NetBSD: patch-gcc_c-family_c-lex.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_c-family_c-lex.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/c-family/c-lex.cc
+--- gcc/c-family/c-lex.cc.orig 2025-05-23 11:02:04.248196827 +0000
 +++ gcc/c-family/c-lex.cc
-@@ -584,6 +584,21 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags,
-
+@@ -584,6 +584,21 @@ c_lex_with_flags (tree *value, location_
+ 
      case CPP_NUMBER:
        {
 +      /* If the user wants number-like entities to be returned as a raw
@@ -25,3 +25,4 @@ Support Darwin/aarch64, from https://git
 +
        const char *suffix = NULL;
        unsigned int flags = cpp_classify_number (parse_in, tok, &suffix, *loc);
+ 
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-opts.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-opts.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-opts.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-opts.cc:1.1     Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-opts.cc Wed Jun 11 13:27:05 2025
@@ -1,11 +1,11 @@
-$NetBSD: patch-gcc_c-family_c-opts.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_c-family_c-opts.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/c-family/c-opts.cc
+--- gcc/c-family/c-opts.cc.orig        2025-05-23 11:02:04.248196827 +0000
 +++ gcc/c-family/c-opts.cc
-@@ -1119,7 +1119,7 @@ c_common_post_options (const char **pfilename)
-
+@@ -1119,7 +1119,7 @@ c_common_post_options (const char **pfil
+ 
    if (flag_extern_tls_init)
      {
 -      if (!TARGET_SUPPORTS_ALIASES || !SUPPORTS_WEAK)
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-pragma.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-pragma.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-pragma.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-pragma.h:1.1    Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c-pragma.h        Wed Jun 11 13:27:05 2025
@@ -1,16 +1,16 @@
-$NetBSD: patch-gcc_c-family_c-pragma.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_c-family_c-pragma.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/c-family/c-pragma.h
+--- gcc/c-family/c-pragma.h.orig       2025-05-23 11:02:04.248196827 +0000
 +++ gcc/c-family/c-pragma.h
-@@ -276,6 +276,9 @@ extern void pragma_lex_discard_to_eol ();
+@@ -276,6 +276,9 @@ extern void pragma_lex_discard_to_eol ()
  #define C_LEX_STRING_NO_JOIN    2 /* Do not concatenate strings
                                       nor translate them into execution
                                       character set.  */
 +#define C_LEX_NUMBER_AS_STRING          4 /* Do not classify a number, but
 +                                     instead return it as a raw
 +                                     string.  */
-
+ 
  /* This is not actually available to pragma parsers.  It's merely a
     convenient location to declare this function for c-lex, after
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c.opt
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c.opt:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c.opt:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c.opt:1.1 Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c-family_c.opt     Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_c-family_c.opt,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_c-family_c.opt,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/c-family/c.opt
+--- gcc/c-family/c.opt.orig    2025-05-23 11:02:04.248196827 +0000
 +++ gcc/c-family/c.opt
 @@ -1708,6 +1708,10 @@ static-libmpxwrappers
  Driver WarnRemoved
  Removed in GCC 9.  This switch has no effect.
-
+ 
 +fallow-extended-attribute-placement
 +C ObjC C++ ObjC++ LTO Var(flag_allow_ext_attr_placement) Init(0)
 +Allow placement of attributes on function definitions.
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c_c-parser.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c_c-parser.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c_c-parser.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c_c-parser.cc:1.1  Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_c_c-parser.cc      Wed Jun 11 13:27:05 2025
@@ -1,8 +1,8 @@
-$NetBSD: patch-gcc_c_c-parser.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_c_c-parser.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/c/c-parser.cc
+--- gcc/c/c-parser.cc.orig     2025-05-23 11:02:04.256196953 +0000
 +++ gcc/c/c-parser.cc
 @@ -217,6 +217,9 @@ struct GTY(()) c_parser {
       should translate them to the execution character set (false
@@ -11,11 +11,11 @@ Support Darwin/aarch64, from https://git
 +  /* True if we want to lex arbitrary number-like sequences as their
 +     string representation.  */
 +  BOOL_BITFIELD lex_number_as_string : 1;
-
+ 
    /* Objective-C specific parser/lexer information.  */
-
-@@ -308,10 +311,10 @@ c_lex_one_token (c_parser *parser, c_token *token, bool raw = false)
-
+ 
+@@ -308,10 +311,10 @@ c_lex_one_token (c_parser *parser, c_tok
+ 
    if (raw || vec_safe_length (parser->raw_tokens) == 0)
      {
 +      int lex_flags = parser->lex_joined_string ? 0 : C_LEX_STRING_NO_JOIN;
@@ -28,7 +28,7 @@ Support Darwin/aarch64, from https://git
        token->id_kind = C_ID_NONE;
        token->keyword = RID_MAX;
        token->pragma_kind = PRAGMA_NONE;
-@@ -2579,15 +2582,28 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok,
+@@ -2579,15 +2582,28 @@ c_parser_declaration_or_fndef (c_parser 
            d = d->declarator;
          underspec_name = d->u.id.id;
        }
@@ -58,7 +58,7 @@ Support Darwin/aarch64, from https://git
          if (!diagnosed_no_specs && !specs->declspecs_seen_p)
            {
              diagnosed_no_specs = true;
-@@ -2599,8 +2615,9 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok,
+@@ -2599,8 +2615,9 @@ c_parser_declaration_or_fndef (c_parser 
          if (c_parser_next_token_is_keyword (parser, RID_ASM))
            asm_name = c_parser_simple_asm_expr (parser);
          if (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE))
@@ -69,10 +69,10 @@ Support Darwin/aarch64, from https://git
              if (c_parser_next_token_is (parser, CPP_OPEN_BRACE))
                {
                  /* This means there is an attribute specifier after
-@@ -5213,6 +5230,88 @@ c_parser_gnu_attribute_any_word (c_parser *parser)
+@@ -5213,6 +5230,88 @@ c_parser_gnu_attribute_any_word (c_parse
    return attr_name;
  }
-
+ 
 +/* Handle parsing clang-form attribute arguments, where we need to adjust
 +   the parsing rules to relate to a specific attribute.  */
 +
@@ -157,14 +157,14 @@ Support Darwin/aarch64, from https://git
 +
  /* Parse attribute arguments.  This is a common form of syntax
     covering all currently valid GNU and standard attributes.
-
-@@ -5378,9 +5477,13 @@ c_parser_gnu_attribute (c_parser *parser, tree attrs,
+ 
+@@ -5378,9 +5477,13 @@ c_parser_gnu_attribute (c_parser *parser
        attrs = chainon (attrs, attr);
        return attrs;
      }
 -  c_parser_consume_token (parser);
 +  c_parser_consume_token (parser); /* The '('.  */
-
+ 
 -  tree attr_args
 +  tree attr_args;
 +  if (attribute_clang_form_p (attr_name))
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.cc:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.cc   Wed Jun 11 13:27:05 2025
@@ -1,12 +1,12 @@
-$NetBSD: patch-gcc_calls.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_calls.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/calls.cc
+--- gcc/calls.cc.orig  2025-05-23 11:02:04.260197017 +0000
 +++ gcc/calls.cc
-@@ -1376,7 +1376,8 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
+@@ -1376,7 +1376,8 @@ initialize_argument_information (int num
         with those made by function.cc.  */
-
+ 
        /* See if this argument should be passed by invisible reference.  */
 -      function_arg_info arg (type, argpos < n_named_args);
 +      function_arg_info arg (type, argpos < n_named_args,
@@ -14,8 +14,8 @@ Support Darwin/aarch64, from https://git
        if (pass_by_reference (args_so_far_pnt, arg))
        {
          const bool callee_copies
-@@ -1496,10 +1497,13 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
-
+@@ -1496,10 +1497,13 @@ initialize_argument_information (int num
+ 
        unsignedp = TYPE_UNSIGNED (type);
        arg.type = type;
 -      arg.mode
@@ -31,8 +31,8 @@ Support Darwin/aarch64, from https://git
 +                                      &unsignedp, 0);
        args[i].unsignedp = unsignedp;
        args[i].mode = arg.mode;
-
-@@ -1549,6 +1553,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
+ 
+@@ -1549,6 +1553,7 @@ initialize_argument_information (int num
  #endif
                             reg_parm_stack_space,
                             args[i].pass_on_stack ? 0 : args[i].partial,
@@ -48,18 +48,18 @@ Support Darwin/aarch64, from https://git
  /* Output a library call to function ORGFUN (a SYMBOL_REF rtx)
     for a value of mode OUTMODE,
     with NARGS different arguments, passed as ARGS.
-@@ -4281,6 +4287,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
+@@ -4281,6 +4287,7 @@ emit_library_call_value_1 (int retval, r
                           argvec[count].reg != 0,
  #endif
                           reg_parm_stack_space, 0,
 +                         args_so_far,
                           NULL_TREE, &args_size, &argvec[count].locate);
-
+ 
        if (argvec[count].reg == 0 || argvec[count].partial != 0
-@@ -4351,8 +4358,16 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
+@@ -4351,8 +4358,16 @@ emit_library_call_value_1 (int retval, r
          val = force_operand (XEXP (slot, 0), NULL_RTX);
        }
-
+ 
 -      arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p,
 -                                      NULL_TREE, 0);
 +//      arg.mode = promote_function_mode (NULL_TREE, arg.mode, &unsigned_p,
@@ -75,7 +75,7 @@ Support Darwin/aarch64, from https://git
        argvec[count].mode = arg.mode;
        argvec[count].value = convert_modes (arg.mode, GET_MODE (val), val,
                                           unsigned_p);
-@@ -4372,6 +4387,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
+@@ -4372,6 +4387,7 @@ emit_library_call_value_1 (int retval, r
                               argvec[count].reg != 0,
  #endif
                               reg_parm_stack_space, argvec[count].partial,
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.h:1.1        Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_calls.h    Wed Jun 11 13:27:05 2025
@@ -1,8 +1,8 @@
-$NetBSD: patch-gcc_calls.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_calls.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/calls.h
+--- gcc/calls.h.orig   2025-05-23 11:02:04.260197017 +0000
 +++ gcc/calls.h
 @@ -35,24 +35,43 @@ class function_arg_info
  {
@@ -12,7 +12,7 @@ Support Darwin/aarch64, from https://git
 +    : type (NULL_TREE), mode (VOIDmode), named (false), last_named (false),
        pass_by_reference (false)
    {}
-
+ 
    /* Initialize an argument of mode MODE, either before or after promotion.  */
    function_arg_info (machine_mode mode, bool named)
 -    : type (NULL_TREE), mode (mode), named (named), pass_by_reference (false)
@@ -24,14 +24,14 @@ Support Darwin/aarch64, from https://git
 +    : type (NULL_TREE), mode (mode), named (named), last_named (last_named),
 +      pass_by_reference (false)
    {}
-
+ 
    /* Initialize an unpromoted argument of type TYPE.  */
    function_arg_info (tree type, bool named)
 -    : type (type), mode (TYPE_MODE (type)), named (named),
 +    : type (type), mode (TYPE_MODE (type)), named (named), last_named (false),
        pass_by_reference (false)
    {}
-
+ 
 +  /* Initialize an unpromoted argument of type TYPE.  */
 +  function_arg_info (tree type, bool named, bool last_named)
 +    : type (type), mode (TYPE_MODE (type)), named (named),
@@ -50,12 +50,12 @@ Support Darwin/aarch64, from https://git
 +    : type (type), mode (mode), named (named), last_named (last_named),
 +      pass_by_reference (false)
    {}
-
+ 
    /* Return true if the gimple-level type is an aggregate.  */
 @@ -105,6 +124,9 @@ public:
       "...").  See also TARGET_STRICT_ARGUMENT_NAMING.  */
    unsigned int named : 1;
-
+ 
 +  /* True if this is the last named argument. */
 +  unsigned int last_named : 1;
 +
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_collect2.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_collect2.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_collect2.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_collect2.cc:1.1    Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_collect2.cc        Wed Jun 11 13:27:05 2025
@@ -1,37 +1,37 @@
-$NetBSD: patch-gcc_collect2.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_collect2.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/collect2.cc
+--- gcc/collect2.cc.orig       2025-05-23 11:02:04.264197080 +0000
 +++ gcc/collect2.cc
-@@ -73,7 +73,7 @@ along with GCC; see the file COPYING3.  If not see
+@@ -73,7 +73,7 @@ along with GCC; see the file COPYING3.  
     In a cross-compiler, this means you need a cross nm,
     but that is not quite as unpleasant as special headers.  */
-
+ 
 -#if !defined (OBJECT_FORMAT_COFF)
 +#if !defined (OBJECT_FORMAT_COFF) && !defined (OBJECT_FORMAT_MACHO)
  #define OBJECT_FORMAT_NONE
  #endif
-
-@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3.  If not see
-
+ 
+@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3.  
+ 
  #endif /* OBJECT_FORMAT_COFF */
-
+ 
 -#ifdef OBJECT_FORMAT_NONE
 +#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO)
-
+ 
  /* Default flags to pass to nm.  */
  #ifndef NM_FLAGS
-@@ -525,7 +525,7 @@ static const char *const target_machine = TARGET_MACHINE;
-
+@@ -525,7 +525,7 @@ static const char *const target_machine 
+ 
     Return 0 if not found, otherwise return its name, allocated with malloc.  */
-
+ 
 -#ifdef OBJECT_FORMAT_NONE
 +#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO)
-
+ 
  /* Add an entry for the object file NAME to object file list LIST.
     New entries are added at the end of the list. The original pointer
-@@ -764,6 +764,12 @@ do_link (char **ld_argv, const char *atsuffix)
+@@ -764,6 +764,12 @@ do_link (char **ld_argv, const char *ats
      }
  }
  
@@ -42,7 +42,7 @@ Support Darwin/aarch64, from https://git
 +#endif
 +
  /* Main program.  */
-
+ 
  int
 @@ -777,16 +783,19 @@ main (int argc, char **argv)
        USE_BFD_LD,
@@ -108,11 +108,12 @@ Support Darwin/aarch64, from https://git
      {
        char *linker_name;
  # ifdef HOST_EXECUTABLE_SUFFIX
-@@ -2270,7 +2288,7 @@ write_aix_file (FILE *stream, struct id *list)
+@@ -2270,7 +2288,7 @@ write_aix_file (FILE *stream, struct id 
  }
  #endif
  
 -#ifdef OBJECT_FORMAT_NONE
 +#if defined (OBJECT_FORMAT_NONE) || defined (OBJECT_FORMAT_MACHO)
-
+ 
  /* Check to make sure the file is an LTO object file.  */
+ 
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common.opt
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common.opt:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common.opt:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common.opt:1.1     Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common.opt Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_common.opt,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_common.opt,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/common.opt
+--- gcc/common.opt.orig        2025-05-23 11:02:04.268197144 +0000
 +++ gcc/common.opt
 @@ -2919,6 +2919,10 @@ fstack-usage
  Common RejectNegative Var(flag_stack_usage)
  Output stack usage information on a per-function basis.
-
+ 
 +fstack-use-cumulative-args
 +Common RejectNegative Var(flag_stack_use_cumulative_args) Init(STACK_USE_CUMULATIVE_ARGS_INIT)
 +Use cumulative args-based stack layout hooks.
@@ -18,10 +18,11 @@ Support Darwin/aarch64, from https://git
 @@ -3292,6 +3296,10 @@ fuse-ld=mold
  Common Driver Negative(fuse-ld=mold)
  Use the Modern linker (MOLD) linker instead of the default linker.
-
+ 
 +fuse-ld=classic
 +Common Driver Negative(fuse-ld=classic)
 +Use the ld-classic linker instead of the default linker.
 +
  fuse-linker-plugin
  Common Undocumented Var(flag_use_linker_plugin)
+ 
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common_config_aarch64_aarch64-common.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common_config_aarch64_aarch64-common.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common_config_aarch64_aarch64-common.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common_config_aarch64_aarch64-common.cc:1.1        Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_common_config_aarch64_aarch64-common.cc    Wed Jun 11 13:27:05 2025
@@ -1,11 +1,11 @@
-$NetBSD: patch-gcc_common_config_aarch64_aarch64-common.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_common_config_aarch64_aarch64-common.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/common/config/aarch64/aarch64-common.cc
+--- gcc/common/config/aarch64/aarch64-common.cc.orig   2025-05-23 11:02:04.268197144 +0000
 +++ gcc/common/config/aarch64/aarch64-common.cc
-@@ -298,8 +298,12 @@ aarch64_get_extension_string_for_isa_flags
-
+@@ -298,8 +298,12 @@ aarch64_get_extension_string_for_isa_fla
+ 
       However, assemblers with Armv8-R AArch64 support should not have this
       issue, so we don't need this fix when targeting Armv8-R.  */
 -  auto explicit_flags = (!(current_flags & AARCH64_FL_V8R)
@@ -16,10 +16,10 @@ Support Darwin/aarch64, from https://git
 +#else
 +     0;
 +#endif
-
+ 
    /* Add the features in isa_flags & ~current_flags using the smallest
       possible number of extensions.  We can do this by iterating over the
-@@ -329,7 +333,10 @@ aarch64_get_extension_string_for_isa_flags
+@@ -329,7 +333,10 @@ aarch64_get_extension_string_for_isa_fla
      if (added & opt.flag_canonical)
        {
        outstr += "+";
@@ -29,9 +29,9 @@ Support Darwin/aarch64, from https://git
 +      else
 +        outstr += opt.name;
        }
-
+ 
    /* Remove the features in current_flags & ~isa_flags.  If the feature does
-@@ -358,7 +365,10 @@ aarch64_get_extension_string_for_isa_flags
+@@ -358,7 +365,10 @@ aarch64_get_extension_string_for_isa_fla
        {
          current_flags &= ~opt.flags_off;
          outstr += "+no";
@@ -42,3 +42,4 @@ Support Darwin/aarch64, from https://git
 +          outstr += opt.name;
        }
      }
+ 
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config.gcc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config.gcc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config.gcc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config.gcc:1.1     Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config.gcc Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_config.gcc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config.gcc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config.gcc
+--- gcc/config.gcc.orig        2025-05-23 11:02:04.272197204 +0000
 +++ gcc/config.gcc
 @@ -1177,13 +1177,22 @@ case ${target} in
    ;;
  esac
-
+ 
 -# Figure out if we need to enable heap trampolines by default
 +# Figure out if we need to enable heap trampolines
 +# and variadic functions handling.
@@ -28,7 +28,7 @@ Support Darwin/aarch64, from https://git
    tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=0"
    ;;
  esac
-@@ -1227,6 +1236,14 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
+@@ -1227,6 +1236,14 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | a
        done
        TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
        ;;
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-builtins.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-builtins.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-builtins.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-builtins.cc:1.1     Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-builtins.cc Wed Jun 11 13:27:05 2025
@@ -1,8 +1,8 @@
-$NetBSD: patch-gcc_config_aarch64_aarch64-builtins.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_aarch64-builtins.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/aarch64-builtins.cc
+--- gcc/config/aarch64/aarch64-builtins.cc.orig        2025-05-23 11:02:04.272197204 +0000
 +++ gcc/config/aarch64/aarch64-builtins.cc
 @@ -788,6 +788,8 @@ enum aarch64_builtins
    AARCH64_PLDX,
@@ -12,11 +12,11 @@ Support Darwin/aarch64, from https://git
 +  AARCH64_BUILTIN_CFSTRING,
    AARCH64_BUILTIN_MAX
  };
-
-@@ -887,6 +889,9 @@ tree aarch64_fp16_ptr_type_node = NULL_TREE;
+ 
+@@ -887,6 +889,9 @@ tree aarch64_fp16_ptr_type_node = NULL_T
  /* Back-end node type for brain float (bfloat) types.  */
  tree aarch64_bf16_ptr_type_node = NULL_TREE;
-
+ 
 +/* Pointer to __float128 on Mach-O, where the 128b float is not long double.  */
 +tree aarch64_float128_ptr_type_node = NULL_TREE;
 +
@@ -26,7 +26,7 @@ Support Darwin/aarch64, from https://git
 @@ -1662,6 +1667,29 @@ aarch64_init_bf16_types (void)
    aarch64_bf16_ptr_type_node = build_pointer_type (bfloat16_type_node);
  }
-
+ 
 +/* Initialize the backend REAL_TYPE type supporting __float128 on Mach-O,
 +   as well as the related built-ins.  */
 +static void
@@ -52,22 +52,22 @@ Support Darwin/aarch64, from https://git
 +
  /* Pointer authentication builtins that will become NOP on legacy platform.
     Currently, these builtins are for internal use only (libgcc EH unwinder).  */
-
-@@ -2047,8 +2075,9 @@ aarch64_general_init_builtins (void)
+ 
+@@ -2044,8 +2072,9 @@ aarch64_general_init_builtins (void)
    aarch64_init_fpsr_fpcr_builtins ();
-
+ 
    aarch64_init_fp16_types ();
 -
    aarch64_init_bf16_types ();
 +  if (TARGET_MACHO)
 +    aarch64_init_float128_types ();
-
+ 
    {
      aarch64_simd_switcher simd;
-@@ -2088,6 +2117,14 @@ aarch64_general_init_builtins (void)
+@@ -2079,6 +2108,14 @@ aarch64_general_init_builtins (void)
      handle_arm_acle_h ();
  }
-
+ 
 +void
 +aarch64_init_subtarget_builtins (void)
 +{
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-c.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-c.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-c.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-c.cc:1.1    Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-c.cc        Wed Jun 11 13:27:05 2025
@@ -1,10 +1,10 @@
-$NetBSD: patch-gcc_config_aarch64_aarch64-c.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_aarch64-c.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/aarch64-c.cc
+--- gcc/config/aarch64/aarch64-c.cc.orig       2025-05-23 11:02:04.272197204 +0000
 +++ gcc/config/aarch64/aarch64-c.cc
-@@ -285,6 +285,16 @@ aarch64_cpu_cpp_builtins (cpp_reader *pfile)
+@@ -285,6 +285,16 @@ aarch64_cpu_cpp_builtins (cpp_reader *pf
  {
    aarch64_define_unconditional_macros (pfile);
    aarch64_update_cpp_builtins (pfile);
@@ -19,11 +19,11 @@ Support Darwin/aarch64, from https://git
 +      builtin_define ("__builtin_nansq=__builtin_nansf128");
 +    }
  }
-
+ 
  /* Hook to validate the current #pragma GCC target and set the state, and
 @@ -424,4 +434,8 @@ aarch64_register_pragmas (void)
    targetm.check_builtin_call = aarch64_check_builtin_call;
-
+ 
    c_register_pragma ("GCC", "aarch64", aarch64_pragma_aarch64);
 +
 +#ifdef REGISTER_SUBTARGET_PRAGMAS
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-cores.def
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-cores.def:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-cores.def:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-cores.def:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-cores.def   Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_config_aarch64_aarch64-cores.def,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_aarch64-cores.def,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/aarch64-cores.def
+--- gcc/config/aarch64/aarch64-cores.def.orig  2025-05-23 11:02:04.272197204 +0000
 +++ gcc/config/aarch64/aarch64-cores.def
-@@ -166,6 +166,17 @@ AARCH64_CORE("cortex-a76.cortex-a55",  cortexa76cortexa55, cortexa53, V8_2A,  (F
+@@ -167,6 +167,17 @@ AARCH64_CORE("cortex-a76.cortex-a55",  c
  /* Armv8-R Architecture Processors.  */
  AARCH64_CORE("cortex-r82", cortexr82, cortexa53, V8R, (), cortexa53, 0x41, 0xd15, -1)
-
+ 
 +/* Apple (A12 and M) cores.
 +   Apple implementer ID from xnu,
 +   guesses for part #, guesses for scheduler ident, generic_armv8_a for costs.
@@ -20,5 +20,5 @@ Support Darwin/aarch64, from https://git
 +AARCH64_CORE("apple-m3", applem3, cortexa57, V8_4A,  (I8MM, BF16, F16, SB, SSBS), generic_armv8_a, 0x61, 0x23, -1)
 +
  /* Armv9.0-A Architecture Processors.  */
-
+ 
  /* Arm ('A') cores. */
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-protos.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-protos.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-protos.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-protos.h:1.1        Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-protos.h    Wed Jun 11 13:27:05 2025
@@ -1,8 +1,8 @@
-$NetBSD: patch-gcc_config_aarch64_aarch64-protos.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_aarch64-protos.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/aarch64-protos.h
+--- gcc/config/aarch64/aarch64-protos.h.orig   2025-05-23 11:02:04.276197268 +0000
 +++ gcc/config/aarch64/aarch64-protos.h
 @@ -109,6 +109,14 @@ enum aarch64_symbol_type
    SYMBOL_TLSLE24,
@@ -18,7 +18,7 @@ Support Darwin/aarch64, from https://git
 +  SYMBOL_MO_LARGE_TLS,
    SYMBOL_FORCE_TO_MEM
  };
-
+ 
 @@ -748,6 +756,7 @@ void aarch64_post_cfi_startproc (void);
  poly_int64 aarch64_initial_elimination_offset (unsigned, unsigned);
  int aarch64_get_condition_code (rtx);
@@ -27,7 +27,7 @@ Support Darwin/aarch64, from https://git
  bool aarch64_bitmask_imm (unsigned HOST_WIDE_INT val, machine_mode);
  unsigned HOST_WIDE_INT aarch64_and_split_imm1 (HOST_WIDE_INT val_in);
  unsigned HOST_WIDE_INT aarch64_and_split_imm2 (HOST_WIDE_INT val_in);
-@@ -782,7 +791,11 @@ bool aarch64_is_extend_from_extract (scalar_int_mode, rtx, rtx);
+@@ -782,7 +791,11 @@ bool aarch64_is_extend_from_extract (sca
  bool aarch64_is_long_call_p (rtx);
  bool aarch64_is_noplt_call_p (rtx);
  bool aarch64_label_mentioned_p (rtx);
@@ -39,8 +39,8 @@ Support Darwin/aarch64, from https://git
  void aarch64_asm_output_alias (FILE *, const tree, const tree);
  void aarch64_asm_output_external (FILE *, tree, const char*);
  bool aarch64_legitimate_pic_operand_p (rtx);
-@@ -999,6 +1012,7 @@ void aarch64_override_options_internal (struct gcc_options *);
-
+@@ -999,6 +1012,7 @@ void aarch64_override_options_internal (
+ 
  const char *aarch64_general_mangle_builtin_type (const_tree);
  void aarch64_general_init_builtins (void);
 +void aarch64_init_subtarget_builtins (void);
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-tune.md
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-tune.md:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-tune.md:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-tune.md:1.1 Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64-tune.md     Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_config_aarch64_aarch64-tune.md,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_aarch64-tune.md,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/aarch64-tune.md
+--- gcc/config/aarch64/aarch64-tune.md.orig    2025-05-23 11:03:15.289317443 +0000
 +++ gcc/config/aarch64/aarch64-tune.md
 @@ -1,5 +1,5 @@
  ;; -*- buffer-read-only: t -*-
  ;; Generated automatically by gentune.sh from aarch64-cores.def
  (define_attr "tune"
--      
"cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa520,cortexa710,cortexa715,cortexa720,cortexx2,cortexx3,cortexx4,neoversen2,cobalt100,neoversev2,grace,demeter,generic,generic_armv8_a,generic_armv9_a"
+-      
"cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,fujitsu_monaka,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa520,cortexa710,cortexa715,cortexa720,cortexa725,cortexx2,cortexx3,cortexx4,cortexx925,neoversen2,cobalt100,neoversen3,neoversev2,grace,neoversev3,neoversev3ae,demeter,generic,generic_armv8_a,generic_armv9_a"
 +      
"cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,applea12,applem1,applem2,applem3,cortexa510,cortexa520,cortexa710,cortexa715,cortexa720,cortexx2,cortexx3,cortexx4,neoversen2,cobalt100,neoversev2,grace,demeter,generic,generic_armv8_a,generic_armv9_a"
        (const (symbol_ref "((enum attr_tune) aarch64_tune)")))
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.cc:1.1      Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.cc  Wed Jun 11 13:27:05 2025
@@ -1,10 +1,10 @@
-$NetBSD: patch-gcc_config_aarch64_aarch64.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_aarch64.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/aarch64.cc
+--- gcc/config/aarch64/aarch64.cc.orig 2025-05-23 11:02:04.284197394 +0000
 +++ gcc/config/aarch64/aarch64.cc
-@@ -329,8 +329,10 @@ static bool aarch64_vfp_is_call_or_return_candidate (machine_mode,
+@@ -329,8 +329,10 @@ static bool aarch64_vfp_is_call_or_retur
                                                     const_tree,
                                                     machine_mode *, int *,
                                                     bool *, bool);
@@ -15,7 +15,7 @@ Support Darwin/aarch64, from https://git
  static void aarch64_override_options_after_change (void);
  static bool aarch64_vector_mode_supported_p (machine_mode);
  static int aarch64_address_cost (rtx, machine_mode, addr_space_t, bool);
-@@ -848,6 +850,9 @@ static const attribute_spec aarch64_gnu_attributes[] =
+@@ -849,6 +851,9 @@ static const attribute_spec aarch64_gnu_
  {
    /* { name, min_len, max_len, decl_req, type_req, fn_type_req,
         affects_type_identity, handler, exclude } */
@@ -25,7 +25,7 @@ Support Darwin/aarch64, from https://git
    { "aarch64_vector_pcs", 0, 0, false, true,  true,  true,
                          handle_aarch64_vector_pcs_attribute, NULL },
    { "arm_sve_vector_bits", 1, 1, false, true,  false, true,
-@@ -2067,7 +2072,7 @@ aarch64_hard_regno_mode_ok (unsigned regno, machine_mode mode)
+@@ -2068,7 +2073,7 @@ aarch64_hard_regno_mode_ok (unsigned reg
        if (known_le (GET_MODE_SIZE (mode), 8))
        return true;
        if (known_le (GET_MODE_SIZE (mode), 16))
@@ -34,7 +34,7 @@ Support Darwin/aarch64, from https://git
      }
    else if (FP_REGNUM_P (regno))
      {
-@@ -2113,8 +2118,10 @@ static bool
+@@ -2114,8 +2119,10 @@ static bool
  aarch64_takes_arguments_in_sve_regs_p (const_tree fntype)
  {
    CUMULATIVE_ARGS args_so_far_v;
@@ -44,9 +44,9 @@ Support Darwin/aarch64, from https://git
 -                              NULL_TREE, 0, true);
 +                              NULL_TREE, -1, true);
    cumulative_args_t args_so_far = pack_cumulative_args (&args_so_far_v);
-
+ 
    for (tree chain = TYPE_ARG_TYPES (fntype);
-@@ -2861,6 +2868,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm,
+@@ -2863,6 +2870,7 @@ aarch64_load_symref_appropriately (rtx d
    switch (type)
      {
      case SYMBOL_SMALL_ABSOLUTE:
@@ -54,10 +54,10 @@ Support Darwin/aarch64, from https://git
        {
        /* In ILP32, the mode of dest can be either SImode or DImode.  */
        rtx tmp_reg = dest;
-@@ -2871,6 +2879,21 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm,
+@@ -2873,6 +2881,21 @@ aarch64_load_symref_appropriately (rtx d
        if (can_create_pseudo_p ())
          tmp_reg = gen_reg_rtx (mode);
-
+ 
 +      if (TARGET_MACHO)
 +        {
 +          rtx sym, off;
@@ -76,15 +76,15 @@ Support Darwin/aarch64, from https://git
        emit_move_insn (tmp_reg, gen_rtx_HIGH (mode, copy_rtx (imm)));
        emit_insn (gen_add_losym (dest, tmp_reg, imm));
        return;
-@@ -2954,6 +2977,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm,
+@@ -2956,6 +2979,7 @@ aarch64_load_symref_appropriately (rtx d
        return;
        }
-
+ 
 +    case SYMBOL_MO_SMALL_GOT:
      case SYMBOL_SMALL_GOT_4G:
        emit_insn (gen_rtx_SET (dest, imm));
        return;
-@@ -6026,6 +6050,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm)
+@@ -6028,6 +6052,7 @@ aarch64_expand_mov_immediate (rtx dest, 
        case SYMBOL_SMALL_TLSIE:
        case SYMBOL_SMALL_GOT_28K:
        case SYMBOL_SMALL_GOT_4G:
@@ -92,42 +92,42 @@ Support Darwin/aarch64, from https://git
        case SYMBOL_TINY_GOT:
        case SYMBOL_TINY_TLSIE:
          if (const_offset != 0)
-@@ -6039,6 +6064,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm)
+@@ -6041,6 +6066,7 @@ aarch64_expand_mov_immediate (rtx dest, 
          /* FALLTHRU */
-
+ 
        case SYMBOL_SMALL_ABSOLUTE:
 +      case SYMBOL_MO_SMALL_PCR:
        case SYMBOL_TINY_ABSOLUTE:
        case SYMBOL_TLSLE12:
        case SYMBOL_TLSLE24:
-@@ -6628,6 +6654,7 @@ aarch64_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED)
+@@ -6630,6 +6656,7 @@ aarch64_return_in_memory (const_tree typ
    gcc_unreachable ();
  }
-
+ 
 +#if !TARGET_MACHO
  static bool
  aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode,
                               const_tree type, int *nregs)
-@@ -6637,6 +6664,7 @@ aarch64_vfp_is_call_candidate (cumulative_args_t pcum_v, machine_mode mode,
+@@ -6639,6 +6666,7 @@ aarch64_vfp_is_call_candidate (cumulativ
                                                  &pcum->aapcs_vfp_rmode,
                                                  nregs, NULL, pcum->silent_p);
  }
 +#endif
-
+ 
  /* Given MODE and TYPE of a function argument, return the alignment in
     bits.  The idea is to suppress any stronger alignment requested by
-@@ -6665,7 +6693,7 @@ aarch64_function_arg_alignment (machine_mode mode, const_tree type,
+@@ -6667,7 +6695,7 @@ aarch64_function_arg_alignment (machine_
    if (integer_zerop (TYPE_SIZE (type)))
      return 0;
-
+ 
 -  gcc_assert (TYPE_MODE (type) == mode);
 +  gcc_assert (TARGET_MACHO || TYPE_MODE (type) == mode);
-
+ 
    if (!AGGREGATE_TYPE_P (type))
      {
-@@ -6863,6 +6891,14 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg)
+@@ -6865,6 +6893,14 @@ aarch64_layout_arg (cumulative_args_t pc
       Both behaviors were wrong, but in different cases.  */
-
+ 
    pcum->aapcs_arg_processed = true;
 +  if (TARGET_MACHO)
 +    {
@@ -137,10 +137,10 @@ Support Darwin/aarch64, from https://git
 +                                        &abi_break_gcc_13, &abi_break_gcc_14);
 +      pcum->darwinpcs_arg_padding = BITS_PER_UNIT;
 +    }
-
+ 
    pure_scalable_type_info pst_info;
    if (type && pst_info.analyze_registers (type))
-@@ -6922,13 +6958,29 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg)
+@@ -6924,13 +6960,29 @@ aarch64_layout_arg (cumulative_args_t pc
      /* No frontends can create types with variable-sized modes, so we
         shouldn't be asked to pass or return them.  */
      size = GET_MODE_SIZE (mode).to_constant ();
@@ -150,7 +150,7 @@ Support Darwin/aarch64, from https://git
 +    pcum->darwinpcs_stack_bytes = size;
 +
    size = ROUND_UP (size, UNITS_PER_WORD);
-
+ 
    allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
 +  bool is_ha = false;
 +#if !TARGET_MACHO
@@ -168,12 +168,12 @@ Support Darwin/aarch64, from https://git
 +                                              pcum->silent_p);
 +#endif
    gcc_assert (!sve_p || !allocate_nvrn);
-
+ 
    unsigned int alignment
-@@ -6957,7 +7009,13 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg)
+@@ -6959,7 +7011,13 @@ aarch64_layout_arg (cumulative_args_t pc
        if (!pcum->silent_p && !TARGET_FLOAT)
        aarch64_err_no_fpadvsimd (mode);
-
+ 
 -      if (nvrn + nregs <= NUM_FP_ARG_REGS)
 +      if (TARGET_MACHO
 +        && !arg.named)
@@ -185,7 +185,7 @@ Support Darwin/aarch64, from https://git
        {
          pcum->aapcs_nextnvrn = nvrn + nregs;
          if (!aarch64_composite_type_p (type, mode))
-@@ -6987,6 +7045,7 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg)
+@@ -6989,6 +7047,7 @@ aarch64_layout_arg (cumulative_args_t pc
                }
              pcum->aapcs_reg = par;
            }
@@ -193,7 +193,7 @@ Support Darwin/aarch64, from https://git
          return;
        }
        else
-@@ -7003,14 +7062,24 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg)
+@@ -7005,14 +7064,24 @@ aarch64_layout_arg (cumulative_args_t pc
    /* C6 - C9.  though the sign and zero extension semantics are
       handled elsewhere.  This is the case where the argument fits
       entirely general registers.  */
@@ -201,7 +201,7 @@ Support Darwin/aarch64, from https://git
    if (allocate_ncrn && (ncrn + nregs <= NUM_ARG_REGS))
      {
        gcc_assert (nregs == 0 || nregs == 1 || nregs == 2);
-
+ 
 +      if (TARGET_MACHO
 +        && !arg.named)
 +      {
@@ -219,7 +219,7 @@ Support Darwin/aarch64, from https://git
        {
          /* Emit a warning if the alignment changed when taking the
             'packed' attribute into account.  */
-@@ -7080,8 +7149,8 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg)
+@@ -7082,8 +7151,8 @@ aarch64_layout_arg (cumulative_args_t pc
            }
          pcum->aapcs_reg = par;
        }
@@ -228,8 +228,8 @@ Support Darwin/aarch64, from https://git
 +      pcum->darwinpcs_stack_bytes = 0;
        return;
      }
-
-@@ -7091,7 +7160,81 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg)
+ 
+@@ -7093,7 +7162,81 @@ aarch64_layout_arg (cumulative_args_t pc
    /* The argument is passed on stack; record the needed number of words for
       this argument and align the total size if necessary.  */
  on_stack:
@@ -309,19 +309,19 @@ Support Darwin/aarch64, from https://git
 +      }
 +      return;
 +    }
-
+ 
    if (warn_pcs_change_le_gcc14
        && abi_break_gcc_13
-@@ -7107,6 +7250,8 @@ on_stack:
+@@ -7109,6 +7252,8 @@ on_stack:
      inform (input_location, "parameter passing for argument of type "
            "%qT changed in GCC 14.1", type);
-
+ 
 +  /* size was already rounded up to PARM_BOUNDARY.  */
 +  pcum->aapcs_stack_words = size / UNITS_PER_WORD;
    if (alignment == 16 * BITS_PER_UNIT)
      {
        int new_size = ROUND_UP (pcum->aapcs_stack_size, 16 / UNITS_PER_WORD);
-@@ -7211,12 +7356,33 @@ aarch64_init_cumulative_args (CUMULATIVE_ARGS *pcum,
+@@ -7213,12 +7358,33 @@ aarch64_init_cumulative_args (CUMULATIVE
    pcum->aapcs_arg_processed = false;
    pcum->aapcs_stack_words = 0;
    pcum->aapcs_stack_size = 0;
@@ -352,10 +352,10 @@ Support Darwin/aarch64, from https://git
      = (fntype ? aarch64_fntype_shared_flags (fntype, "zt0") : 0U);
    pcum->num_sme_mode_switch_args = 0;
 +  pcum->aapcs_vfp_rmode = VOIDmode;
-
+ 
    if (!silent_p
        && !TARGET_FLOAT
-@@ -7255,9 +7421,11 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v,
+@@ -7257,9 +7423,11 @@ aarch64_function_arg_advance (cumulative
        || pcum->pcs_variant == ARM_PCS_SVE)
      {
        aarch64_layout_arg (pcum_v, arg);
@@ -369,8 +369,8 @@ Support Darwin/aarch64, from https://git
 +     if (pcum->aapcs_reg
          && aarch64_call_switches_pstate_sm (pcum->isa_mode))
        aarch64_record_sme_mode_switch_args (pcum);
-
-@@ -7268,6 +7436,12 @@ aarch64_function_arg_advance (cumulative_args_t pcum_v,
+ 
+@@ -7270,6 +7438,12 @@ aarch64_function_arg_advance (cumulative
        pcum->aapcs_stack_size += pcum->aapcs_stack_words;
        pcum->aapcs_stack_words = 0;
        pcum->aapcs_reg = NULL_RTX;
@@ -382,11 +382,11 @@ Support Darwin/aarch64, from https://git
 +      = pcum->darwinpcs_n_args_processed + 1 == pcum->darwinpcs_n_named;
      }
  }
-
-@@ -7279,12 +7453,15 @@ aarch64_function_arg_regno_p (unsigned regno)
+ 
+@@ -7281,12 +7455,15 @@ aarch64_function_arg_regno_p (unsigned r
          || (PR_REGNUM_P (regno) && regno < P0_REGNUM + NUM_PR_ARG_REGS));
  }
-
+ 
 -/* Implement FUNCTION_ARG_BOUNDARY.  Every parameter gets at least
 -   PARM_BOUNDARY bits of alignment, but will be given anything up
 -   to STACK_BOUNDARY bits if the type requires it.  This makes sure
@@ -402,10 +402,10 @@ Support Darwin/aarch64, from https://git
 +
 +   For darwinpcs, this is only called to lower va_arg entries which are
 +   always aligned as for AAPCS64.  */
-
+ 
  static unsigned int
  aarch64_function_arg_boundary (machine_mode mode, const_tree type)
-@@ -7298,8 +7475,108 @@ aarch64_function_arg_boundary (machine_mode mode, const_tree type)
+@@ -7300,8 +7477,108 @@ aarch64_function_arg_boundary (machine_m
                                                           &abi_break_gcc_14);
    /* We rely on aarch64_layout_arg and aarch64_gimplify_va_arg_expr
       to emit warnings about ABI incompatibility.  */
@@ -512,17 +512,17 @@ Support Darwin/aarch64, from https://git
 +gcc_checking_assert (boundary == pcum->darwinpcs_arg_padding);
 +  return boundary;
  }
-
+ 
  /* Implement TARGET_GET_RAW_RESULT_MODE and TARGET_GET_RAW_ARG_MODE.  */
-@@ -10698,6 +10975,7 @@ aarch64_classify_address (struct aarch64_address_info *info,
+@@ -10714,6 +10991,7 @@ aarch64_classify_address (struct aarch64
        /* load literal: pc-relative constant pool entry.  Only supported
           for SI mode or larger.  */
        info->type = ADDRESS_SYMBOLIC;
 +      info->offset = NULL_RTX;
-
+ 
        if (!load_store_pair_p
          && GET_MODE_SIZE (mode).is_constant (&const_size)
-@@ -10705,6 +10983,7 @@ aarch64_classify_address (struct aarch64_address_info *info,
+@@ -10721,6 +10999,7 @@ aarch64_classify_address (struct aarch64
        {
          poly_int64 offset;
          rtx sym = strip_offset_and_salt (x, &offset);
@@ -530,7 +530,7 @@ Support Darwin/aarch64, from https://git
          return ((LABEL_REF_P (sym)
                   || (SYMBOL_REF_P (sym)
                       && CONSTANT_POOL_ADDRESS_P (sym)
-@@ -10722,10 +11001,13 @@ aarch64_classify_address (struct aarch64_address_info *info,
+@@ -10738,10 +11017,13 @@ aarch64_classify_address (struct aarch64
          poly_int64 offset;
          HOST_WIDE_INT const_offset;
          rtx sym = strip_offset_and_salt (info->offset, &offset);
@@ -545,10 +545,10 @@ Support Darwin/aarch64, from https://git
            {
              /* The symbol and offset must be aligned to the access size.  */
              unsigned int align;
-@@ -10775,6 +11057,55 @@ aarch64_address_valid_for_prefetch_p (rtx x, bool strict_p)
+@@ -10791,6 +11073,55 @@ aarch64_address_valid_for_prefetch_p (rt
    if (!res)
      return false;
-
+ 
 +  /* For ELF targets using GAS, we emit prfm unconditionally; GAS will alter
 +     the instruction to pick the prfum form where possible (i.e. when the
 +     offset is in the range -256..255) and fall back to prfm otherwise.
@@ -601,10 +601,10 @@ Support Darwin/aarch64, from https://git
    /* ... except writeback forms.  */
    return addr.type != ADDRESS_REG_WB;
  }
-@@ -11908,6 +12239,144 @@ sizetochar (int size)
+@@ -11924,6 +12255,144 @@ sizetochar (int size)
      }
  }
-
+ 
 +static void
 +output_macho_postfix_expr (FILE *file, rtx x, const char *postfix)
 +{
@@ -746,10 +746,10 @@ Support Darwin/aarch64, from https://git
  /* Print operand X to file F in a target specific manner according to CODE.
     The acceptable formatting commands given by CODE are:
       'c':             An integer or symbol address without a preceding #
-@@ -11981,6 +12450,12 @@ aarch64_print_operand (FILE *f, rtx x, int code)
+@@ -11997,6 +12466,12 @@ aarch64_print_operand (FILE *f, rtx x, i
        }
        break;
-
+ 
 +    case 'J':
 +      output_macho_postfix_expr (f, x, "PAGEOFF");
 +      break;
@@ -759,7 +759,7 @@ Support Darwin/aarch64, from https://git
      case 'e':
        {
        x = unwrap_const_vec_duplicate (x);
-@@ -12313,7 +12788,7 @@ aarch64_print_operand (FILE *f, rtx x, int code)
+@@ -12329,7 +12804,7 @@ aarch64_print_operand (FILE *f, rtx x, i
      case 'A':
        if (GET_CODE (x) == HIGH)
        x = XEXP (x, 0);
@@ -768,7 +768,7 @@ Support Darwin/aarch64, from https://git
        switch (aarch64_classify_symbolic_expression (x))
        {
        case SYMBOL_SMALL_GOT_4G:
-@@ -12344,9 +12819,26 @@ aarch64_print_operand (FILE *f, rtx x, int code)
+@@ -12360,9 +12835,26 @@ aarch64_print_operand (FILE *f, rtx x, i
          break;
        }
        output_addr_const (asm_out_file, x);
@@ -789,36 +789,36 @@ Support Darwin/aarch64, from https://git
 +      }
 +#endif
        break;
-
+ 
      case 'L':
 +#if !TARGET_MACHO
        switch (aarch64_classify_symbolic_expression (x))
        {
        case SYMBOL_SMALL_GOT_4G:
-@@ -12384,10 +12876,12 @@ aarch64_print_operand (FILE *f, rtx x, int code)
+@@ -12400,10 +12892,12 @@ aarch64_print_operand (FILE *f, rtx x, i
        default:
          break;
        }
 +#endif
        output_addr_const (asm_out_file, x);
        break;
-
+ 
      case 'G':
 +#if !TARGET_MACHO
        switch (aarch64_classify_symbolic_expression (x))
        {
        case SYMBOL_TLSLE24:
-@@ -12396,6 +12890,7 @@ aarch64_print_operand (FILE *f, rtx x, int code)
+@@ -12412,6 +12906,7 @@ aarch64_print_operand (FILE *f, rtx x, i
        default:
          break;
        }
 +#endif
        output_addr_const (asm_out_file, x);
        break;
-
-@@ -12561,8 +13056,13 @@ aarch64_print_address_internal (FILE *f, machine_mode mode, rtx x,
+ 
+@@ -12577,8 +13072,13 @@ aarch64_print_address_internal (FILE *f,
        break;
-
+ 
        case ADDRESS_LO_SUM:
 +#if TARGET_MACHO
 +      asm_fprintf (f, "[%s, #", reg_names [REGNO (addr.base)]);
@@ -829,8 +829,8 @@ Support Darwin/aarch64, from https://git
 +#endif
        asm_fprintf (f, "]");
        return true;
-
-@@ -12870,7 +13370,23 @@ aarch64_frame_pointer_required ()
+ 
+@@ -12886,7 +13386,23 @@ aarch64_frame_pointer_required ()
  {
    /* If the function needs to record the incoming value of PSTATE.SM,
       make sure that the slot is accessible from the frame pointer.  */
@@ -853,38 +853,38 @@ Support Darwin/aarch64, from https://git
 +
 +  return flag_omit_frame_pointer != 1;
  }
-
+ 
  static bool
-@@ -13098,6 +13614,8 @@ aarch64_asm_output_labelref (FILE* f, const char *name)
+@@ -13114,6 +13630,8 @@ aarch64_asm_output_labelref (FILE* f, co
    asm_fprintf (f, "%U%s", name);
  }
-
+ 
 +#if !TARGET_MACHO
 +
  static void
  aarch64_elf_asm_constructor (rtx symbol, int priority)
  {
-@@ -13137,6 +13655,7 @@ aarch64_elf_asm_destructor (rtx symbol, int priority)
+@@ -13153,6 +13671,7 @@ aarch64_elf_asm_destructor (rtx symbol, 
        assemble_aligned_integer (POINTER_BYTES, symbol);
      }
  }
 +#endif
-
+ 
  const char*
  aarch64_output_casesi (rtx *operands)
-@@ -13289,7 +13808,11 @@ aarch64_select_rtx_section (machine_mode mode,
+@@ -13305,7 +13824,11 @@ aarch64_select_rtx_section (machine_mode
    if (aarch64_can_use_per_function_literal_pools_p ())
      return function_section (current_function_decl);
-
+ 
 +#if TARGET_MACHO
 +  return machopic_select_rtx_section (mode, x, align);
 +#else
    return default_elf_select_rtx_section (mode, x, align);
 +#endif
  }
-
+ 
  /* Implement ASM_OUTPUT_POOL_EPILOGUE.  */
-@@ -15559,15 +16082,17 @@ aarch64_init_builtins ()
+@@ -15575,15 +16098,17 @@ aarch64_init_builtins ()
  {
    aarch64_general_init_builtins ();
    aarch64_sve::init_builtins ();
@@ -893,7 +893,7 @@ Support Darwin/aarch64, from https://git
 -#endif
 +  aarch64_init_subtarget_builtins ();
  }
-
+ 
  /* Implement TARGET_FOLD_BUILTIN.  */
  static tree
  aarch64_fold_builtin (tree fndecl, int nargs, tree *args, bool)
@@ -905,7 +905,7 @@ Support Darwin/aarch64, from https://git
    unsigned int code = DECL_MD_FUNCTION_CODE (fndecl);
    unsigned int subcode = code >> AARCH64_BUILTIN_SHIFT;
    tree type = TREE_TYPE (TREE_TYPE (fndecl));
-@@ -18979,10 +19504,14 @@ initialize_aarch64_code_model (struct gcc_options *opts)
+@@ -18995,10 +19520,14 @@ initialize_aarch64_code_model (struct gc
        }
        break;
      case AARCH64_CMODEL_LARGE:
@@ -922,7 +922,7 @@ Support Darwin/aarch64, from https://git
        sorry ("code model %qs not supported in ilp32 mode", "large");
        break;
      case AARCH64_CMODEL_TINY_PIC:
-@@ -20899,7 +21428,9 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset)
+@@ -20922,7 +21451,9 @@ aarch64_classify_symbol (rtx x, HOST_WID
        case AARCH64_CMODEL_SMALL_SPIC:
        case AARCH64_CMODEL_SMALL_PIC:
        case AARCH64_CMODEL_SMALL:
@@ -930,13 +930,13 @@ Support Darwin/aarch64, from https://git
 +        return TARGET_MACHO
 +               ? SYMBOL_MO_SMALL_PCR
 +               : SYMBOL_SMALL_ABSOLUTE;
-
+ 
        default:
          gcc_unreachable ();
-@@ -20935,10 +21466,22 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset)
-
+@@ -20958,10 +21489,22 @@ aarch64_classify_symbol (rtx x, HOST_WID
+ 
          return SYMBOL_TINY_ABSOLUTE;
-
+ 
 -
        case AARCH64_CMODEL_SMALL_SPIC:
        case AARCH64_CMODEL_SMALL_PIC:
@@ -957,17 +957,17 @@ Support Darwin/aarch64, from https://git
          if ((flag_pic || SYMBOL_REF_WEAK (x))
              && !aarch64_symbol_binds_local_p (x))
            return aarch64_cmodel == AARCH64_CMODEL_SMALL_SPIC
-@@ -20950,7 +21493,8 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset)
+@@ -20973,7 +21516,8 @@ aarch64_classify_symbol (rtx x, HOST_WID
                || offset_within_block_p (x, offset)))
            return SYMBOL_FORCE_TO_MEM;
-
+ 
 -        return SYMBOL_SMALL_ABSOLUTE;
 +        return TARGET_MACHO ? SYMBOL_MO_SMALL_PCR
 +                            : SYMBOL_SMALL_ABSOLUTE;
-
+ 
        case AARCH64_CMODEL_LARGE:
          /* This is alright even in PIC code as the constant
-@@ -21080,7 +21624,10 @@ static GTY(()) tree va_list_type;
+@@ -21103,7 +21647,10 @@ static GTY(()) tree va_list_type;
       void *__vr_top;
       int   __gr_offs;
       int   __vr_offs;
@@ -976,13 +976,13 @@ Support Darwin/aarch64, from https://git
 +
 +  darwinpcs uses 'char *' for the va_list (in common with other platform
 +  ports).  */
-
+ 
  static tree
  aarch64_build_builtin_va_list (void)
-@@ -21088,6 +21635,13 @@ aarch64_build_builtin_va_list (void)
+@@ -21111,6 +21658,13 @@ aarch64_build_builtin_va_list (void)
    tree va_list_name;
    tree f_stack, f_grtop, f_vrtop, f_groff, f_vroff;
-
+ 
 +  /* darwinpcs uses a simple char * for this.  */
 +  if (TARGET_MACHO)
 +    {
@@ -993,10 +993,10 @@ Support Darwin/aarch64, from https://git
    /* Create the type.  */
    va_list_type = lang_hooks.types.make_type (RECORD_TYPE);
    /* Give it the required name.  */
-@@ -21159,6 +21713,13 @@ aarch64_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
+@@ -21182,6 +21736,13 @@ aarch64_expand_builtin_va_start (tree va
    int vr_save_area_size = cfun->va_list_fpr_size;
    int vr_offset;
-
+ 
 +  /* darwinpcs uses the default, char * va_list impl.  */
 +  if (TARGET_MACHO)
 +    {
@@ -1007,17 +1007,17 @@ Support Darwin/aarch64, from https://git
    cum = &crtl->args.info;
    if (cfun->va_list_gpr_size)
      gr_save_area_size = MIN ((NUM_ARG_REGS - cum->aapcs_ncrn) * UNITS_PER_WORD,
-@@ -21249,6 +21810,9 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
+@@ -21272,6 +21833,9 @@ aarch64_gimplify_va_arg_expr (tree valis
    HOST_WIDE_INT size, rsize, adjust, align;
    tree t, u, cond1, cond2;
-
+ 
 +  if (TARGET_MACHO)
 +    return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
 +
    indirect_p = pass_va_arg_by_reference (type);
    if (indirect_p)
      type = build_pointer_type (type);
-@@ -21453,8 +22017,18 @@ aarch64_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
+@@ -21476,8 +22040,18 @@ aarch64_gimplify_va_arg_expr (tree valis
          field_ptr_t = double_ptr_type_node;
          break;
        case E_TFmode:
@@ -1038,17 +1038,17 @@ Support Darwin/aarch64, from https://git
          break;
        case E_SDmode:
          field_t = dfloat32_type_node;
-@@ -21537,6 +22111,9 @@ aarch64_setup_incoming_varargs (cumulative_args_t cum_v,
+@@ -21560,6 +22134,9 @@ aarch64_setup_incoming_varargs (cumulati
    int gr_saved = cfun->va_list_gpr_size;
    int vr_saved = cfun->va_list_fpr_size;
-
+ 
 +  if (TARGET_MACHO)
 +    return default_setup_incoming_varargs (cum_v, arg, pretend_size, no_rtl);
 +
    /* The caller has advanced CUM up to, but not beyond, the last named
       argument.  Advance a local copy of CUM past the last "real" named
       argument, to find out how many registers are left over.  */
-@@ -22380,6 +22957,12 @@ aarch64_autovectorize_vector_modes (vector_modes *modes, bool)
+@@ -22403,6 +22980,12 @@ aarch64_autovectorize_vector_modes (vect
  static const char *
  aarch64_mangle_type (const_tree type)
  {
@@ -1061,10 +1061,10 @@ Support Darwin/aarch64, from https://git
    /* The AArch64 ABI documents say that "__va_list" has to be
       mangled as if it is in the "std" namespace.  */
    if (lang_hooks.types_compatible_p (CONST_CAST_TREE (type), va_list_type))
-@@ -22396,6 +22979,12 @@ aarch64_mangle_type (const_tree type)
+@@ -22419,6 +23002,12 @@ aarch64_mangle_type (const_tree type)
        return "Dh";
      }
-
+ 
 +  /* __float128 is mangled as "g" on darwin.  _Float128 is not mangled here,
 +     but handled in common code (as "DF128_").  */
 +  if (TARGET_MACHO && TYPE_MODE (type) == TFmode
@@ -1074,20 +1074,20 @@ Support Darwin/aarch64, from https://git
    /* Mangle AArch64-specific internal types.  TYPE_NAME is non-NULL_TREE for
       builtin types.  */
    if (TYPE_NAME (type) != NULL)
-@@ -23093,7 +23682,8 @@ aarch64_mov_operand_p (rtx x, machine_mode mode)
-
+@@ -23116,7 +23705,8 @@ aarch64_mov_operand_p (rtx x, machine_mo
+ 
    /* GOT accesses are valid moves.  */
    if (SYMBOL_REF_P (x)
 -      && aarch64_classify_symbolic_expression (x) == SYMBOL_SMALL_GOT_4G)
 +      && (aarch64_classify_symbolic_expression (x) == SYMBOL_SMALL_GOT_4G
 +        || aarch64_classify_symbolic_expression (x) == SYMBOL_MO_SMALL_GOT))
      return true;
-
+ 
    if (SYMBOL_REF_P (x) && mode == DImode && CONSTANT_ADDRESS_P (x))
-@@ -24430,12 +25020,8 @@ aarch64_asm_output_variant_pcs (FILE *stream, const tree decl, const char* name)
+@@ -24453,12 +25043,8 @@ aarch64_asm_output_variant_pcs (FILE *st
  static std::string aarch64_last_printed_arch_string;
  static std::string aarch64_last_printed_tune_string;
-
+ 
 -/* Implement ASM_DECLARE_FUNCTION_NAME.  Output the ISA features used
 -   by the function fndecl.  */
 -
@@ -1098,8 +1098,8 @@ Support Darwin/aarch64, from https://git
 +aarch64_function_options_preamble (tree fndecl)
  {
    tree target_parts = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
-
-@@ -24474,15 +25060,60 @@ aarch64_declare_function_name (FILE *stream, const char* name,
+ 
+@@ -24497,15 +25083,60 @@ aarch64_declare_function_name (FILE *str
                   this_tune->name);
        aarch64_last_printed_tune_string = this_tune->name;
      }
@@ -1115,7 +1115,7 @@ Support Darwin/aarch64, from https://git
 +{
 +  gcc_checking_assert (TREE_CODE (fndecl) == FUNCTION_DECL);
 +  gcc_checking_assert (!DECL_COMMON (fndecl));
-
++
 +  /* Update .arch and .tune as needed.  */
 +  aarch64_function_options_preamble (fndecl);
 +
@@ -1133,7 +1133,7 @@ Support Darwin/aarch64, from https://git
 +       || DECL_INITIAL (fndecl))
 +    (* targetm.encode_section_info) (fndecl, DECL_RTL (fndecl), false);
 +  ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl);
-+
+ 
 +  cfun->machine->label_is_assembled = true;
 +}
 +
@@ -1147,22 +1147,22 @@ Support Darwin/aarch64, from https://git
 +  aarch64_function_options_preamble (fndecl);
 +  /* Emit any necessary pcs information.  */
    aarch64_asm_output_variant_pcs (stream, fndecl, name);
-
+ 
    /* Don't forget the type directive for ELF.  */
 +#ifdef ASM_OUTPUT_TYPE_DIRECTIVE
    ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "function");
 +#endif
    ASM_OUTPUT_FUNCTION_LABEL (stream, name, fndecl);
-
+ 
    cfun->machine->label_is_assembled = true;
  }
 +#endif
-
+ 
  /* Implement PRINT_PATCHABLE_FUNCTION_ENTRY.  */
-
-@@ -24539,12 +25170,17 @@ aarch64_output_patchable_area (unsigned int patch_area_size, bool record_p)
+ 
+@@ -24562,12 +25193,17 @@ aarch64_output_patchable_area (unsigned 
  /* Implement ASM_OUTPUT_DEF_FROM_DECLS.  Output .variant_pcs for aliases.  */
-
+ 
  void
 -aarch64_asm_output_alias (FILE *stream, const tree decl, const tree target)
 +aarch64_asm_output_alias (FILE *stream, const tree decl,
@@ -1177,21 +1177,21 @@ Support Darwin/aarch64, from https://git
    ASM_OUTPUT_DEF (stream, name, value);
 +#endif
  }
-
+ 
  /* Implement ASM_OUTPUT_EXTERNAL.  Output .variant_pcs for undefined
-@@ -24590,6 +25226,9 @@ aarch64_start_file (void)
+@@ -24613,6 +25249,9 @@ aarch64_start_file (void)
                aarch64_last_printed_arch_string.c_str ());
-
+ 
     default_file_start ();
 +#if TARGET_MACHO
 +  darwin_file_start ();
 +#endif
  }
-
+ 
  /* Emit load exclusive.  */
-@@ -25169,6 +25808,16 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width,
+@@ -25192,6 +25831,16 @@ aarch64_output_simd_mov_immediate (rtx c
      }
-
+ 
    gcc_assert (CONST_INT_P (info.u.mov.value));
 +  unsigned HOST_WIDE_INT value = UINTVAL (info.u.mov.value);
 +
@@ -1203,10 +1203,10 @@ Support Darwin/aarch64, from https://git
 +      unsigned HOST_WIDE_INT mask = (1U << GET_MODE_BITSIZE (info.elt_mode))-1;
 +      value &= mask;
 +    }
-
+ 
    if (which == AARCH64_CHECK_MOV)
      {
-@@ -25177,16 +25826,16 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width,
+@@ -25200,16 +25849,16 @@ aarch64_output_simd_mov_immediate (rtx c
                  ? "msl" : "lsl");
        if (lane_count == 1)
        snprintf (templ, sizeof (templ), "%s\t%%d0, " HOST_WIDE_INT_PRINT_HEX,
@@ -1226,7 +1226,7 @@ Support Darwin/aarch64, from https://git
      }
    else
      {
-@@ -25195,12 +25844,12 @@ aarch64_output_simd_mov_immediate (rtx const_vector, unsigned width,
+@@ -25218,12 +25867,12 @@ aarch64_output_simd_mov_immediate (rtx c
        if (info.u.mov.shift)
        snprintf (templ, sizeof (templ), "%s\t%%0.%d%c, #"
                  HOST_WIDE_INT_PRINT_DEC ", %s #%d", mnemonic, lane_count,
@@ -1241,28 +1241,28 @@ Support Darwin/aarch64, from https://git
      }
    return templ;
  }
-@@ -28437,7 +29086,8 @@ aarch64_libgcc_floating_mode_supported_p (scalar_float_mode mode)
+@@ -28459,7 +29108,8 @@ aarch64_libgcc_floating_mode_supported_p
  }
-
+ 
  /* Implement TARGET_SCALAR_MODE_SUPPORTED_P - return TRUE
 -   if MODE is [BH]Fmode, and punt to the generic implementation otherwise.  */
 +   if MODE is [BH]Fmode, or TFmode on Mach-O, and punt to the generic
 +   implementation otherwise.  */
-
+ 
  static bool
  aarch64_scalar_mode_supported_p (scalar_mode mode)
-@@ -28445,7 +29095,7 @@ aarch64_scalar_mode_supported_p (scalar_mode mode)
+@@ -28467,7 +29117,7 @@ aarch64_scalar_mode_supported_p (scalar_
    if (DECIMAL_FLOAT_MODE_P (mode))
      return default_decimal_float_supported_p ();
-
+ 
 -  return ((mode == HFmode || mode == BFmode)
 +  return ((mode == HFmode || mode == BFmode || (mode == TFmode && TARGET_MACHO))
          ? true
          : default_scalar_mode_supported_p (mode));
  }
-@@ -29262,19 +29912,37 @@ aarch64_sls_emit_shared_blr_thunks (FILE *out_file)
+@@ -29284,19 +29934,37 @@ aarch64_sls_emit_shared_blr_thunks (FILE
        continue;
-
+ 
        const char *name = indirect_symbol_names[regnum];
 -      switch_to_section (get_named_section (decl, NULL, 0));
 +      /* If the target uses a unique section for this switch to it.  */
@@ -1300,11 +1300,11 @@ Support Darwin/aarch64, from https://git
 +#endif
      }
  }
-
-@@ -30366,6 +31034,60 @@ aarch64_retrieve_sysreg (const char *regname, bool write_p, bool is128op)
+ 
+@@ -30384,6 +31052,60 @@ aarch64_retrieve_sysreg (const char *reg
    return sysreg->encoding;
  }
-
+ 
 +#if TARGET_MACHO
 +/* This handles the promotion of function return values.
 +   It also handles function args under two specific curcumstances:
@@ -1360,12 +1360,12 @@ Support Darwin/aarch64, from https://git
 +#endif
 +
  /* Target-specific selftests.  */
-
+ 
  #if CHECKING_P
-@@ -30571,6 +31293,15 @@ aarch64_run_selftests (void)
+@@ -30600,6 +31322,15 @@ aarch64_run_selftests (void)
  #undef TARGET_ASM_ALIGNED_SI_OP
  #define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
-
+ 
 +#if TARGET_MACHO
 +#undef TARGET_ASM_UNALIGNED_HI_OP
 +#define TARGET_ASM_UNALIGNED_HI_OP "\t.short\t"
@@ -1378,10 +1378,10 @@ Support Darwin/aarch64, from https://git
  #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
  #define TARGET_ASM_CAN_OUTPUT_MI_THUNK \
    hook_bool_const_tree_hwi_hwi_const_tree_true
-@@ -30673,6 +31404,12 @@ aarch64_run_selftests (void)
+@@ -30702,6 +31433,12 @@ aarch64_run_selftests (void)
  #undef TARGET_FUNCTION_ARG_BOUNDARY
  #define TARGET_FUNCTION_ARG_BOUNDARY aarch64_function_arg_boundary
-
+ 
 +#undef TARGET_FUNCTION_ARG_BOUNDARY_CA
 +#define TARGET_FUNCTION_ARG_BOUNDARY_CA aarch64_function_arg_boundary_ca
 +
@@ -1390,13 +1390,13 @@ Support Darwin/aarch64, from https://git
 +
  #undef TARGET_FUNCTION_ARG_PADDING
  #define TARGET_FUNCTION_ARG_PADDING aarch64_function_arg_padding
-
-@@ -31013,7 +31750,7 @@ aarch64_libgcc_floating_mode_supported_p
-
+ 
+@@ -31042,7 +31779,7 @@ aarch64_libgcc_floating_mode_supported_p
+ 
  /* The architecture reserves bits 0 and 1 so use bit 2 for descriptors.  */
  #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS
 -#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 4
 +#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS AARCH64_CUSTOM_FUNCTION_TEST
-
+ 
  #undef TARGET_HARD_REGNO_NREGS
  #define TARGET_HARD_REGNO_NREGS aarch64_hard_regno_nregs
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.h:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.h   Wed Jun 11 13:27:05 2025
@@ -1,24 +1,24 @@
-$NetBSD: patch-gcc_config_aarch64_aarch64.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_aarch64.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/aarch64.h
+--- gcc/config/aarch64/aarch64.h.orig  2025-05-23 11:02:04.284197394 +0000
 +++ gcc/config/aarch64/aarch64.h
 @@ -72,6 +72,10 @@
  #define TARGET_SIMD (AARCH64_ISA_SIMD && AARCH64_ISA_SM_OFF)
  #define TARGET_FLOAT (AARCH64_ISA_FP)
-
+ 
 +/* If this is non-zero then generated code of the object format, ABI and
 +   assembler syntax used by Darwin (Mach-O) platforms.  */
 +#define TARGET_MACHO          0
 +
  #define UNITS_PER_WORD                8
-
+ 
  #define UNITS_PER_VREG                16
 @@ -149,6 +153,12 @@
  /* Heap alignment (same as BIGGEST_ALIGNMENT and STACK_BOUNDARY).  */
  #define MALLOC_ABI_ALIGNMENT  128
-
+ 
 +/* We will and with this value to test if a custom function descriptor needs
 +   a static chain.  The function boundary must the adjusted so that the bit
 +   this represents is no longer part of the address.  0 Disables the custom
@@ -52,11 +52,11 @@ Support Darwin/aarch64, from https://git
 +  bool last_named_p;          /* Is this the last named arg? */
    bool silent_p;              /* True if we should act silently, rather than
                                   raise an error for invalid calls.  */
-
-@@ -1457,8 +1485,13 @@ extern const char *aarch64_rewrite_mcpu (int argc, const char **argv);
+ 
+@@ -1457,8 +1485,13 @@ extern const char *aarch64_rewrite_mcpu 
  #define ASM_CPU_SPEC \
     MCPU_TO_MARCH_SPEC
-
+ 
 +#ifndef SUBTARGET_EXTRA_SPECS
 +#define SUBTARGET_EXTRA_SPECS
 +#endif
@@ -65,13 +65,13 @@ Support Darwin/aarch64, from https://git
 -  { "asm_cpu_spec",           ASM_CPU_SPEC }
 +  { "asm_cpu_spec",           ASM_CPU_SPEC },                 \
 +  SUBTARGET_EXTRA_SPECS
-
+ 
  #define ASM_OUTPUT_POOL_EPILOGUE  aarch64_asm_output_pool_epilogue
-
-@@ -1471,6 +1504,10 @@ extern GTY(()) tree aarch64_fp16_ptr_type_node;
+ 
+@@ -1471,6 +1504,10 @@ extern GTY(()) tree aarch64_fp16_ptr_typ
     bfloat16_type_node.  Defined in aarch64-builtins.cc.  */
  extern GTY(()) tree aarch64_bf16_ptr_type_node;
-
+ 
 +/* A pointer to the user-visible __float128 (on Mach-O).  Defined in
 +   aarch64-builtins.c.  */
 +extern GTY(()) tree aarch64_float128_ptr_type_node;
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.md
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.md:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.md:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.md:1.1      Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.md  Wed Jun 11 13:27:05 2025
@@ -1,8 +1,8 @@
-$NetBSD: patch-gcc_config_aarch64_aarch64.md,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_aarch64.md,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/aarch64.md
+--- gcc/config/aarch64/aarch64.md.orig 2025-05-23 11:02:04.284197394 +0000
 +++ gcc/config/aarch64/aarch64.md
 @@ -363,6 +363,7 @@
      ;; Wraps a constant integer that should be multiplied by the number
@@ -10,12 +10,12 @@ Support Darwin/aarch64, from https://git
      UNSPEC_SME_VQ
 +    UNSPEC_MACHOPIC_OFFSET    ; Common to Mach-O ports.
  ])
-
+ 
  (define_c_enum "unspecv" [
 @@ -995,6 +996,37 @@
    [(set_attr "type" "load_4")]
  )
-
+ 
 +(define_insn "prefetch_unscaled"
 +  [(prefetch (match_operand:DI 0 "aarch64_unscaled_prefetch_operand" "Du")
 +            (match_operand:QI 1 "const_int_operand" "")
@@ -68,7 +68,7 @@ Support Darwin/aarch64, from https://git
       [r, Usa; adr      , *   , 4] adr\t%x0, %c1
       [r, Ush; adr      , *   , 4] adrp\t%x0, %A1
       [w, r Z; f_mcr    , fp  , 4] fmov\t%d0, %x1
-@@ -7387,7 +7419,10 @@
+@@ -7390,7 +7422,10 @@
        (lo_sum:P (match_operand:P 1 "register_operand" "r")
                  (match_operand 2 "aarch64_valid_symref" "S")))]
    ""
@@ -79,3 +79,4 @@ Support Darwin/aarch64, from https://git
 +  }
    [(set_attr "type" "alu_imm")]
  )
+ 
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.opt
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.opt:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.opt:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.opt:1.1     Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_aarch64.opt Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_config_aarch64_aarch64.opt,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_aarch64.opt,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/aarch64.opt
+--- gcc/config/aarch64/aarch64.opt.orig        2025-05-23 11:02:04.284197394 +0000
 +++ gcc/config/aarch64/aarch64.opt
-@@ -193,6 +193,13 @@ Enum(aarch64_abi) String(ilp32) Value(AARCH64_ABI_ILP32)
+@@ -193,6 +193,13 @@ Enum(aarch64_abi) String(ilp32) Value(AA
  EnumValue
  Enum(aarch64_abi) String(lp64) Value(AARCH64_ABI_LP64)
-
+ 
 +EnumValue
 +Enum(aarch64_abi) String(darwinpcs) Value(AARCH64_ABI_LP64)
 +
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_constraints.md
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_constraints.md:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_constraints.md:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_constraints.md:1.1  Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_constraints.md      Wed Jun 11 13:27:05 2025
@@ -1,8 +1,8 @@
-$NetBSD: patch-gcc_config_aarch64_constraints.md,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_constraints.md,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/constraints.md
+--- gcc/config/aarch64/constraints.md.orig     2025-05-23 11:02:04.288197457 +0000
 +++ gcc/config/aarch64/constraints.md
 @@ -203,7 +203,9 @@
     A constraint that matches a small GOT access."
@@ -12,13 +12,13 @@ Support Darwin/aarch64, from https://git
 +                   == SYMBOL_SMALL_GOT_4G
 +                  || aarch64_classify_symbolic_expression (op)
 +                   == SYMBOL_MO_SMALL_GOT")))
-
+ 
  (define_constraint "Uss"
    "@internal
 @@ -574,6 +576,11 @@
   An address valid for a prefetch instruction."
   (match_test "aarch64_address_valid_for_prefetch_p (op, true)"))
-
+ 
 +(define_address_constraint "Du"
 +  "@internal
 + An address valid for a prefetch instruction with an unscaled offset."
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_driver-aarch64.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_driver-aarch64.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_driver-aarch64.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_driver-aarch64.cc:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_driver-aarch64.cc   Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_config_aarch64_driver-aarch64.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_driver-aarch64.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/driver-aarch64.cc
+--- gcc/config/aarch64/driver-aarch64.cc.orig  2025-05-23 11:02:04.288197457 +0000
 +++ gcc/config/aarch64/driver-aarch64.cc
 @@ -28,6 +28,74 @@
  #include "aarch64-protos.h"
  #include "aarch64-feature-deps.h"
-
+ 
 +#if TARGET_MACHO
 +# include <sys/types.h>
 +# include <sys/sysctl.h>
@@ -79,8 +79,8 @@ Support Darwin/aarch64, from https://git
  struct aarch64_arch_extension
  {
    const char *ext;
-@@ -477,3 +545,4 @@ not_found:
+@@ -501,3 +569,4 @@ not_found:
    }
  }
-
+ 
 +#endif
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_predicates.md
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_predicates.md:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_predicates.md:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_predicates.md:1.1   Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_aarch64_predicates.md       Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_config_aarch64_predicates.md,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_aarch64_predicates.md,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/aarch64/predicates.md
+--- gcc/config/aarch64/predicates.md.orig      2025-05-23 11:02:04.288197457 +0000
 +++ gcc/config/aarch64/predicates.md
 @@ -352,9 +352,24 @@
  (define_predicate "aarch64_prefetch_operand"
    (match_test "aarch64_address_valid_for_prefetch_p (op, false)"))
-
+ 
 +(define_predicate "aarch64_unscaled_prefetch_operand"
 +  (match_test "aarch64_address_valid_for_unscaled_prefetch_p (op, false)"))
 +
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin-protos.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin-protos.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin-protos.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin-protos.h:1.1 Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin-protos.h     Wed Jun 11 13:27:05 2025
@@ -1,12 +1,12 @@
-$NetBSD: patch-gcc_config_darwin-protos.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_darwin-protos.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/darwin-protos.h
+--- gcc/config/darwin-protos.h.orig    2025-05-23 11:02:04.332198151 +0000
 +++ gcc/config/darwin-protos.h
 @@ -86,9 +86,12 @@ extern void darwin_asm_lto_end (void);
  extern void darwin_mark_decl_preserved (const char *);
-
+ 
  extern tree darwin_handle_kext_attribute (tree *, tree, tree, int, bool *);
 -extern tree darwin_handle_weak_import_attribute (tree *node, tree name,
 -                                               tree args, int flags,
@@ -20,7 +20,7 @@ Support Darwin/aarch64, from https://git
  extern void machopic_output_stub (FILE *, const char *, const char *);
  extern void darwin_globalize_label (FILE *, const char *);
  extern void darwin_assemble_visibility (tree, int);
-@@ -124,6 +127,7 @@ extern void darwin_enter_string_into_cfstring_table (tree);
+@@ -124,6 +127,7 @@ extern void darwin_enter_string_into_cfs
  extern void darwin_asm_output_anchor (rtx symbol);
  extern bool darwin_use_anchors_for_symbol_p (const_rtx symbol);
  extern bool darwin_kextabi_p (void);
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.cc:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.cc   Wed Jun 11 13:27:05 2025
@@ -1,10 +1,10 @@
-$NetBSD: patch-gcc_config_darwin.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_darwin.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/darwin.cc
+--- gcc/config/darwin.cc.orig  2025-05-23 11:02:04.332198151 +0000
 +++ gcc/config/darwin.cc
-@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3.  If not see
+@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3.  
  #include "cfghooks.h"
  #include "df.h"
  #include "memmodel.h"
@@ -12,35 +12,35 @@ Support Darwin/aarch64, from https://git
  #include "tm_p.h"
  #include "stringpool.h"
  #include "attribs.h"
-@@ -49,6 +50,7 @@ along with GCC; see the file COPYING3.  If not see
+@@ -49,6 +50,7 @@ along with GCC; see the file COPYING3.  
  #include "optabs.h"
  #include "flags.h"
  #include "opts.h"
 +#include "c-family/c-objc.h"    /* for objc_method_decl().  */
-
+ 
  /* Fix and Continue.
-
+ 
 @@ -102,6 +104,7 @@ int darwin_running_cxx;
-
+ 
  /* Some code-gen now depends on OS major version numbers (at least).  */
  int generating_for_darwin_version ;
 +unsigned long current_os_version = 0;
-
+ 
  /* For older linkers we need to emit special sections (marked 'coalesced') for
     for weak or single-definition items.  */
 @@ -131,7 +134,7 @@ struct {
  section * darwin_sections[NUM_DARWIN_SECTIONS];
-
+ 
  /* While we transition to using in-tests instead of ifdef'd code.  */
 -#if !HAVE_lo_sum
 +#if !HAVE_lo_sum || DARWIN_ARM64
  #define gen_macho_high(m,a,b) (a)
  #define gen_macho_low(m,a,b,c) (a)
  #endif
-@@ -1104,6 +1107,7 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
+@@ -1104,6 +1107,7 @@ machopic_legitimize_pic_address (rtx ori
    return pic_ref;
  }
-
+ 
 +#if !DARWIN_ARM64
  /* Callbacks to output the stub or non-lazy pointers.
     Each works on the item in *SLOT,if it has been used.
@@ -50,13 +50,13 @@ Support Darwin/aarch64, from https://git
      <FILE *, machopic_output_indirection> (out_file);
  }
 +#endif
-
+ 
  int
  machopic_operand_p (rtx op)
-@@ -2194,6 +2199,122 @@ darwin_handle_kext_attribute (tree *node, tree name,
+@@ -2194,6 +2199,122 @@ darwin_handle_kext_attribute (tree *node
    return NULL_TREE;
  }
-
+ 
 +enum version_components { MAJOR, MINOR, TINY };
 +
 +/* Parse a version number in x.y.z form and validate it as a macOS
@@ -175,11 +175,11 @@ Support Darwin/aarch64, from https://git
 +
  /* Handle a "weak_import" attribute; arguments as in
     struct attribute_spec.handler.  */
-
-@@ -2215,6 +2336,231 @@ darwin_handle_weak_import_attribute (tree *node, tree name,
+ 
+@@ -2215,6 +2336,231 @@ darwin_handle_weak_import_attribute (tre
    return NULL_TREE;
  }
-
+ 
 +#define NUM_AV_OSES 13
 +const char *availability_os[NUM_AV_OSES]
 +  = { "macos", "macosx", "ios", "tvos", "watchos", "driverkit", "swift",
@@ -408,7 +408,7 @@ Support Darwin/aarch64, from https://git
  /* Emit a label for an FDE, making it global and/or weak if appropriate.
     The third parameter is nonzero if this is for exception handling.
     The fourth parameter is nonzero if this is just a placeholder for an
-@@ -2306,6 +2652,8 @@ darwin_emit_except_table_label (FILE *file)
+@@ -2306,6 +2652,8 @@ darwin_emit_except_table_label (FILE *fi
  rtx
  darwin_make_eh_symbol_indirect (rtx orig, bool ARG_UNUSED (pubvis))
  {
@@ -416,11 +416,11 @@ Support Darwin/aarch64, from https://git
 +    return orig;
    if (DARWIN_PPC == 0 && TARGET_64BIT)
      return orig;
-
+ 
 @@ -3154,7 +3502,12 @@ darwin_file_end (void)
        fprintf (asm_out_file, "\t.long\t0\n\t.long\t%u\n", flags);
       }
-
+ 
 +#if !DARWIN_ARM64
    machopic_finish (asm_out_file);
 +#else
@@ -433,7 +433,7 @@ Support Darwin/aarch64, from https://git
 @@ -3330,6 +3683,13 @@ darwin_kextabi_p (void) {
    return flag_apple_kext;
  }
-
+ 
 +/* True, iff we want to map __builtin_unreachable to a trap.  */
 +
 +bool
@@ -446,7 +446,7 @@ Support Darwin/aarch64, from https://git
  {
 @@ -3350,7 +3710,14 @@ darwin_override_options (void)
        generating_for_darwin_version = 8;
-
+ 
        /* Earlier versions are not specifically accounted, until required.  */
 +      unsigned vers[3] = {0,0,0};
 +      if (!parse_version (vers, darwin_macosx_version_min))
@@ -456,11 +456,11 @@ Support Darwin/aarch64, from https://git
      }
 +  else
 +    current_os_version = 1058;
-
+ 
    /* Some codegen needs to account for the capabilities of the target
       linker.  */
 @@ -3592,6 +3959,11 @@ darwin_override_options (void)
-
+ 
    /* The c_dialect...() macros are not available to us here.  */
    darwin_running_cxx = (strstr (lang_hooks.name, "C++") != 0);
 +
@@ -469,5 +469,5 @@ Support Darwin/aarch64, from https://git
 +  if (!OPTION_SET_P (flag_allow_ext_attr_placement))
 +    flag_allow_ext_attr_placement = true;
  }
-
+ 
  #if DARWIN_PPC
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.h:1.1        Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.h    Wed Jun 11 13:27:05 2025
@@ -1,37 +1,37 @@
-$NetBSD: patch-gcc_config_darwin.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_darwin.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/darwin.h
+--- gcc/config/darwin.h.orig   2025-05-23 11:02:04.332198151 +0000
 +++ gcc/config/darwin.h
-@@ -42,6 +42,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-
+@@ -42,6 +42,7 @@ see the files COPYING3 and COPYING.RUNTI
+ 
  #define DARWIN_X86 0
  #define DARWIN_PPC 0
 +#define DARWIN_ARM64 0
-
+ 
  #define OBJECT_FORMAT_MACHO 1
-
-@@ -264,6 +265,8 @@ extern GTY(()) int darwin_ms_struct;
-   "%{weak_reference_mismatches*:\
-     -Xlinker -weak_reference_mismatches -Xlinker %*} \
+ 
+@@ -266,6 +267,8 @@ extern GTY(()) int darwin_ms_struct;
      %<weak_reference_mismatches*",                                    \
+   "%{weak_framework*: -Xlinker -weak_framework -Xlinker %*} \
+     %<weak_framework*",                                                       \
 +  "%{weak_framework*: -Xlinker -weak_framework -Xlinker %*} \
 +    %<weak_framework*",                                                       \
    "%{whyload:-Xlinker -whyload} %<whyload",                           \
    "%{whatsloaded:-Xlinker -whatsloaded} %<whatsloaded",                       \
    "%{w:-Xlinker -w}",                                                 \
-@@ -371,7 +374,8 @@ extern GTY(()) int darwin_ms_struct;
+@@ -378,7 +381,8 @@ extern GTY(()) int darwin_ms_struct;
  */
-
+ 
  #define DARWIN_NOCOMPACT_UNWIND \
 -" %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) "
 +"%{!fuse-ld=lld: \
 +    %:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind)}"
-
+ 
  /* In Darwin linker specs we can put -lcrt0.o and ld will search the library
     path for crt0.o or -lcrtx.a and it will search for libcrtx.a.  As for
-@@ -395,7 +399,8 @@ extern GTY(()) int darwin_ms_struct;
+@@ -402,7 +406,8 @@ extern GTY(()) int darwin_ms_struct;
      LINK_PLUGIN_SPEC \
      "%{flto*:%<fcompare-debug*} \
       %{flto} %{fno-lto} %{flto=*} \
@@ -41,16 +41,16 @@ Support Darwin/aarch64, from https://git
      DARWIN_PLATFORM_ID \
      LINK_COMPRESS_DEBUG_SPEC \
     "%X %{s} %{t} %{Z} %{u*} \
-@@ -646,6 +651,8 @@ extern GTY(()) int darwin_ms_struct;
- #define ASM_OPTIONS "%{v} %{w:-W} %{I*}"
- #endif
-
+@@ -655,6 +660,8 @@ extern GTY(()) int darwin_ms_struct;
+ 
+ #define AS_NEEDS_DASH_FOR_PIPED_INPUT
+ 
 +#define AS_NEEDS_DASH_FOR_PIPED_INPUT
 +
  /* Default Darwin ASM_SPEC, very simple. */
  #define ASM_SPEC \
  "%{static} -arch %(darwin_arch) " \
-@@ -975,7 +982,12 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS];
+@@ -984,7 +991,12 @@ extern GTY(()) section * darwin_sections
    { "apple_kext_compatibility", 0, 0, false, true, false, false,           \
      darwin_handle_kext_attribute, NULL },                                  \
    { "weak_import", 0, 0, true, false, false, false,                        \
@@ -61,13 +61,13 @@ Support Darwin/aarch64, from https://git
 +
 +#undef TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P
 +#define TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P darwin_attribute_takes_identifier_p
-
+ 
  /* Make local constant labels linker-visible, so that if one follows a
     weak_global constant, ld64 will be able to separate the atoms.  */
-@@ -1223,6 +1235,10 @@ void add_framework_path (char *);
+@@ -1232,6 +1244,10 @@ void add_framework_path (char *);
  #define TARGET_N_FORMAT_TYPES 1
  #define TARGET_FORMAT_TYPES darwin_additional_format_types
-
+ 
 +/* We want __builtin_unreachable to be expanded as a trap instruction.  */
 +#undef TARGET_UNREACHABLE_SHOULD_TRAP
 +#define TARGET_UNREACHABLE_SHOULD_TRAP darwin_unreachable_traps_p
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.opt
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.opt:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.opt:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.opt:1.1      Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_config_darwin.opt  Wed Jun 11 13:27:05 2025
@@ -1,24 +1,24 @@
-$NetBSD: patch-gcc_config_darwin.opt,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_config_darwin.opt,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/config/darwin.opt
+--- gcc/config/darwin.opt.orig 2025-05-23 11:02:04.332198151 +0000
 +++ gcc/config/darwin.opt
 @@ -91,6 +91,10 @@ mtarget-linker
  Target RejectNegative Joined Separate Var(darwin_target_linker) Init(LD64_VERSION)
  -mtarget-linker <version>     Specify that ld64 <version> is the toolchain linker for the current invocation.
-
+ 
 +munreachable-traps
 +Target Var(darwin_unreachable_traps) Init(1)
 +When set (the default) this makes __builtin_unreachable render as a trap.
 +
  ; Driver options.
-
+ 
  all_load
-@@ -381,6 +385,10 @@ unexported_symbols_list
+@@ -385,6 +389,10 @@ weak_framework
  Driver RejectNegative Separate
- -unexported_symbols_list <filename>   Do not export the global symbols listed in <filename>.
-
+ -weak_framework <framework>   Make a weak link to the specified framework.
+ 
 +weak_framework
 +Driver RejectNegative Separate
 +-weak_framework <framework>   Make a weak link to the specified framework.
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure:1.1      Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure  Wed Jun 11 13:27:05 2025
@@ -1,11 +1,10 @@
-$NetBSD: patch-gcc_configure,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_configure,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90143
 
---- gcc/configure.orig 2024-08-01 08:18:42.000000000 +0000
+--- gcc/configure.orig 2025-05-23 11:02:04.504200864 +0000
 +++ gcc/configure
-@@ -740,6 +740,8 @@
+@@ -740,6 +740,8 @@ ORIGINAL_NM_FOR_TARGET
  gcc_cv_nm
  ORIGINAL_LD_GOLD_FOR_TARGET
  ORIGINAL_LD_BFD_FOR_TARGET
@@ -14,7 +13,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cg
  ORIGINAL_LD_FOR_TARGET
  ORIGINAL_PLUGIN_LD_FOR_TARGET
  gcc_cv_ld
-@@ -3803,20 +3805,19 @@
+@@ -3803,20 +3805,19 @@ gcc_gxx_libcxx_include_dir=
  
  # Check whether --with-gxx-libcxx-include-dir was given.
  if test "${with_gxx_libcxx_include_dir+set}" = set; then :
@@ -41,7 +40,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cg
  # If both --with-sysroot and --with-gxx-libcxx-include-dir are passed, we
  # check to see if the latter starts with the former and, upon success, compute
  # gcc_gxx_libcxx_include_dir as relative to the sysroot.
-@@ -3824,16 +3825,20 @@
+@@ -3824,16 +3825,20 @@ gcc_gxx_libcxx_include_dir_add_sysroot=0
  gcc_enable_stdlib_opt=0
  if test x${gcc_gxx_libcxx_include_dir} != x; then
    if test x${gcc_gxx_libcxx_include_dir} = xno; then
@@ -65,25 +64,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cg
         # self-contained toolchain.
         gcc_enable_stdlib_opt=1
         ;;
-@@ -21575,7 +21580,7 @@
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 21578 "configure"
-+#line 21583 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
-@@ -21681,7 +21686,7 @@
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 21684 "configure"
-+#line 21689 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
-@@ -25306,6 +25311,14 @@
+@@ -25342,6 +25347,14 @@ fi
  $as_echo "$gold_non_default" >&6; }
  
  ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
@@ -98,12 +79,3 @@ https://gcc.gnu.org/bugzilla/show_bug.cg
  
  case "$ORIGINAL_LD_FOR_TARGET" in
    ./collect-ld | ./collect-ld$build_exeext) ;;
-@@ -33642,7 +33655,7 @@
-       gcc_cv_target_dl_iterate_phdr=no
-     fi
-     ;;
--  *-*-dragonfly* | *-*-freebsd*)
-+  *-*-dragonfly* | *-*-freebsd* | *-*-netbsd*)
-     if grep dl_iterate_phdr $target_header_dir/sys/link_elf.h > /dev/null 2>&1; then
-       gcc_cv_target_dl_iterate_phdr=yes
-     else
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure.ac
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure.ac:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure.ac:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure.ac:1.1   Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_configure.ac       Wed Jun 11 13:27:05 2025
@@ -1,8 +1,8 @@
-$NetBSD: patch-gcc_configure.ac,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_configure.ac,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/configure.ac
+--- gcc/configure.ac.orig      2025-05-23 11:02:04.504200864 +0000
 +++ gcc/configure.ac
 @@ -235,18 +235,17 @@ gcc_gxx_libcxx_include_dir=
  AC_ARG_WITH(gxx-libcxx-include-dir,
@@ -13,7 +13,7 @@ Support Darwin/aarch64, from https://git
 -*)    gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir ;;
 -esac])
 +[gcc_gxx_libcxx_include_dir=$with_gxx_libcxx_include_dir])
-
+ 
  # --with-gxx-libcxx-include-dir controls the enabling of the -stdlib option.
  # if --with-gxx-libcxx-include-dir is 'no' we disable the stdlib option.
 +# if --with-gxx-libcxx-include-dir is 'yes' we enable the stdlib option and use
@@ -35,10 +35,10 @@ Support Darwin/aarch64, from https://git
    if test x${gcc_gxx_libcxx_include_dir} = xno; then
 -    # set defaults for the dir, but the option is disabled anyway.
 +    # set defaults for the dir, but the option is disabled anyway.
-     gcc_gxx_libcxx_include_dir=
++    gcc_gxx_libcxx_include_dir=
 +  elif test x${gcc_gxx_libcxx_include_dir} = xyes; then
 +    # set defaults for the dir, and enable.
-+    gcc_gxx_libcxx_include_dir=
+     gcc_gxx_libcxx_include_dir=
 +    gcc_enable_stdlib_opt=1
    else
      gcc_enable_stdlib_opt=1
@@ -53,9 +53,9 @@ Support Darwin/aarch64, from https://git
         # self-contained toolchain.
         gcc_enable_stdlib_opt=1
         ;;
-@@ -2817,7 +2820,15 @@ fi
+@@ -2832,7 +2835,15 @@ fi
  AC_MSG_RESULT($gold_non_default)
-
+ 
  ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
 +if test x"$ld64_flag" = x"yes"; then
 +ORIGINAL_LLD_FOR_TARGET=${gcc_cv_ld}64.lld
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_decl2.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_decl2.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_decl2.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_decl2.cc:1.1    Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_decl2.cc        Wed Jun 11 13:27:05 2025
@@ -1,25 +1,25 @@
-$NetBSD: patch-gcc_cp_decl2.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_cp_decl2.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/cp/decl2.cc
+--- gcc/cp/decl2.cc.orig       2025-05-23 11:02:04.532201307 +0000
 +++ gcc/cp/decl2.cc
-@@ -3839,9 +3839,8 @@ get_tls_init_fn (tree var)
+@@ -3858,9 +3858,8 @@ get_tls_init_fn (tree var)
    if (!flag_extern_tls_init && DECL_EXTERNAL (var))
      return NULL_TREE;
-
+ 
 -  /* If the variable is internal, or if we can't generate aliases,
 -     call the local init function directly.  */
 -  if (!TREE_PUBLIC (var) || !TARGET_SUPPORTS_ALIASES)
 +  /* If the variable is internal call the local init function directly.  */
 +  if (!TREE_PUBLIC (var))
      return get_local_tls_init_fn (DECL_SOURCE_LOCATION (var));
-
+ 
    tree sname = mangle_tls_init_fn (var);
-@@ -4005,6 +4004,25 @@ generate_tls_wrapper (tree fn)
+@@ -4024,6 +4023,25 @@ generate_tls_wrapper (tree fn)
    expand_or_defer_fn (finish_function (/*inline_p=*/false));
  }
-
+ 
 +/* A dummy init function to act as a weak placeholder for a (possibly non-
 +   existent) dynamic init.  */
 +static void
@@ -40,9 +40,9 @@ Support Darwin/aarch64, from https://git
 +}
 +
  /* Start a global constructor or destructor function.  */
-
+ 
  static tree
-@@ -4823,22 +4841,24 @@ handle_tls_init (void)
+@@ -4843,22 +4861,24 @@ handle_tls_init (void)
    finish_expr_stmt (cp_build_modify_expr (loc, guard, NOP_EXPR,
                                          boolean_true_node,
                                          tf_warning_or_error));
@@ -52,7 +52,7 @@ Support Darwin/aarch64, from https://git
        tree var = TREE_VALUE (vars);
        tree init = TREE_PURPOSE (vars);
        one_static_initialization_or_destruction (/*initp=*/true, var, init);
-
+ 
 -      /* Output init aliases even with -fno-extern-tls-init.  */
 -      if (TARGET_SUPPORTS_ALIASES && TREE_PUBLIC (var))
 +      /* Output inits even with -fno-extern-tls-init.
@@ -73,8 +73,8 @@ Support Darwin/aarch64, from https://git
 +        direct_calls.safe_push (single_init_fn);
        }
      }
-
-@@ -4846,6 +4866,30 @@ handle_tls_init (void)
+ 
+@@ -4866,6 +4886,30 @@ handle_tls_init (void)
    finish_if_stmt (if_stmt);
    finish_function_body (body);
    expand_or_defer_fn (finish_function (/*inline_p=*/false));
@@ -103,11 +103,11 @@ Support Darwin/aarch64, from https://git
 +      }
 +    }
  }
-
+ 
  /* We're at the end of compilation, so generate any mangling aliases that
-@@ -5265,7 +5309,14 @@ c_parse_final_cleanups (void)
+@@ -5285,7 +5329,14 @@ c_parse_final_cleanups (void)
            }
-
+ 
          if (!DECL_INITIAL (decl) && decl_tls_wrapper_p (decl))
 -          generate_tls_wrapper (decl);
 +          {
@@ -118,6 +118,6 @@ Support Darwin/aarch64, from https://git
 +               required.  */
 +            generate_tls_dummy_init (decl);
 +          }
-
+ 
          if (!DECL_SAVED_TREE (decl))
            continue;
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_parser.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_parser.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_parser.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_parser.cc:1.1   Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_cp_parser.cc       Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_cp_parser.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_cp_parser.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/cp/parser.cc
+--- gcc/cp/parser.cc.orig      2025-05-23 11:02:04.548201561 +0000
 +++ gcc/cp/parser.cc
-@@ -705,6 +705,91 @@ cp_lexer_handle_early_pragma (cp_lexer *lexer)
+@@ -705,6 +705,91 @@ cp_lexer_handle_early_pragma (cp_lexer *
  static cp_parser *cp_parser_new (cp_lexer *);
  static GTY (()) cp_parser *the_parser;
-
+ 
 +/* Context-sensitive parse-checking for clang-style attributes.  */
 +
 +enum clang_attr_state {
@@ -95,20 +95,20 @@ Support Darwin/aarch64, from https://git
 +
  /* Create a new main C++ lexer, the lexer that gets tokens from the
     preprocessor, and also create the main parser.  */
-
+ 
 @@ -721,6 +806,8 @@ cp_lexer_new_main (void)
    c_common_no_more_pch ();
-
+ 
    cp_lexer *lexer = cp_lexer_alloc ();
 +  enum clang_attr_state attr_state = CA_NONE;
 +
    /* Put the first token in the buffer.  */
    cp_token *tok = lexer->buffer->quick_push (token);
-
+ 
 @@ -744,8 +831,14 @@ cp_lexer_new_main (void)
        if (tok->type == CPP_PRAGMA_EOL)
        cp_lexer_handle_early_pragma (lexer);
-
+ 
 +      attr_state = cp_lexer_attribute_state (*tok, attr_state);
        tok = vec_safe_push (lexer->buffer, cp_token ());
 -      cp_lexer_get_preprocessor_token (C_LEX_STRING_NO_JOIN, tok);
@@ -119,18 +119,18 @@ Support Darwin/aarch64, from https://git
 +      flags |= C_LEX_NUMBER_AS_STRING;
 +      cp_lexer_get_preprocessor_token (flags, tok);
      }
-
+ 
    lexer->next_token = lexer->buffer->address ();
-@@ -962,7 +1055,7 @@ cp_lexer_get_preprocessor_token (unsigned flags, cp_token *token)
+@@ -962,7 +1055,7 @@ cp_lexer_get_preprocessor_token (unsigne
  {
    static int is_extern_c = 0;
-
+ 
 -   /* Get a new token from the preprocessor.  */
 +   /* Get a new token from the preprocessor. */
    token->type
      = c_lex_with_flags (&token->u.value, &token->location, &token->flags,
                        flags);
-@@ -23348,9 +23441,16 @@ cp_parser_init_declarator (cp_parser* parser,
+@@ -23390,9 +23483,16 @@ cp_parser_init_declarator (cp_parser* pa
                      "an %<asm%> specification is not allowed "
                      "on a function-definition");
          if (attributes)
@@ -149,11 +149,11 @@ Support Darwin/aarch64, from https://git
 +          }
          /* This is a function-definition.  */
          *function_definition_p = true;
-
-@@ -29707,6 +29807,91 @@ cp_parser_gnu_attributes_opt (cp_parser* parser)
+ 
+@@ -29781,6 +29881,91 @@ cp_parser_gnu_attributes_opt (cp_parser*
    return attributes;
  }
-
+ 
 +/* Parse the arguments list for a clang attribute.   */
 +static tree
 +cp_parser_clang_attribute (cp_parser *parser, tree/*attr_id*/)
@@ -240,10 +240,10 @@ Support Darwin/aarch64, from https://git
 +}
 +
  /* Parse a GNU attribute-list.
-
+ 
     attribute-list:
-@@ -29766,9 +29951,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */)
-
+@@ -29840,9 +30025,12 @@ cp_parser_gnu_attribute_list (cp_parser*
+ 
          /* Peek at the next token.  */
          token = cp_lexer_peek_token (parser->lexer);
 -        /* If it's an `(', then parse the attribute arguments.  */
@@ -257,14 +257,14 @@ Support Darwin/aarch64, from https://git
              vec<tree, va_gc> *vec;
              int attr_flag = (attribute_takes_identifier_p (identifier)
                               ? id_attr : normal_attr);
-@@ -29785,12 +29973,12 @@ cp_parser_gnu_attribute_list (cp_parser* parser, bool exactly_one /* = false */)
+@@ -29859,12 +30047,12 @@ cp_parser_gnu_attribute_list (cp_parser*
                  arguments = build_tree_list_vec (vec);
                  release_tree_vector (vec);
                }
 -            /* Save the arguments away.  */
 -            TREE_VALUE (attribute) = arguments;
            }
-
+ 
          if (arguments != error_mark_node)
            {
 +            /* Save the arguments away.  */
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_invoke.texi
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_invoke.texi:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_invoke.texi:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_invoke.texi:1.1        Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_invoke.texi    Wed Jun 11 13:27:05 2025
@@ -1,8 +1,8 @@
-$NetBSD: patch-gcc_doc_invoke.texi,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_doc_invoke.texi,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/doc/invoke.texi
+--- gcc/doc/invoke.texi.orig   2025-05-23 11:02:04.620202694 +0000
 +++ gcc/doc/invoke.texi
 @@ -732,7 +732,7 @@ Objective-C and Objective-C++ Dialects}.
  -freg-struct-return  -fshort-enums  -fshort-wchar
@@ -19,13 +19,13 @@ Support Darwin/aarch64, from https://git
  -whatsloaded  -F  -gused  -gfull  -mmacosx-version-min=@var{version}
 --mkernel  -mone-byte-bool}
 +-mkernel  -mone-byte-bool -munreachable-traps}
-
+ 
  @emph{DEC Alpha Options}
  @gccoptlist{-mno-fp-regs  -msoft-float
-@@ -19132,6 +19132,17 @@ the behavior of older compilers in which temporaries' stack space is
+@@ -19134,6 +19134,17 @@ the behavior of older compilers in which
  not reused, the aggressive stack reuse can lead to runtime errors. This
  option is used to control the temporary stack reuse optimization.
-
+ 
 +@opindex fstack_use_cumulative_args
 +@item -fstack-use-cumulative-args
 +This option instructs the compiler to use the
@@ -40,10 +40,10 @@ Support Darwin/aarch64, from https://git
  @opindex ftrapv
  @item -ftrapv
  This option generates traps for signed overflow on addition, subtraction,
-@@ -25148,6 +25159,11 @@ without that switch.  Using this switch may require recompiling all
+@@ -25239,6 +25250,11 @@ without that switch.  Using this switch 
  other modules in a program, including system libraries.  Use this
  switch to conform to a non-default data model.
-
+ 
 +@opindex munreachable-traps
 +@item -munreachable-traps
 +Causes @code{__builtin_unreachable} to be rendered as a trap.  This is the
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi:1.1    Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi        Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_doc_tm.texi,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_doc_tm.texi,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/doc/tm.texi
+--- gcc/doc/tm.texi.orig       2025-05-23 11:02:04.628202821 +0000
 +++ gcc/doc/tm.texi
-@@ -1066,6 +1066,10 @@ also define the hook to @code{default_promote_function_mode_always_promote}
+@@ -1066,6 +1066,10 @@ also define the hook to @code{default_pr
  if you would like to apply the same rules given by @code{PROMOTE_MODE}.
  @end deftypefn
-
+ 
 +@deftypefn {Target Hook} machine_mode TARGET_PROMOTE_FUNCTION_MODE_CA (cumulative_args_t, @var{function_arg_info}, @var{const_tree}, int *@var{}, @var{int})
 +Like @code{promote_function_mode}, but takes a cumulative_args pointer   and a current arg to supply the input.
 +@end deftypefn
@@ -15,10 +15,10 @@ Support Darwin/aarch64, from https://git
  @defmac PARM_BOUNDARY
  Normal alignment required for function parameters on the stack, in
  bits.  All stack parameters receive at least this much alignment
-@@ -4471,6 +4475,16 @@ with the specified mode and type.  The default hook returns
+@@ -4471,6 +4475,16 @@ with the specified mode and type.  The d
  @code{PARM_BOUNDARY} for all arguments.
  @end deftypefn
-
+ 
 +@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca})
 +This is the @code{cumulative_args_t}-based version of
 +@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more
@@ -32,10 +32,10 @@ Support Darwin/aarch64, from https://git
  @deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY (machine_mode @var{mode}, const_tree @var{type})
  Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY},
  which is the default value for this hook.  You can define this hook to
-@@ -4478,6 +4492,16 @@ return a different value if an argument size must be rounded to a larger
+@@ -4478,6 +4492,16 @@ return a different value if an argument 
  value.
  @end deftypefn
-
+ 
 +@deftypefn {Target Hook} {unsigned int} TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA (machine_mode @var{mode}, const_tree @var{type}, cumulative_args_t @var{ca})
 +This is the @code{cumulative_args_t}-based version of
 +@code{TARGET_FUNCTION_ARG_ROUND_BOUNDARY}. Define this hook if you need more
@@ -49,10 +49,10 @@ Support Darwin/aarch64, from https://git
  @defmac FUNCTION_ARG_REGNO_P (@var{regno})
  A C expression that is nonzero if @var{regno} is the number of a hard
  register in which function arguments are sometimes passed.  This does
-@@ -12709,6 +12733,11 @@ This target hook can be used to generate a target-specific code
+@@ -12709,6 +12733,11 @@ This target hook can be used to generate
  If selftests are enabled, run any selftests for this target.
  @end deftypefn
-
+ 
 +@deftypefn {Target Hook} bool TARGET_UNREACHABLE_SHOULD_TRAP (void)
 +This hook should return @code{true} if the target wants   @code{__builtin_unreachable} to expand to a trap or @code{abort ()}.
 +  The default value is false.
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi.in
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi.in:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi.in:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi.in:1.1 Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_doc_tm.texi.in     Wed Jun 11 13:27:05 2025
@@ -1,37 +1,37 @@
-$NetBSD: patch-gcc_doc_tm.texi.in,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_doc_tm.texi.in,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/doc/tm.texi.in
+--- gcc/doc/tm.texi.in.orig    2025-05-23 11:02:04.628202821 +0000
 +++ gcc/doc/tm.texi.in
 @@ -949,6 +949,8 @@ applied.
-
+ 
  @hook TARGET_PROMOTE_FUNCTION_MODE
-
+ 
 +@hook TARGET_PROMOTE_FUNCTION_MODE_CA
 +
  @defmac PARM_BOUNDARY
  Normal alignment required for function parameters on the stack, in
  bits.  All stack parameters receive at least this much alignment
 @@ -3441,8 +3443,12 @@ required.
-
+ 
  @hook TARGET_FUNCTION_ARG_BOUNDARY
-
+ 
 +@hook TARGET_FUNCTION_ARG_BOUNDARY_CA
 +
  @hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY
-
+ 
 +@hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY_CA
 +
  @defmac FUNCTION_ARG_REGNO_P (@var{regno})
  A C expression that is nonzero if @var{regno} is the number of a hard
  register in which function arguments are sometimes passed.  This does
 @@ -8099,6 +8105,8 @@ maintainer is familiar with.
-
+ 
  @hook TARGET_RUN_TARGET_SELFTESTS
-
+ 
 +@hook TARGET_UNREACHABLE_SHOULD_TRAP
 +
  @hook TARGET_MEMTAG_CAN_TAG_ADDRESSES
-
+ 
  @hook TARGET_MEMTAG_TAG_SIZE
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_explow.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_explow.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_explow.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_explow.h:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_explow.h   Wed Jun 11 13:27:05 2025
@@ -1,20 +1,20 @@
-$NetBSD: patch-gcc_explow.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_explow.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/explow.h
+--- gcc/explow.h.orig  2025-05-23 11:02:04.640203010 +0000
 +++ gcc/explow.h
-@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3.  If not see
+@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3.  
  #ifndef GCC_EXPLOW_H
  #define GCC_EXPLOW_H
-
+ 
 +#include "calls.h" /* for cummulative args stuff.  */
 +
  /* Return a memory reference like MEMREF, but which is known to have a
     valid address.  */
  extern rtx validize_mem (rtx);
-@@ -47,8 +49,13 @@ extern rtx force_not_mem (rtx);
-
+@@ -50,8 +52,13 @@ extern rtx force_not_mem (rtx);
+ 
  /* Return mode and signedness to use when an argument or result in the
     given mode is promoted.  */
 -extern machine_mode promote_function_mode (const_tree, machine_mode, int *,
@@ -26,6 +26,6 @@ Support Darwin/aarch64, from https://git
 +   given mode is promoted.  */
 +machine_mode promote_function_mode (cumulative_args_t, function_arg_info,
 +                                  const_tree, int *, int);
-
+ 
  /* Return mode and signedness to use when an object in the given mode
     is promoted.  */
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.cc:1.1    Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.cc        Wed Jun 11 13:27:05 2025
@@ -1,10 +1,10 @@
-$NetBSD: patch-gcc_function.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_function.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/function.cc
+--- gcc/function.cc.orig       2025-05-23 11:02:04.684203704 +0000
 +++ gcc/function.cc
-@@ -58,8 +58,8 @@ along with GCC; see the file COPYING3.  If not see
+@@ -58,8 +58,8 @@ along with GCC; see the file COPYING3.  
  #include "varasm.h"
  #include "except.h"
  #include "dojump.h"
@@ -14,7 +14,7 @@ Support Darwin/aarch64, from https://git
  #include "expr.h"
  #include "optabs-tree.h"
  #include "output.h"
-@@ -2449,7 +2449,10 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm,
+@@ -2449,7 +2449,10 @@ assign_parm_find_data_types (struct assi
    else if (DECL_CHAIN (parm))
      data->arg.named = 1;  /* Not the last non-variadic parm. */
    else if (targetm.calls.strict_argument_naming (all->args_so_far))
@@ -25,9 +25,9 @@ Support Darwin/aarch64, from https://git
 +    }
    else
      data->arg.named = 0;  /* Treat as variadic.  */
-
-@@ -2491,9 +2494,12 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm,
-
+ 
+@@ -2491,9 +2494,12 @@ assign_parm_find_data_types (struct assi
+ 
    /* Find mode as it is passed by the ABI.  */
    unsignedp = TYPE_UNSIGNED (data->arg.type);
 -  data->arg.mode
@@ -40,18 +40,18 @@ Support Darwin/aarch64, from https://git
 +                                        TREE_TYPE (current_function_decl),
 +                                        &unsignedp, 0);
  }
-
+ 
  /* A subroutine of assign_parms.  Invoke setup_incoming_varargs.  */
-@@ -2506,6 +2512,7 @@ assign_parms_setup_varargs (struct assign_parm_data_all *all,
-
+@@ -2506,6 +2512,7 @@ assign_parms_setup_varargs (struct assig
+ 
    function_arg_info last_named_arg = data->arg;
    last_named_arg.named = true;
 +  last_named_arg.last_named = true;
    targetm.calls.setup_incoming_varargs (all->args_so_far, last_named_arg,
                                        &varargs_pretend_bytes, no_rtl);
-
-@@ -2614,7 +2621,9 @@ assign_parm_find_entry_rtl (struct assign_parm_data_all *all,
-
+ 
+@@ -2614,7 +2621,9 @@ assign_parm_find_entry_rtl (struct assig
+ 
    locate_and_pad_parm (data->arg.mode, data->arg.type, in_regs,
                       all->reg_parm_stack_space,
 -                     entry_parm ? data->partial : 0, current_function_decl,
@@ -59,9 +59,9 @@ Support Darwin/aarch64, from https://git
 +                     all->args_so_far,
 +                     current_function_decl,
                       &all->stack_args_size, &data->locate);
-
+ 
    /* Update parm_stack_boundary if this parameter is passed in the
-@@ -3921,7 +3930,8 @@ gimplify_parameters (gimple_seq *cleanup)
+@@ -3923,7 +3932,8 @@ gimplify_parameters (gimple_seq *cleanup
        if (data.arg.pass_by_reference)
        {
          tree type = TREE_TYPE (data.arg.type);
@@ -71,7 +71,7 @@ Support Darwin/aarch64, from https://git
          if (reference_callee_copied (&all.args_so_far_v, orig_arg))
            {
              tree local, t;
-@@ -4024,6 +4034,7 @@ gimplify_parameters (gimple_seq *cleanup)
+@@ -4026,6 +4036,7 @@ gimplify_parameters (gimple_seq *cleanup
  void
  locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs,
                     int reg_parm_stack_space, int partial,
@@ -79,7 +79,7 @@ Support Darwin/aarch64, from https://git
                     tree fndecl ATTRIBUTE_UNUSED,
                     struct args_size *initial_offset_ptr,
                     struct locate_and_pad_arg_data *locate)
-@@ -4061,9 +4072,23 @@ locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs,
+@@ -4063,9 +4074,23 @@ locate_and_pad_parm (machine_mode passed
              ? arg_size_in_bytes (type)
              : size_int (GET_MODE_SIZE (passed_mode)));
    where_pad = targetm.calls.function_arg_padding (passed_mode, type);
@@ -104,5 +104,5 @@ Support Darwin/aarch64, from https://git
 +    }
 +
    locate->where_pad = where_pad;
-
+ 
    /* Alignment can't exceed MAX_SUPPORTED_STACK_ALIGNMENT.  */
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.h:1.1     Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_function.h Wed Jun 11 13:27:05 2025
@@ -1,18 +1,18 @@
-$NetBSD: patch-gcc_function.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_function.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/function.h
+--- gcc/function.h.orig        2025-05-23 11:02:04.684203704 +0000
 +++ gcc/function.h
-@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3.  If not see
+@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3.  
  #ifndef GCC_FUNCTION_H
  #define GCC_FUNCTION_H
-
+ 
 +#include "cumulative-args.h"
-
+ 
  /* Stack of pending (incomplete) sequences saved by `start_sequence'.
     Each element describes one pending sequence.
-@@ -680,6 +681,7 @@ extern bool aggregate_value_p (const_tree, const_tree);
+@@ -680,6 +681,7 @@ extern bool aggregate_value_p (const_tre
  extern bool use_register_for_decl (const_tree);
  extern gimple_seq gimplify_parameters (gimple_seq *);
  extern void locate_and_pad_parm (machine_mode, tree, int, int, int,
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_jit_libgccjit.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_jit_libgccjit.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_jit_libgccjit.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_jit_libgccjit.h:1.1        Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_jit_libgccjit.h    Wed Jun 11 13:27:05 2025
@@ -1,16 +1,16 @@
-$NetBSD: patch-gcc_jit_libgccjit.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_jit_libgccjit.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/jit/libgccjit.h
+--- gcc/jit/libgccjit.h.orig   2025-05-23 11:02:04.752204777 +0000
 +++ gcc/jit/libgccjit.h
-@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3.  If not see
+@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3.  
  #define LIBGCCJIT_H
-
+ 
  #include <stdio.h>
 +#ifdef __APPLE__
 +# include <sys/types.h>  /* For ssize_t.  */
 +#endif
-
+ 
  #ifdef __cplusplus
  extern "C" {
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_opts.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_opts.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_opts.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_opts.cc:1.1        Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_opts.cc    Wed Jun 11 13:27:05 2025
@@ -1,12 +1,12 @@
-$NetBSD: patch-gcc_opts.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_opts.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/opts.cc
+--- gcc/opts.cc.orig   2025-05-23 11:02:04.840206164 +0000
 +++ gcc/opts.cc
-@@ -3289,6 +3289,7 @@ common_handle_option (struct gcc_options *opts,
+@@ -3289,6 +3289,7 @@ common_handle_option (struct gcc_options
        break;
-
+ 
      case OPT_fuse_ld_bfd:
 +    case OPT_fuse_ld_classic:
      case OPT_fuse_ld_gold:
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.def
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.def:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.def:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.def:1.1     Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.def Wed Jun 11 13:27:05 2025
@@ -1,28 +1,27 @@
-$NetBSD: patch-gcc_target.def,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_target.def,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/target.def
+--- gcc/target.def.orig        2025-05-23 11:02:05.072209824 +0000
 +++ gcc/target.def
-@@ -4680,6 +4680,13 @@ if you would like to apply the same rules given by @code{PROMOTE_MODE}.",
-                    const_tree funtype, int for_return),
+@@ -4681,6 +4681,13 @@ if you would like to apply the same rule
   default_promote_function_mode)
-
-+DEFHOOK
+ 
+ DEFHOOK
 +(promote_function_mode_ca,
 + "Like @code{promote_function_mode}, but takes a cumulative_args pointer \
 +  and a current arg to supply the input.",
 + machine_mode, (cumulative_args_t, function_arg_info, const_tree, int *, int),
 + default_promote_function_mode_ca)
 +
- DEFHOOK
++DEFHOOK
  (promote_prototypes,
   "This target hook returns @code{true} if an argument declared in a\n\
-@@ -5133,6 +5140,18 @@ with the specified mode and type.  The default hook returns\n\
-  unsigned int, (machine_mode mode, const_tree type),
+ prototype as an integral type smaller than @code{int} should actually be\n\
+@@ -5134,6 +5141,18 @@ with the specified mode and type.  The d
   default_function_arg_boundary)
-
-+DEFHOOK
+ 
+ DEFHOOK
 +(function_arg_boundary_ca,
 + "This is the @code{cumulative_args_t}-based version of\n\
 +@code{TARGET_FUNCTION_ARG_BOUNDARY}. Define this hook if you need more\n\
@@ -34,13 +33,14 @@ Support Darwin/aarch64, from https://git
 + unsigned int, (machine_mode mode, const_tree type, cumulative_args_t ca),
 + default_function_arg_boundary_ca)
 +
- DEFHOOK
++DEFHOOK
  (function_arg_round_boundary,
   "Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY},\n\
+ which is the default value for this hook.  You can define this hook to\n\
 @@ -5142,6 +5161,18 @@ value.",
   unsigned int, (machine_mode mode, const_tree type),
   default_function_arg_round_boundary)
-
+ 
 +DEFHOOK
 +(function_arg_round_boundary_ca,
 + "This is the @code{cumulative_args_t}-based version of\n\
@@ -59,7 +59,7 @@ Support Darwin/aarch64, from https://git
 @@ -7389,6 +7420,16 @@ DEFHOOKPOD
  libatomic.  The default value is false.",
   bool, false)
-
+ 
 +/* This value represents whether __builtin_unreachable should be expanded
 +   as a trap instruction (or an abort() if the trap is not available).  */
 +DEFHOOK
@@ -72,3 +72,4 @@ Support Darwin/aarch64, from https://git
 +
  /* Close the 'struct gcc_target' definition.  */
  HOOK_VECTOR_END (C90_EMPTY_HACK)
+ 
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.h:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_target.h   Wed Jun 11 13:27:05 2025
@@ -1,8 +1,8 @@
-$NetBSD: patch-gcc_target.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_target.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/target.h
+--- gcc/target.h.orig  2025-05-23 11:02:05.072209824 +0000
 +++ gcc/target.h
 @@ -51,22 +51,8 @@
  #include "insn-codes.h"
@@ -26,6 +26,6 @@ Support Darwin/aarch64, from https://git
 -#endif /* !CHECKING_P */
 +#include "tree-core.h"
 +#include "cumulative-args.h"
-
+ 
  /* Target properties of _BitInt(N) type.  _BitInt(N) is to be represented
     as series of abi_limb_mode CEIL (N, GET_MODE_PRECISION (abi_limb_mode))
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.cc
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.cc:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.cc:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.cc:1.1   Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.cc       Wed Jun 11 13:27:05 2025
@@ -1,14 +1,13 @@
-$NetBSD: patch-gcc_targhooks.cc,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_targhooks.cc,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/targhooks.cc
+--- gcc/targhooks.cc.orig      2025-05-23 11:02:05.072209824 +0000
 +++ gcc/targhooks.cc
-@@ -161,6 +161,15 @@ default_promote_function_mode_always_promote (const_tree type,
-   return promote_mode (type, mode, punsignedp);
+@@ -162,6 +162,15 @@ default_promote_function_mode_always_pro
  }
-
-+machine_mode
+ 
+ machine_mode
 +default_promote_function_mode_ca (cumulative_args_t, function_arg_info arg,
 +                                const_tree funtype, int *punsignedp,
 +                                int for_return)
@@ -17,14 +16,14 @@ Support Darwin/aarch64, from https://git
 +                              funtype, for_return);
 +}
 +
- machine_mode
++machine_mode
  default_cc_modes_compatible (machine_mode m1, machine_mode m2)
  {
-@@ -876,6 +885,14 @@ default_function_arg_boundary (machine_mode mode ATTRIBUTE_UNUSED,
-   return PARM_BOUNDARY;
+   if (m1 == m2)
+@@ -877,12 +886,28 @@ default_function_arg_boundary (machine_m
  }
-
-+unsigned int
+ 
+ unsigned int
 +default_function_arg_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED,
 +                                const_tree type ATTRIBUTE_UNUSED,
 +                                cumulative_args_t ca ATTRIBUTE_UNUSED)
@@ -32,13 +31,13 @@ Support Darwin/aarch64, from https://git
 +  return default_function_arg_boundary (mode, type);
 +}
 +
- unsigned int
++unsigned int
  default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED,
                                     const_tree type ATTRIBUTE_UNUSED)
-@@ -883,6 +900,14 @@ default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED,
+ {
    return PARM_BOUNDARY;
  }
-
+ 
 +unsigned int
 +default_function_arg_round_boundary_ca (machine_mode mode ATTRIBUTE_UNUSED,
 +                                      const_tree type ATTRIBUTE_UNUSED,
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.h:1.1    Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_targhooks.h        Wed Jun 11 13:27:05 2025
@@ -1,20 +1,20 @@
-$NetBSD: patch-gcc_targhooks.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_targhooks.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/targhooks.h
+--- gcc/targhooks.h.orig       2025-05-23 11:02:05.072209824 +0000
 +++ gcc/targhooks.h
-@@ -34,6 +34,9 @@ extern machine_mode default_promote_function_mode (const_tree, machine_mode,
+@@ -34,6 +34,9 @@ extern machine_mode default_promote_func
  extern machine_mode default_promote_function_mode_always_promote
                        (const_tree, machine_mode, int *, const_tree, int);
-
+ 
 +extern machine_mode default_promote_function_mode_ca
 +  (cumulative_args_t, function_arg_info, const_tree, int *, int);
 +
  extern machine_mode default_cc_modes_compatible (machine_mode,
                                                      machine_mode);
-
-@@ -160,6 +163,12 @@ extern unsigned int default_function_arg_boundary (machine_mode,
+ 
+@@ -160,6 +163,12 @@ extern unsigned int default_function_arg
                                                   const_tree);
  extern unsigned int default_function_arg_round_boundary (machine_mode,
                                                         const_tree);
Index: pkgsrc/lang/gcc14-gnat/patches/patch-gcc_testsuite_gcc.target_aarch64_sme_aarch64-sme.exp
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-gcc_testsuite_gcc.target_aarch64_sme_aarch64-sme.exp:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-gcc_testsuite_gcc.target_aarch64_sme_aarch64-sme.exp:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-gcc_testsuite_gcc.target_aarch64_sme_aarch64-sme.exp:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-gcc_testsuite_gcc.target_aarch64_sme_aarch64-sme.exp   Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-gcc_testsuite_gcc.target_aarch64_sme_aarch64-sme.exp,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-gcc_testsuite_gcc.target_aarch64_sme_aarch64-sme.exp,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- gcc/testsuite/gcc.target/aarch64/sme/aarch64-sme.exp
+--- gcc/testsuite/gcc.target/aarch64/sme/aarch64-sme.exp.orig  2025-05-23 11:02:06.556233234 +0000
 +++ gcc/testsuite/gcc.target/aarch64/sme/aarch64-sme.exp
 @@ -24,6 +24,11 @@ if {![istarget aarch64*-*-*] } {
      return
  }
-
+ 
 +# Exit immediately if this is Darwin (for now).
 +if {[istarget *-*-darwin*] } {
 +    return
@@ -15,3 +15,4 @@ Support Darwin/aarch64, from https://git
 +
  # Load support procs.
  load_lib gcc-dg.exp
+ 
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config.host
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config.host:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config.host:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config.host:1.1 Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config.host     Wed Jun 11 13:27:05 2025
@@ -1,4 +1,4 @@
-$NetBSD: patch-libgcc_config.host,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libgcc_config.host,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Part 1: drop legacy library build for macOS >= 14 [PR116809].
 
@@ -35,7 +35,7 @@ libsupc++ fails to link without this, an
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- libgcc/config.host.orig    2024-08-01 08:17:17.000000000 +0000
+--- libgcc/config.host.orig    2025-05-23 11:02:08.168258662 +0000
 +++ libgcc/config.host
 @@ -82,7 +82,7 @@ m32c*-*-*)
          cpu_type=m32c
@@ -46,38 +46,23 @@ Support Darwin/aarch64, from https://git
        cpu_type=aarch64
        ;;
  alpha*-*-*)
-@@ -236,19 +236,25 @@ case ${host} in
+@@ -236,11 +236,14 @@ case ${host} in
    esac
    tmake_file="$tmake_file t-slibgcc-darwin"
    case ${host} in
--    *-*-darwin1[89]* | *-*-darwin2* )
--      tmake_file="t-darwin-min-8 $tmake_file"
 +    x86_64-*-darwin2[0-2]*)
 +      tmake_file="t-darwin-min-11 t-darwin-libgccs1 $tmake_file"
 +      ;;
-+    *-*-darwin2*)
-+      tmake_file="t-darwin-min-11 $tmake_file"
-+      ;;
-+    *-*-darwin1[89]*)
-+      tmake_file="t-darwin-min-8 t-darwin-libgccs1 $tmake_file"
-       ;;
-     *-*-darwin9* | *-*-darwin1[0-7]*)
--      tmake_file="t-darwin-min-5 $tmake_file"
-+      tmake_file="t-darwin-min-5 t-darwin-libgccs1 $tmake_file"
+     *-*-darwin2*)
+       tmake_file="t-darwin-min-11 $tmake_file"
        ;;
-     *-*-darwin[4-8]*)
--      tmake_file="t-darwin-min-1 $tmake_file"
-+      tmake_file="t-darwin-min-1 t-darwin-libgccs1 $tmake_file"
-       ;;
-     *)
-       # Fall back to configuring for the oldest system known to work with
-       # all archs and the current sources.
--      tmake_file="t-darwin-min-5 $tmake_file"
-+      tmake_file="t-darwin-min-5 t-darwin-libgccs1 $tmake_file"
-       echo "Warning: libgcc configured to support macOS 10.5" 1>&2
+     *-*-darwin1[89]*)
+-      tmake_file="t-darwin-min-8 $tmake_file"
++      tmake_file="t-darwin-min-8 t-darwin-libgccs1 $tmake_file"
        ;;
-   esac
-@@ -274,7 +280,7 @@ case ${host} in
+     *-*-darwin1[67]]*)
+       tmake_file="t-darwin-min-5 $tmake_file"
+@@ -280,7 +283,7 @@ case ${host} in
    if test "x$enable_darwin_at_rpath" = "xyes"; then
      tmake_file="$tmake_file t-darwin-rpath "
    fi
@@ -86,7 +71,7 @@ Support Darwin/aarch64, from https://git
    ;;
  *-*-dragonfly*)
    tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
-@@ -418,6 +424,15 @@ aarch64*-*-elf | aarch64*-*-rtems*)
+@@ -424,6 +427,15 @@ aarch64*-*-elf | aarch64*-*-rtems*)
        tmake_file="${tmake_file} t-dfprules"
        md_unwind_header=aarch64/aarch64-unwind.h
        ;;
@@ -102,7 +87,7 @@ Support Darwin/aarch64, from https://git
  aarch64*-*-freebsd*)
        extra_parts="$extra_parts crtfastmath.o"
        tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
-@@ -429,6 +444,7 @@ aarch64*-*-freebsd*)
+@@ -435,6 +447,7 @@ aarch64*-*-freebsd*)
  aarch64*-*-netbsd*)
        extra_parts="$extra_parts crtfastmath.o"
        tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
@@ -110,7 +95,7 @@ Support Darwin/aarch64, from https://git
        tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
        tmake_file="${tmake_file} t-dfprules"
        md_unwind_header=aarch64/aarch64-unwind.h
-@@ -530,7 +546,8 @@ arm*-*-netbsdelf*)
+@@ -536,7 +549,8 @@ arm*-*-netbsdelf*)
        case ${host} in
          arm*-*-netbsdelf-*eabi*)
            tmake_file="${tmake_file} arm/t-netbsd-eabi"
@@ -120,7 +105,7 @@ Support Darwin/aarch64, from https://git
            ;;
          *)
            tmake_file="${tmake_file} arm/t-netbsd t-slibgcc-gld-nover"
-@@ -725,14 +742,14 @@ i[34567]86-*-darwin*)
+@@ -731,14 +745,14 @@ i[34567]86-*-darwin*)
        tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
        tm_file="$tm_file i386/darwin-lib.h"
        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o"
@@ -137,7 +122,7 @@ Support Darwin/aarch64, from https://git
        tmake_file="${tmake_file} i386/t-heap-trampoline"
        ;;
  i[34567]86-*-elfiamcu)
-@@ -1215,12 +1232,14 @@ powerpc-*-darwin*)
+@@ -1221,12 +1235,14 @@ powerpc-*-darwin*)
        # We build the darwin10 EH shim for Rosetta (running on x86 machines).
        tm_file="$tm_file i386/darwin-lib.h"
        tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble"
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_sme_state.S
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_sme_state.S:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_sme_state.S:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_sme_state.S:1.1    Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_sme_state.S        Wed Jun 11 13:27:05 2025
@@ -1,19 +1,19 @@
-$NetBSD: patch-libgcc_config_aarch64___arm_sme_state.S,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libgcc_config_aarch64___arm_sme_state.S,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- libgcc/config/aarch64/__arm_sme_state.S
+--- libgcc/config/aarch64/__arm_sme_state.S.orig       2025-05-23 11:02:08.168258662 +0000
 +++ libgcc/config/aarch64/__arm_sme_state.S
 @@ -30,14 +30,19 @@
     - Takes no argument.
     - Returns SME state in x0 and TPIDR2_EL0 in x1.  */
-
+ 
 -HIDDEN (__aarch64_have_sme)
 +HIDDEN (ASMNAME (__aarch64_have_sme))
-
+ 
 -variant_pcs (__arm_sme_state)
 +variant_pcs (ASMNAME (__arm_sme_state))
-
+ 
 -ENTRY (__arm_sme_state)
 +ENTRY (ASMNAME (__arm_sme_state))
        /* Check if SME is available.  */
@@ -27,7 +27,7 @@ Support Darwin/aarch64, from https://git
 +      ldrb    w1, [x1, :lo12:ASMNAME (__aarch64_have_sme)]
 +#endif
        cbz     w1, L(nosme)
-
+ 
        /* Expose the bottom 2 bits of svcr (SM, ZA) in x0 and set the
 @@ -52,4 +57,4 @@ L(nosme):
        mov     x0, 0
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_restore.S
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_restore.S:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_restore.S:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_restore.S:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_restore.S   Wed Jun 11 13:27:05 2025
@@ -1,21 +1,21 @@
-$NetBSD: patch-libgcc_config_aarch64___arm_tpidr2_restore.S,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libgcc_config_aarch64___arm_tpidr2_restore.S,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- libgcc/config/aarch64/__arm_tpidr2_restore.S
+--- libgcc/config/aarch64/__arm_tpidr2_restore.S.orig  2025-05-23 11:02:08.168258662 +0000
 +++ libgcc/config/aarch64/__arm_tpidr2_restore.S
 @@ -31,9 +31,9 @@
     - Does not return a value.
     - Can abort on failure (then registers are not preserved).  */
-
+ 
 -variant_pcs (__arm_tpidr2_restore)
 +variant_pcs (ASMNAME (__arm_tpidr2_restore))
-
+ 
 -ENTRY (__arm_tpidr2_restore)
 +ENTRY (ASMNAME (__arm_tpidr2_restore))
        .inst   0xd53bd0ae  /* mrs      x14, tpidr2_el0  */
        cbnz    x14, L(fail)
-
+ 
 @@ -85,5 +85,5 @@ L(fail):
        str     x16, [sp, 16]
        .cfi_rel_offset 46, 16
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_save.S
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_save.S:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_save.S:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_save.S:1.1  Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_tpidr2_save.S      Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-libgcc_config_aarch64___arm_tpidr2_save.S,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libgcc_config_aarch64___arm_tpidr2_save.S,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- libgcc/config/aarch64/__arm_tpidr2_save.S
+--- libgcc/config/aarch64/__arm_tpidr2_save.S.orig     2025-05-23 11:02:08.168258662 +0000
 +++ libgcc/config/aarch64/__arm_tpidr2_save.S
 @@ -35,10 +35,15 @@ HIDDEN (__aarch64_have_sme)
-
+ 
  variant_pcs (__arm_tpidr2_save)
-
+ 
 -ENTRY (__arm_tpidr2_save)
 +ENTRY (ASMNAME (__arm_tpidr2_save))
        /* Check if SME is available.  */
@@ -21,7 +21,7 @@ Support Darwin/aarch64, from https://git
 +      ldrb    w14, [x14, :lo12:ASMNAME (__aarch64_have_sme)]
 +#endif
        cbz     w14, L(end)
-
+ 
        .inst   0xd53bd0ae  /* mrs      x14, tpidr2_el0  */
 @@ -92,10 +97,18 @@ L(fail):
        str     x16, [sp, 16]
@@ -29,10 +29,9 @@ Support Darwin/aarch64, from https://git
        .inst   0xd503467f  /* smstop  */
 -      bl      abort
 -END (__arm_tpidr2_save)
--
 +      bl      ASMNAME (abort)
 +ENDm ASMNAME (__arm_tpidr2_save)
-+
+ 
 +      GLOBAL(ASMNAME (__libgcc_arm_tpidr2_save))
 +      HIDDEN (ASMNAME (__libgcc_arm_tpidr2_save))
 +#if __APPLE__
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_za_disable.S
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_za_disable.S:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_za_disable.S:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_za_disable.S:1.1   Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64___arm_za_disable.S       Wed Jun 11 13:27:05 2025
@@ -1,22 +1,22 @@
-$NetBSD: patch-libgcc_config_aarch64___arm_za_disable.S,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libgcc_config_aarch64___arm_za_disable.S,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- libgcc/config/aarch64/__arm_za_disable.S
+--- libgcc/config/aarch64/__arm_za_disable.S.orig      2025-05-23 11:02:08.168258662 +0000
 +++ libgcc/config/aarch64/__arm_za_disable.S
 @@ -31,16 +31,33 @@
     - Does not return a value.
     - Can abort on failure (then registers are not preserved).  */
-
+ 
 -HIDDEN (__aarch64_have_sme)
 +HIDDEN (ASMNAME(__aarch64_have_sme))
-
+ 
 -HIDDEN (__libgcc_arm_tpidr2_save)
 +HIDDEN (ASMNAME(__libgcc_arm_tpidr2_save))
-
+ 
 -variant_pcs (__arm_za_disable)
 +variant_pcs (ASMNAME(__arm_za_disable))
-
+ 
 -ENTRY (__arm_za_disable)
 +GLOBAL (ASMNAME (__libgcc_arm_za_disable))
 +HIDDEN (ASMNAME (__libgcc_arm_za_disable))
@@ -42,7 +42,7 @@ Support Darwin/aarch64, from https://git
 +      ldrb    w14, [x14, :lo12:ASMNAME (__aarch64_have_sme)]
 +#endif
        cbz     w14, L(end)
-
+ 
        .inst   0xd53bd0ae  /* mrs      x14, tpidr2_el0  */
 @@ -52,7 +69,7 @@ ENTRY (__arm_za_disable)
        .cfi_rel_offset x29, 0
@@ -59,7 +59,7 @@ Support Darwin/aarch64, from https://git
        ret
 -END (__arm_za_disable)
 +ENDm ASMNAME(__arm_za_disable)
-
+ 
 -/* Hidden alias used by the unwinder.  */
 -.global __libgcc_arm_za_disable
 -HIDDEN (__libgcc_arm_za_disable)
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_aarch64-asm.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_aarch64-asm.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_aarch64-asm.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_aarch64-asm.h:1.1        Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_aarch64-asm.h    Wed Jun 11 13:27:05 2025
@@ -1,13 +1,13 @@
-$NetBSD: patch-libgcc_config_aarch64_aarch64-asm.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libgcc_config_aarch64_aarch64-asm.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- libgcc/config/aarch64/aarch64-asm.h
+--- libgcc/config/aarch64/aarch64-asm.h.orig   2025-05-23 11:02:08.168258662 +0000
 +++ libgcc/config/aarch64/aarch64-asm.h
 @@ -24,8 +24,6 @@
-
+ 
  #include "auto-target.h"
-
+ 
 -#define L(label) .L ## label
 -
  /* Marking variant PCS symbol references is important for PLT calls
@@ -16,7 +16,7 @@ Support Darwin/aarch64, from https://git
 @@ -58,12 +56,31 @@
  # define AUTIASP
  #endif
-
+ 
 +#define PASTE2(a, b) PASTE2a(a, b)
 +#define PASTE2a(a, b) a ## b
 +
@@ -45,10 +45,10 @@ Support Darwin/aarch64, from https://git
  #define SYMBOL_SIZE(name)
  #define SYMBOL_TYPE(name, _type)
  #endif
-@@ -93,16 +110,19 @@ GNU_PROPERTY (FEATURE_1_AND, BTI_FLAG|PAC_FLAG)
+@@ -93,16 +110,19 @@ GNU_PROPERTY (FEATURE_1_AND, BTI_FLAG|PA
  # endif
  #endif
-
+ 
 -#define ENTRY_ALIGN(name, align) \
 -  .global name;               \
 -  SYMBOL_TYPE(name, %function);               \
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_lse.S
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_lse.S:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_lse.S:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_lse.S:1.1        Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_lse.S    Wed Jun 11 13:27:05 2025
@@ -1,30 +1,30 @@
-$NetBSD: patch-libgcc_config_aarch64_lse.S,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libgcc_config_aarch64_lse.S,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- libgcc/config/aarch64/lse.S
+--- libgcc/config/aarch64/lse.S.orig   2025-05-23 11:02:08.168258662 +0000
 +++ libgcc/config/aarch64/lse.S
-@@ -62,7 +62,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+@@ -62,7 +62,7 @@ see the files COPYING3 and COPYING.RUNTI
  #endif
-
+ 
  /* Declare the symbol gating the LSE implementations.  */
 -      HIDDEN(__aarch64_have_lse_atomics)
 +      HIDDEN (ASMNAME (__aarch64_have_lse_atomics))
-
+ 
  /* Turn size and memory model defines into mnemonic fragments.  */
  #if SIZE == 1
-@@ -85,6 +85,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+@@ -85,6 +85,7 @@ see the files COPYING3 and COPYING.RUNTI
  # error
  #endif
-
+ 
 +#undef L
  #if MODEL == 1
  # define SUFF  _relax
  # define A
-@@ -167,32 +168,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+@@ -167,32 +168,21 @@ see the files COPYING3 and COPYING.RUNTI
  #define tmp3  14
  #define tmp4  13
-
+ 
 -/* Start and end a function.  */
 -.macro        STARTFN name
 -      .text
@@ -54,54 +54,54 @@ Support Darwin/aarch64, from https://git
 +#endif
        cbz     w(tmp0), \label
  .endm
-
+ 
  #ifdef L_cas
-
+ 
 -STARTFN       NAME(cas)
 +ENTRY (ASMNAME (NAME(cas)))
        JUMP_IF_NOT_LSE 8f
-
+ 
  #if SIZE < 16
 @@ -245,7 +235,7 @@ STARTFN    NAME(cas)
-
+ 
  #endif
-
+ 
 -ENDFN NAME(cas)
 +ENDm ASMNAME (NAME(cas))
  #endif
-
+ 
  #ifdef L_swp
 @@ -255,7 +245,7 @@ ENDFN      NAME(cas)
  # define SWP  .inst 0x38208020 + B + N
  #endif
-
+ 
 -STARTFN       NAME(swp)
 +ENTRY (ASMNAME (NAME (swp)))
        JUMP_IF_NOT_LSE 8f
-
+ 
        SWP             /* s(0), s(0), [x1] */
 @@ -268,7 +258,7 @@ STARTFN    NAME(swp)
        BARRIER
        ret
-
+ 
 -ENDFN NAME(swp)
 +ENDm ASMNAME (NAME (swp))
  #endif
-
+ 
  #if defined(L_ldadd) || defined(L_ldclr) \
 @@ -299,7 +289,7 @@ ENDFN      NAME(swp)
  # define LDOP .inst 0x38200020 + OPN + B + N
  #endif
-
+ 
 -STARTFN       NAME(LDNM)
 +ENTRY (ASMNAME (NAME (LDNM)))
        JUMP_IF_NOT_LSE 8f
-
+ 
        LDOP            /* s(0), s(0), [x1] */
 @@ -313,5 +303,5 @@ STARTFN    NAME(LDNM)
        BARRIER
        ret
-
+ 
 -ENDFN NAME(LDNM)
 +ENDm ASMNAME (NAME (LDNM))
  #endif
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_sfp-machine.h
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_sfp-machine.h:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_sfp-machine.h:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_sfp-machine.h:1.1        Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_aarch64_sfp-machine.h    Wed Jun 11 13:27:05 2025
@@ -1,12 +1,12 @@
-$NetBSD: patch-libgcc_config_aarch64_sfp-machine.h,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libgcc_config_aarch64_sfp-machine.h,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- libgcc/config/aarch64/sfp-machine.h
+--- libgcc/config/aarch64/sfp-machine.h.orig   2025-05-23 11:02:08.168258662 +0000
 +++ libgcc/config/aarch64/sfp-machine.h
 @@ -124,6 +124,27 @@ void __sfp_handle_exceptions (int);
-
-
+ 
+ 
  /* Define ALIASNAME as a strong alias for NAME.  */
 +#if defined __APPLE__
 +/* Mach-O doesn't support aliasing, so we build a secondary function for
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-libgccs1
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-libgccs1:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-libgccs1:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-libgccs1:1.1    Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-libgccs1        Wed Jun 11 13:27:05 2025
@@ -1,4 +1,4 @@
-$NetBSD: patch-libgcc_config_t-darwin-libgccs1,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libgcc_config_t-darwin-libgccs1,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 libgcc, Darwin: Drop the legacy library build for macOS >= 15 [PR116809].
 
@@ -16,8 +16,11 @@ No open branch of GCC emits references t
 
 See https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/t-darwin-libgccs1.
 
---- libgcc/config/t-darwin-libgccs1.orig       2024-12-09 03:35:09.522148209 +0000
+--- libgcc/config/t-darwin-libgccs1.orig       2025-05-23 11:02:08.248259924 +0000
 +++ libgcc/config/t-darwin-libgccs1
-@@ -0,0 +1,2 @@
+@@ -1,3 +1,5 @@
 +# Build a legacy libgcc_s.1
 +BUILD_LIBGCCS1 = YES
+ 
+ # Build a legacy libgcc_s.1
+ BUILD_LIBGCCS1 = YES
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-min-11
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-min-11:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-min-11:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-min-11:1.1      Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libgcc_config_t-darwin-min-11  Wed Jun 11 13:27:05 2025
@@ -1,4 +1,4 @@
-$NetBSD: patch-libgcc_config_t-darwin-min-11,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libgcc_config_t-darwin-min-11,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 libgcc, Darwin: From macOS 11, make that the earliest supported.
 
@@ -9,9 +9,12 @@ range to macOS11..current.
 
 See https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/t-darwin-min-11.
 
---- libgcc/config/t-darwin-min-11.orig 2024-12-10 16:14:54.471536671 +0000
+--- libgcc/config/t-darwin-min-11.orig 2025-05-23 11:02:08.248259924 +0000
 +++ libgcc/config/t-darwin-min-11
-@@ -0,0 +1,3 @@
+@@ -1,3 +1,6 @@
+ # Support building with -mmacosx-version-min back to macOS 11.
+ DARWIN_MIN_LIB_VERSION = -mmacosx-version-min=11
+ DARWIN_MIN_CRT_VERSION = -mmacosx-version-min=11
 +# Support building with -mmacosx-version-min back to macOS 11.
 +DARWIN_MIN_LIB_VERSION = -mmacosx-version-min=11
 +DARWIN_MIN_CRT_VERSION = -mmacosx-version-min=11
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libitm_config_aarch64_sjlj.S
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libitm_config_aarch64_sjlj.S:1.1 pkgsrc/lang/gcc14-gnat/patches/patch-libitm_config_aarch64_sjlj.S:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libitm_config_aarch64_sjlj.S:1.1       Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libitm_config_aarch64_sjlj.S   Wed Jun 11 13:27:05 2025
@@ -1,17 +1,17 @@
-$NetBSD: patch-libitm_config_aarch64_sjlj.S,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libitm_config_aarch64_sjlj.S,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- libitm/config/aarch64/sjlj.S
+--- libitm/config/aarch64/sjlj.S.orig  2025-05-23 11:02:08.728267495 +0000
 +++ libitm/config/aarch64/sjlj.S
 @@ -57,10 +57,19 @@
-
+ 
        .text
        .align  2
 +#if __ELF__
        .global _ITM_beginTransaction
        .type   _ITM_beginTransaction, %function
-
+ 
  _ITM_beginTransaction:
 +
 +#elif __MACH__
@@ -25,7 +25,7 @@ Support Darwin/aarch64, from https://git
        CFI_PAC_KEY
        PAC_AND_BTI
 @@ -84,8 +93,13 @@ _ITM_beginTransaction:
-
+ 
        /* Invoke GTM_begin_transaction with the struct we just built.  */
        mov     x1, sp
 +#if __ELF__
@@ -46,13 +46,13 @@ Support Darwin/aarch64, from https://git
 +#if __ELF__
        .size   _ITM_beginTransaction, . - _ITM_beginTransaction
 +#endif
-
+ 
        .align  2
 +#if __ELF__
        .global GTM_longjmp
        .hidden GTM_longjmp
        .type   GTM_longjmp, %function
-
+ 
  GTM_longjmp:
 +
 +#elif __MACH__
@@ -70,6 +70,6 @@ Support Darwin/aarch64, from https://git
 +#if __ELF__
        .size   GTM_longjmp, . - GTM_longjmp
 +#endif
-
+ 
  /* GNU_PROPERTY_AARCH64_* macros from elf.h for use in asm code.  */
  #define FEATURE_1_AND 0xc0000000
Index: pkgsrc/lang/gcc14-gnat/patches/patch-libphobos_libdruntime_core_internal_gc_impl_conservative_gc.d
diff -u pkgsrc/lang/gcc14-gnat/patches/patch-libphobos_libdruntime_core_internal_gc_impl_conservative_gc.d:1.1 
pkgsrc/lang/gcc14-gnat/patches/patch-libphobos_libdruntime_core_internal_gc_impl_conservative_gc.d:1.2
--- pkgsrc/lang/gcc14-gnat/patches/patch-libphobos_libdruntime_core_internal_gc_impl_conservative_gc.d:1.1      Fri Apr 25 19:35:10 2025
+++ pkgsrc/lang/gcc14-gnat/patches/patch-libphobos_libdruntime_core_internal_gc_impl_conservative_gc.d  Wed Jun 11 13:27:05 2025
@@ -1,11 +1,11 @@
-$NetBSD: patch-libphobos_libdruntime_core_internal_gc_impl_conservative_gc.d,v 1.1 2025/04/25 19:35:10 dkazankov Exp $
+$NetBSD: patch-libphobos_libdruntime_core_internal_gc_impl_conservative_gc.d,v 1.2 2025/06/11 13:27:05 dkazankov Exp $
 
 Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
 
---- libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d
+--- libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d.orig 2025-05-23 11:02:08.744267748 +0000
 +++ libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d
-@@ -30,8 +30,13 @@ module core.internal.gc.impl.conservative.gc;
-
+@@ -30,8 +30,13 @@ module core.internal.gc.impl.conservativ
+ 
  /***************************************************/
  version = COLLECT_PARALLEL;  // parallel scanning
 -version (Posix)
@@ -17,6 +17,6 @@ Support Darwin/aarch64, from https://git
 +}
 +else version (Posix)
 +  version = COLLECT_FORK;
-
+ 
  import core.internal.gc.bits;
  import core.internal.gc.os;



Home | Main Index | Thread Index | Old Index