head 1.2; access; symbols pkgsrc-2026Q1:1.2.0.8 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.6 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.4 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.2 pkgsrc-2025Q2-base:1.2; locks; strict; comment @# @; 1.2 date 2025.06.11.13.27.05; author dkazankov; state Exp; branches; next 1.1; commitid joH59RK5E27zytYF; 1.1 date 2025.04.25.19.35.10; author dkazankov; state Exp; branches; next ; commitid UNL0eZmaL4DA6tSF; desc @@ 1.2 log @gcc14-gnat*: update to 14.3 bug-fix release @ text @$NetBSD: patch-libgcc_config.host,v 1.4 2025/06/08 07:37:45 wiz Exp $ Part 1: drop legacy library build for macOS >= 14 [PR116809]. This is a mixture of two upstream patches. See https://github.com/gcc-mirror/gcc/blob/master/libgcc/config.host libgcc, Darwin: Drop the legacy library build for macOS >= 15 [PR116809]. We have been building a legacy libgcc_s.1 DSO to support code that was built with older compilers. From macOS 15, the unwinder no longer exports some of the symbols used in that library which (a) cuases bootstrap fail and (b) means that the legacy library is no longer useful. No open branch of GCC emits references to this library - and any already -built code that depends on the symbols would need rework anyway. PR target/116809 libgcc, Darwin: Don't build legacy libgcc_s.1 on macOS 14 [PR116809] d9cafa0 stopped building libgcc_s.1 on macOS >= 15, in part because that is required to bootstrap the compiler using the macOS 15 SDK. The macOS 15 SDK ships in Xcode 16, which also runs on macOS 14. libgcc_s.1 can no longer be built on macOS 14 using Xcode 16 by the same logic that the previous change disabled it for macOS 15. PR target/116809 Parts 2-3: This is needed for arm64 to get Out-of-line LSE atomics linked into libgcc. libsupc++ fails to link without this, and for arm to build. Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches. --- libgcc/config.host.orig 2025-05-23 11:02:08.168258662 +0000 +++ libgcc/config.host @@@@ -82,7 +82,7 @@@@ m32c*-*-*) cpu_type=m32c tmake_file=t-fdpbit ;; -aarch64*-*-*) +aarch64*-*-* | arm64*-*-*) cpu_type=aarch64 ;; alpha*-*-*) @@@@ -236,11 +236,14 @@@@ case ${host} in esac tmake_file="$tmake_file t-slibgcc-darwin" case ${host} in + 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 $tmake_file" + tmake_file="t-darwin-min-8 t-darwin-libgccs1 $tmake_file" ;; *-*-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 - extra_parts="crt3.o libd10-uwfef.a crttms.o crttme.o libemutls_w.a" + extra_parts="crt3.o crttms.o crttme.o libemutls_w.a " ;; *-*-dragonfly*) tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" @@@@ -424,6 +427,15 @@@@ aarch64*-*-elf | aarch64*-*-rtems*) tmake_file="${tmake_file} t-dfprules" md_unwind_header=aarch64/aarch64-unwind.h ;; +aarch64*-*-darwin*) + extra_parts="$extra_parts crtfastmath.o libheapt_w.a" + tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-lse" + tmake_file="${tmake_file} t-crtfm t-dfprules" + tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp" + tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline" + md_unwind_header=aarch64/aarch64-unwind.h + ;; aarch64*-*-freebsd*) extra_parts="$extra_parts crtfastmath.o" tmake_file="${tmake_file} ${cpu_type}/t-aarch64" @@@@ -435,6 +447,7 @@@@ aarch64*-*-freebsd*) aarch64*-*-netbsd*) extra_parts="$extra_parts crtfastmath.o" tmake_file="${tmake_file} ${cpu_type}/t-aarch64" + tmake_file="${tmake_file} ${cpu_type}/t-lse" 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 @@@@ -536,7 +549,8 @@@@ arm*-*-netbsdelf*) case ${host} in arm*-*-netbsdelf-*eabi*) tmake_file="${tmake_file} arm/t-netbsd-eabi" - unwind_header=config/arm/unwind-arm.h + # GCC 7 vs NetBSD/eabi -> avoid arm unwinder + #unwind_header=config/arm/unwind-arm.h ;; *) tmake_file="${tmake_file} arm/t-netbsd t-slibgcc-gld-nover" @@@@ -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" - extra_parts="$extra_parts crtfastmath.o libheapt_w.a" + extra_parts="$extra_parts crtfastmath.o libd10-uwfef.a libheapt_w.a" tmake_file="${tmake_file} i386/t-heap-trampoline" ;; x86_64-*-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" - extra_parts="$extra_parts crtfastmath.o libheapt_w.a" + extra_parts="$extra_parts crtfastmath.o libd10-uwfef.a libheapt_w.a" tmake_file="${tmake_file} i386/t-heap-trampoline" ;; i[34567]86-*-elfiamcu) @@@@ -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" + extra_parts="$extra_parts libd10-uwfef.a " extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" ;; powerpc64-*-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-darwin64 rs6000/t-ibm-ldouble" + extra_parts="$extra_parts libd10-uwfef.a " extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" ;; powerpc*-*-freebsd*) @ 1.1 log @lang/gcc14-gnat*: add new packages for GCC GNAT 14 @ text @d1 1 a1 1 $NetBSD: patch-libgcc_config.host,v 1.3 2025/02/05 16:30:37 adam Exp $ d38 1 a38 1 --- libgcc/config.host.orig 2024-08-01 08:17:17.000000000 +0000 d49 1 a49 1 @@@@ -236,19 +236,25 @@@@ case ${host} in a52 2 - *-*-darwin1[89]* | *-*-darwin2* ) - tmake_file="t-darwin-min-8 $tmake_file" d56 5 a60 4 + *-*-darwin2*) + tmake_file="t-darwin-min-11 $tmake_file" + ;; + *-*-darwin1[89]*) d63 3 a65 17 *-*-darwin9* | *-*-darwin1[0-7]*) - tmake_file="t-darwin-min-5 $tmake_file" + tmake_file="t-darwin-min-5 t-darwin-libgccs1 $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 ;; esac @@@@ -274,7 +280,7 @@@@ case ${host} in d74 1 a74 1 @@@@ -418,6 +424,15 @@@@ aarch64*-*-elf | aarch64*-*-rtems*) d90 1 a90 1 @@@@ -429,6 +444,7 @@@@ aarch64*-*-freebsd*) d98 1 a98 1 @@@@ -530,7 +546,8 @@@@ arm*-*-netbsdelf*) d108 1 a108 1 @@@@ -725,14 +742,14 @@@@ i[34567]86-*-darwin*) d125 1 a125 1 @@@@ -1215,12 +1232,14 @@@@ powerpc-*-darwin*) @