pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/gcc14
Module Name: pkgsrc
Committed By: brook
Date: Sun Dec 15 03:12:18 UTC 2024
Modified Files:
pkgsrc/lang/gcc14: distinfo
pkgsrc/lang/gcc14/patches: patch-libgcc_config.host
Added Files:
pkgsrc/lang/gcc14/patches: patch-libgcc_config_i386_t-darwin
patch-libgcc_config_rs6000_t-darwin
patch-libgcc_config_t-darwin-libgccs1
patch-libgcc_config_t-darwin-min-11
Log Message:
The lang/gcc12, lang/gcc13, and lang/gcc14 fail to build on Darwin 24
(MacOS 15) + Xcode 16. This is a known problem that has been fixed
upstream; see
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D116809&data=05%7C02%7Cbrook%40biology.nmsu.edu%7C9ac029bebed94a8c076f08dd19568e63%7Ca3ec87a89fb84158ba8ff11bace1ebaa%7C1%7C0%7C638694581737865288%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=DIvQP0mbOte9Pjh3UjtXsSGiQhTontx4GTQHNCFwg6E%3D&reserved=0
and associated patches from 2024-09-24 and 2024-09-27.
The basic problem is that the legacy library libgcc_s.1 referenced
private symbols in the Apple-provided runtime, which have now been
removed by Apple and therefore do not resolve. Those symbols never
worked anyway, so there should be no legacy code using them. The
upstream solution is to drop support for libgcc_s.1 for new versions
of Darwin.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/gcc14/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/gcc14/patches/patch-libgcc_config.host
cvs rdiff -u -r0 -r1.1 \
pkgsrc/lang/gcc14/patches/patch-libgcc_config_i386_t-darwin \
pkgsrc/lang/gcc14/patches/patch-libgcc_config_rs6000_t-darwin \
pkgsrc/lang/gcc14/patches/patch-libgcc_config_t-darwin-libgccs1 \
pkgsrc/lang/gcc14/patches/patch-libgcc_config_t-darwin-min-11
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/distinfo
diff -u pkgsrc/lang/gcc14/distinfo:1.4 pkgsrc/lang/gcc14/distinfo:1.5
--- pkgsrc/lang/gcc14/distinfo:1.4 Sun Sep 29 16:51:55 2024
+++ pkgsrc/lang/gcc14/distinfo Sun Dec 15 03:12:17 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2024/09/29 16:51:55 adam Exp $
+$NetBSD: distinfo,v 1.5 2024/12/15 03:12:17 brook Exp $
BLAKE2s (gcc-14.2.0.diff) = 48bde4d7aae57211844aca294c120caaebdb1b1ecabfd0349aa7e27d11ef0042
SHA512 (gcc-14.2.0.diff) = c96d92289492d76f6e4e6376148c53d7e962fd15d03b1ecfe16f8036a0ff0c1e9277bf00566ecfe0d54765a679ce7d7470f6e696f8e3fe7b419000b924260fcf
@@ -20,7 +20,11 @@ SHA1 (patch-gcc_config_arm_netbsd-elf.h)
SHA1 (patch-isl_configure) = a6295c509bdc82e8b54d7dec5252994532463091
SHA1 (patch-libffi_configure) = 919bbe094e3ce547a0186eeaddb20a662595f79a
SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 89e2dd6aaf2c1f75726f02362d8a8bf7178694ea
-SHA1 (patch-libgcc_config.host) = 482d8e868cad209d7bf3c190f3cb70b84e4c63cc
+SHA1 (patch-libgcc_config.host) = 5b0368fd23705f25b6539abde5a8726a2f9f9cb1
+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_crtstuff.c) = a16d465039de00c195cf0694560140a9c38f3a25
SHA1 (patch-libgfortran_io_io.h) = d44676239a7f45e42054d24bd5224f43c20055c0
SHA1 (patch-libquadmath_printf_quadmath-printf.c) = 78e09f1e6d61ee57cee83275093cf46b2335d204
Index: pkgsrc/lang/gcc14/patches/patch-libgcc_config.host
diff -u pkgsrc/lang/gcc14/patches/patch-libgcc_config.host:1.1 pkgsrc/lang/gcc14/patches/patch-libgcc_config.host:1.2
--- pkgsrc/lang/gcc14/patches/patch-libgcc_config.host:1.1 Fri Jun 28 18:35:16 2024
+++ pkgsrc/lang/gcc14/patches/patch-libgcc_config.host Sun Dec 15 03:12:17 2024
@@ -1,11 +1,72 @@
-$NetBSD: patch-libgcc_config.host,v 1.1 2024/06/28 18:35:16 wiz Exp $
+$NetBSD: patch-libgcc_config.host,v 1.2 2024/12/15 03:12:17 brook Exp $
-This is needed for arm64 to get Out-of-line LSE atomics linked into libgcc.
+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.
---- libgcc/config.host.orig 2023-04-26 07:09:43.000000000 +0000
+--- libgcc/config.host.orig 2024-08-01 08:17:17.000000000 +0000
+++ libgcc/config.host
-@@ -388,6 +388,7 @@ aarch64*-*-freebsd*)
+@@ -236,19 +236,25 @@ 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"
++ x64_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"
+ ;;
+ *-*-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
+@@ -429,6 +435,7 @@ aarch64*-*-freebsd*)
aarch64*-*-netbsd*)
extra_parts="$extra_parts crtfastmath.o"
tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
@@ -13,7 +74,7 @@ libsupc++ fails to link without this, an
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
-@@ -479,7 +480,8 @@ arm*-*-netbsdelf*)
+@@ -530,7 +537,8 @@ arm*-*-netbsdelf*)
case ${host} in
arm*-*-netbsdelf-*eabi*)
tmake_file="${tmake_file} arm/t-netbsd-eabi"
Added files:
Index: pkgsrc/lang/gcc14/patches/patch-libgcc_config_i386_t-darwin
diff -u /dev/null pkgsrc/lang/gcc14/patches/patch-libgcc_config_i386_t-darwin:1.1
--- /dev/null Sun Dec 15 03:12:18 2024
+++ pkgsrc/lang/gcc14/patches/patch-libgcc_config_i386_t-darwin Sun Dec 15 03:12:17 2024
@@ -0,0 +1,27 @@
+$NetBSD: patch-libgcc_config_i386_t-darwin,v 1.1 2024/12/15 03:12:17 brook Exp $
+
+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
+
+See https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/i386/t-darwin.
+
+--- libgcc/config/i386/t-darwin.orig 2024-05-21 07:47:41.000000000 +0000
++++ libgcc/config/i386/t-darwin
+@@ -4,6 +4,3 @@ LIB2FUNCS_EXCLUDE = _fixtfdi _fixunstfdi
+
+ # Extra symbols for this port.
+ SHLIB_MAPFILES += $(srcdir)/config/i386/libgcc-darwin.ver
+-
+-# Build a legacy libgcc_s.1
+-BUILD_LIBGCCS1 = YES
Index: pkgsrc/lang/gcc14/patches/patch-libgcc_config_rs6000_t-darwin
diff -u /dev/null pkgsrc/lang/gcc14/patches/patch-libgcc_config_rs6000_t-darwin:1.1
--- /dev/null Sun Dec 15 03:12:18 2024
+++ pkgsrc/lang/gcc14/patches/patch-libgcc_config_rs6000_t-darwin Sun Dec 15 03:12:17 2024
@@ -0,0 +1,27 @@
+$NetBSD: patch-libgcc_config_rs6000_t-darwin,v 1.1 2024/12/15 03:12:17 brook Exp $
+
+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
+
+See https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/rs6000/t-darwin.
+
+--- libgcc/config/rs6000/t-darwin.orig 2024-05-21 07:47:41.000000000 +0000
++++ libgcc/config/rs6000/t-darwin
+@@ -56,6 +56,3 @@ unwind-dw2_s.o: HOST_LIBGCC2_CFLAGS += -
+ unwind-dw2.o: HOST_LIBGCC2_CFLAGS += -maltivec
+
+ LIB2ADDEH += $(srcdir)/config/rs6000/darwin-fallback.c
+-
+-# Build a legacy libgcc_s.1
+-BUILD_LIBGCCS1 = YES
Index: pkgsrc/lang/gcc14/patches/patch-libgcc_config_t-darwin-libgccs1
diff -u /dev/null pkgsrc/lang/gcc14/patches/patch-libgcc_config_t-darwin-libgccs1:1.1
--- /dev/null Sun Dec 15 03:12:18 2024
+++ pkgsrc/lang/gcc14/patches/patch-libgcc_config_t-darwin-libgccs1 Sun Dec 15 03:12:17 2024
@@ -0,0 +1,23 @@
+$NetBSD: patch-libgcc_config_t-darwin-libgccs1,v 1.1 2024/12/15 03:12:17 brook Exp $
+
+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
+
+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
+@@ -0,0 +1,2 @@
++# Build a legacy libgcc_s.1
++BUILD_LIBGCCS1 = YES
Index: pkgsrc/lang/gcc14/patches/patch-libgcc_config_t-darwin-min-11
diff -u /dev/null pkgsrc/lang/gcc14/patches/patch-libgcc_config_t-darwin-min-11:1.1
--- /dev/null Sun Dec 15 03:12:18 2024
+++ pkgsrc/lang/gcc14/patches/patch-libgcc_config_t-darwin-min-11 Sun Dec 15 03:12:17 2024
@@ -0,0 +1,17 @@
+$NetBSD: patch-libgcc_config_t-darwin-min-11,v 1.1 2024/12/15 03:12:17 brook Exp $
+
+libgcc, Darwin: From macOS 11, make that the earliest supported.
+
+For libgcc, we have (so far) supported building a DSO that supports
+earlier versions of the OS than the target. From macOS 11, there are
+APIs that do not exist on earlier OS versions, so limit the libgcc
+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
+@@ -0,0 +1,3 @@
++# 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
Home |
Main Index |
Thread Index |
Old Index