-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This also fixes the macOS 14 x86_64 build when using Xcode 16. Closes: https://trac.macports.org/ticket/70866
- Loading branch information
1 parent
d0dbbcb
commit 40a267e
Showing
5 changed files
with
191 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
lang/gcc14/files/0001-Darwin-Allow-for-as-versions-that-need-for-std-in.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From ea41179dab5df144d2ec137c94dcbe171e427728 Mon Sep 17 00:00:00 2001 | ||
From: Iain Sandoe <[email protected]> | ||
Date: Wed, 18 Sep 2024 17:46:32 +0100 | ||
Subject: [PATCH 1/3] Darwin: Allow for as versions that need '-' for std in. | ||
|
||
Recent versions of Xcode as require a dash to read from standard | ||
input. We can use this on all supported OS versions so make it | ||
unconditional. Patch from Mark Mentovai. | ||
|
||
gcc/ChangeLog: | ||
|
||
* config/darwin.h (AS_NEEDS_DASH_FOR_PIPED_INPUT): New. | ||
|
||
Signed-off-by: Iain Sandoe <[email protected]> | ||
--- | ||
gcc/config/darwin.h | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git gcc/config/darwin.h gcc/config/darwin.h | ||
index 7a53a1688a7d..5370511bec21 100644 | ||
--- gcc/config/darwin.h | ||
+++ gcc/config/darwin.h | ||
@@ -651,6 +651,8 @@ extern GTY(()) int darwin_ms_struct; | ||
#define ASM_OPTIONS "%{v} %{w:-W} %{I*}" | ||
#endif | ||
|
||
+#define AS_NEEDS_DASH_FOR_PIPED_INPUT | ||
+ | ||
/* Default Darwin ASM_SPEC, very simple. */ | ||
#define ASM_SPEC \ | ||
"%{static} -arch %(darwin_arch) " \ | ||
-- | ||
2.46.2 | ||
|
103 changes: 103 additions & 0 deletions
103
lang/gcc14/files/0002-libgcc-Darwin-Drop-the-legacy-library-build-for-macO.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
From df72eb16a5bda90be31681a8d494a4053f891986 Mon Sep 17 00:00:00 2001 | ||
From: Iain Sandoe <[email protected]> | ||
Date: Sun, 22 Sep 2024 11:43:32 +0100 | ||
Subject: [PATCH 2/3] 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/ChangeLog: | ||
|
||
* config.host: Build legacy libgcc_s.1 on hosts before macOS 15. | ||
* 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 <[email protected]> | ||
(cherry picked from commit d9cafa0c4f0a81304d9b95a78ccc8e9003c6d7a3) | ||
--- | ||
libgcc/config.host | 11 +++++++---- | ||
libgcc/config/i386/t-darwin | 3 --- | ||
libgcc/config/rs6000/t-darwin | 3 --- | ||
libgcc/config/t-darwin-libgccs1 | 3 +++ | ||
4 files changed, 10 insertions(+), 10 deletions(-) | ||
create mode 100644 libgcc/config/t-darwin-libgccs1 | ||
|
||
diff --git libgcc/config.host libgcc/config.host | ||
index d27204f3fb47..08be426f3fe4 100644 | ||
--- libgcc/config.host | ||
+++ libgcc/config.host | ||
@@ -236,22 +236,25 @@ case ${host} in | ||
esac | ||
tmake_file="$tmake_file t-slibgcc-darwin" | ||
case ${host} in | ||
+ x86_64-*-darwin2[0-3]*) | ||
+ 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" | ||
;; | ||
*-*-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 | ||
diff --git libgcc/config/i386/t-darwin libgcc/config/i386/t-darwin | ||
index 4c18da1efbfd..c6b3acaaca28 100644 | ||
--- libgcc/config/i386/t-darwin | ||
+++ libgcc/config/i386/t-darwin | ||
@@ -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 | ||
diff --git libgcc/config/rs6000/t-darwin libgcc/config/rs6000/t-darwin | ||
index 183d0df92ce9..8b513bdb1d78 100644 | ||
--- libgcc/config/rs6000/t-darwin | ||
+++ libgcc/config/rs6000/t-darwin | ||
@@ -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 libgcc/config/t-darwin-libgccs1 libgcc/config/t-darwin-libgccs1 | ||
new file mode 100644 | ||
index 000000000000..b88b1a5bba8a | ||
--- /dev/null | ||
+++ libgcc/config/t-darwin-libgccs1 | ||
@@ -0,0 +1,3 @@ | ||
+ | ||
+# Build a legacy libgcc_s.1 | ||
+BUILD_LIBGCCS1 = YES | ||
-- | ||
2.46.2 | ||
|
39 changes: 39 additions & 0 deletions
39
lang/gcc14/files/0003-libgcc-Darwin-Don-t-build-legacy-libgcc_s.1-on-macOS.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From df3861926d0604145810f38a8719984447f33a3c Mon Sep 17 00:00:00 2001 | ||
From: Mark Mentovai <[email protected]> | ||
Date: Tue, 24 Sep 2024 16:11:14 -0400 | ||
Subject: [PATCH 3/3] libgcc, Darwin: Don't build legacy libgcc_s.1 on macOS 14 | ||
[PR116809] | ||
|
||
d9cafa0c4f0a 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 | ||
|
||
libgcc/ChangeLog: | ||
|
||
* config.host: Don't build legacy libgcc_s.1 on macOS 14. | ||
|
||
Signed-off-by: Mark Mentovai <[email protected]> | ||
--- | ||
libgcc/config.host | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git libgcc/config.host libgcc/config.host | ||
index 08be426f3fe4..ae4c91dee351 100644 | ||
--- libgcc/config.host | ||
+++ libgcc/config.host | ||
@@ -236,7 +236,7 @@ case ${host} in | ||
esac | ||
tmake_file="$tmake_file t-slibgcc-darwin" | ||
case ${host} in | ||
- x86_64-*-darwin2[0-3]*) | ||
+ x86_64-*-darwin2[0-2]*) | ||
tmake_file="t-darwin-min-11 t-darwin-libgccs1 $tmake_file" | ||
;; | ||
*-*-darwin2*) | ||
-- | ||
2.46.2 | ||
|
This file was deleted.
Oops, something went wrong.