|
| 1 | +From df72eb16a5bda90be31681a8d494a4053f891986 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Iain Sandoe <iain@sandoe.co.uk> |
| 3 | +Date: Sun, 22 Sep 2024 11:43:32 +0100 |
| 4 | +Subject: [PATCH 2/3] libgcc, Darwin: Drop the legacy library build for macOS |
| 5 | + >= 15 [PR116809]. |
| 6 | + |
| 7 | +We have been building a legacy libgcc_s.1 DSO to support code that |
| 8 | +was built with older compilers. |
| 9 | + |
| 10 | +From macOS 15, the unwinder no longer exports some of the symbols used |
| 11 | +in that library which (a) cuases bootstrap fail and (b) means that the |
| 12 | +legacy library is no longer useful. |
| 13 | + |
| 14 | +No open branch of GCC emits references to this library - and any already |
| 15 | +-built code that depends on the symbols would need rework anyway. |
| 16 | + |
| 17 | + PR target/116809 |
| 18 | + |
| 19 | +libgcc/ChangeLog: |
| 20 | + |
| 21 | + * config.host: Build legacy libgcc_s.1 on hosts before macOS 15. |
| 22 | + * config/i386/t-darwin: Remove reference to legacy libgcc_s.1 |
| 23 | + * config/rs6000/t-darwin: Likewise. |
| 24 | + * config/t-darwin-libgccs1: New file. |
| 25 | + |
| 26 | +Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> |
| 27 | +(cherry picked from commit d9cafa0c4f0a81304d9b95a78ccc8e9003c6d7a3) |
| 28 | +--- |
| 29 | + libgcc/config.host | 11 +++++++---- |
| 30 | + libgcc/config/i386/t-darwin | 3 --- |
| 31 | + libgcc/config/rs6000/t-darwin | 3 --- |
| 32 | + libgcc/config/t-darwin-libgccs1 | 3 +++ |
| 33 | + 4 files changed, 10 insertions(+), 10 deletions(-) |
| 34 | + create mode 100644 libgcc/config/t-darwin-libgccs1 |
| 35 | + |
| 36 | +diff --git libgcc/config.host libgcc/config.host |
| 37 | +index d27204f3fb47..08be426f3fe4 100644 |
| 38 | +--- libgcc/config.host |
| 39 | ++++ libgcc/config.host |
| 40 | +@@ -236,22 +236,25 @@ case ${host} in |
| 41 | + esac |
| 42 | + tmake_file="$tmake_file t-slibgcc-darwin" |
| 43 | + case ${host} in |
| 44 | ++ x86_64-*-darwin2[0-3]*) |
| 45 | ++ tmake_file="t-darwin-min-11 t-darwin-libgccs1 $tmake_file" |
| 46 | ++ ;; |
| 47 | + *-*-darwin2*) |
| 48 | + tmake_file="t-darwin-min-11 $tmake_file" |
| 49 | + ;; |
| 50 | + *-*-darwin1[89]*) |
| 51 | +- tmake_file="t-darwin-min-8 $tmake_file" |
| 52 | ++ tmake_file="t-darwin-min-8 t-darwin-libgccs1 $tmake_file" |
| 53 | + ;; |
| 54 | + *-*-darwin9* | *-*-darwin1[0-7]*) |
| 55 | +- tmake_file="t-darwin-min-5 $tmake_file" |
| 56 | ++ tmake_file="t-darwin-min-5 t-darwin-libgccs1 $tmake_file" |
| 57 | + ;; |
| 58 | + *-*-darwin[4-8]*) |
| 59 | +- tmake_file="t-darwin-min-1 $tmake_file" |
| 60 | ++ tmake_file="t-darwin-min-1 t-darwin-libgccs1 $tmake_file" |
| 61 | + ;; |
| 62 | + *) |
| 63 | + # Fall back to configuring for the oldest system known to work with |
| 64 | + # all archs and the current sources. |
| 65 | +- tmake_file="t-darwin-min-5 $tmake_file" |
| 66 | ++ tmake_file="t-darwin-min-5 t-darwin-libgccs1 $tmake_file" |
| 67 | + echo "Warning: libgcc configured to support macOS 10.5" 1>&2 |
| 68 | + ;; |
| 69 | + esac |
| 70 | +diff --git libgcc/config/i386/t-darwin libgcc/config/i386/t-darwin |
| 71 | +index 4c18da1efbfd..c6b3acaaca28 100644 |
| 72 | +--- libgcc/config/i386/t-darwin |
| 73 | ++++ libgcc/config/i386/t-darwin |
| 74 | +@@ -4,6 +4,3 @@ LIB2FUNCS_EXCLUDE = _fixtfdi _fixunstfdi _floatditf _floatunditf |
| 75 | + |
| 76 | + # Extra symbols for this port. |
| 77 | + SHLIB_MAPFILES += $(srcdir)/config/i386/libgcc-darwin.ver |
| 78 | +- |
| 79 | +-# Build a legacy libgcc_s.1 |
| 80 | +-BUILD_LIBGCCS1 = YES |
| 81 | +diff --git libgcc/config/rs6000/t-darwin libgcc/config/rs6000/t-darwin |
| 82 | +index 183d0df92ce9..8b513bdb1d78 100644 |
| 83 | +--- libgcc/config/rs6000/t-darwin |
| 84 | ++++ libgcc/config/rs6000/t-darwin |
| 85 | +@@ -56,6 +56,3 @@ unwind-dw2_s.o: HOST_LIBGCC2_CFLAGS += -maltivec |
| 86 | + unwind-dw2.o: HOST_LIBGCC2_CFLAGS += -maltivec |
| 87 | + |
| 88 | + LIB2ADDEH += $(srcdir)/config/rs6000/darwin-fallback.c |
| 89 | +- |
| 90 | +-# Build a legacy libgcc_s.1 |
| 91 | +-BUILD_LIBGCCS1 = YES |
| 92 | +diff --git libgcc/config/t-darwin-libgccs1 libgcc/config/t-darwin-libgccs1 |
| 93 | +new file mode 100644 |
| 94 | +index 000000000000..b88b1a5bba8a |
| 95 | +--- /dev/null |
| 96 | ++++ libgcc/config/t-darwin-libgccs1 |
| 97 | +@@ -0,0 +1,3 @@ |
| 98 | ++ |
| 99 | ++# Build a legacy libgcc_s.1 |
| 100 | ++BUILD_LIBGCCS1 = YES |
| 101 | +-- |
| 102 | +2.46.2 |
| 103 | + |
0 commit comments