]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgcc, Darwin: Drop the legacy library build for macOS >= 10.12 [PR116809].
authorMark Mentovai <mark@mentovai.com>
Tue, 24 Sep 2024 20:11:14 +0000 (16:11 -0400)
committerIain Sandoe <iains@gcc.gnu.org>
Fri, 4 Jul 2025 05:31:53 +0000 (06:31 +0100)
From macOSX15 SDK,  the unwinder no longer exports some of the symbols used
in that library which (a) causes 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.

We have been asked to extend this back to the earliest OS vesion supported
by the SDK (10.12).

PR target/116809

libgcc/ChangeLog:

* config.host: Build legacy libgcc_s.1 on hosts before macOS 10.12.
* config/i386/t-darwin: Remove reference to legacy libgcc_s.1
* config/rs6000/t-darwin: Likewise.
* config/t-darwin-libgccs1: New file.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
(cherry picked from commit d9cafa0c4f0a81304d9b95a78ccc8e9003c6d7a3)

libgcc/config.host
libgcc/config/i386/t-darwin
libgcc/config/rs6000/t-darwin
libgcc/config/t-darwin-libgccs1 [new file with mode: 0644]

index 8aa22123addb5f7159917abf5d66805c99a8b99c..cad80dc376d10806f3fc08a1e0b107f6055f4035 100644 (file)
@@ -246,16 +246,19 @@ case ${host} in
     *-*-darwin1[89]* | *-*-darwin2* )
       tmake_file="t-darwin-min-8 $tmake_file"
       ;;
-    *-*-darwin9* | *-*-darwin1[0-7]*)
+    *-*-darwin1[67]]*)
       tmake_file="t-darwin-min-5 $tmake_file"
       ;;
+    *-*-darwin9* | *-*-darwin1[0-5]*)
+      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
index 4c18da1efbfd3a00c2dbc0bf60816709c3013bb2..c6b3acaaca2827a929b07cdc27d6e4a124ff4e8a 100644 (file)
@@ -4,6 +4,3 @@ LIB2FUNCS_EXCLUDE = _fixtfdi _fixunstfdi _floatditf _floatunditf
 
 # Extra symbols for this port.
 SHLIB_MAPFILES += $(srcdir)/config/i386/libgcc-darwin.ver
-
-# Build a legacy libgcc_s.1
-BUILD_LIBGCCS1 = YES
index 183d0df92ce9d9a7912b657dae4badcd2d4a1a1f..8b513bdb1d78b606d44b3f6da56527aea412fdbe 100644 (file)
@@ -56,6 +56,3 @@ unwind-dw2_s.o: HOST_LIBGCC2_CFLAGS += -maltivec
 unwind-dw2.o: HOST_LIBGCC2_CFLAGS += -maltivec
 
 LIB2ADDEH += $(srcdir)/config/rs6000/darwin-fallback.c
-
-# Build a legacy libgcc_s.1
-BUILD_LIBGCCS1 = YES
diff --git a/libgcc/config/t-darwin-libgccs1 b/libgcc/config/t-darwin-libgccs1
new file mode 100644 (file)
index 0000000..b88b1a5
--- /dev/null
@@ -0,0 +1,3 @@
+
+# Build a legacy libgcc_s.1
+BUILD_LIBGCCS1 = YES