Skip to content

Commit fda811e

Browse files
committed
gcc15: update patches for 15 version (#411025)
2 parents 44816bd + 67cc3aa commit fda811e

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/libgcc/config.host
2+
+++ b/libgcc/config.host
3+
@@ -239,7 +239,7 @@ case ${host} in
4+
x86_64-*-darwin2[0-2]*)
5+
tmake_file="t-darwin-min-11 t-darwin-libgccs1 $tmake_file"
6+
;;
7+
- *-*-darwin2*)
8+
+ *-*-darwin2* | *-*-darwin)
9+
tmake_file="t-darwin-min-11 $tmake_file"
10+
;;
11+
*-*-darwin1[89]*)

pkgs/development/compilers/gcc/patches/default.nix

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@
2727
}:
2828

2929
let
30+
atLeast15 = lib.versionAtLeast version "15";
3031
atLeast14 = lib.versionAtLeast version "14";
3132
atLeast13 = lib.versionAtLeast version "13";
3233
atLeast12 = lib.versionAtLeast version "12";
3334
atLeast11 = lib.versionAtLeast version "11";
3435
atLeast10 = lib.versionAtLeast version "10";
36+
is15 = majorVersion == "15";
3537
is14 = majorVersion == "14";
3638
is13 = majorVersion == "13";
3739
is12 = majorVersion == "12";
@@ -150,8 +152,11 @@ in
150152

151153
# Fixes detection of Darwin on x86_64-darwin. Otherwise, GCC uses a deployment target of 10.5, which crashes ld64.
152154
++ optional (
153-
atLeast14 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64
155+
is14 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64
154156
) ../patches/14/libgcc-darwin-detection.patch
157+
++ optional (
158+
atLeast15 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64
159+
) ../patches/15/libgcc-darwin-detection.patch
155160

156161
# Fix detection of bootstrap compiler Ada support (cctools as) on Nix Darwin
157162
++ optional (
@@ -166,6 +171,7 @@ in
166171
# Use absolute path in GNAT dylib install names on Darwin
167172
++ optionals (stdenv.hostPlatform.isDarwin && langAda) (
168173
{
174+
"15" = [ ../patches/14/gnat-darwin-dylib-install-name-14.patch ];
169175
"14" = [ ../patches/14/gnat-darwin-dylib-install-name-14.patch ];
170176
"13" = [ ./gnat-darwin-dylib-install-name-13.patch ];
171177
"12" = [ ./gnat-darwin-dylib-install-name.patch ];
@@ -175,6 +181,13 @@ in
175181

176182
++ optionals canApplyIainsDarwinPatches (
177183
{
184+
"15" = [
185+
(fetchpatch {
186+
name = "gcc-15-darwin-aarch64-support.patch";
187+
url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a25079204c1cb3d78ba9dd7dd22b8aecce7ce264/gcc/gcc-15.1.0.diff";
188+
sha256 = "sha256-MJxSGv6LEP1sIM8cDqbmfUV7byV0bYgADeIBY/Teyu8=";
189+
})
190+
];
178191
"14" = [
179192
(fetchpatch {
180193
name = "gcc-14-darwin-aarch64-support.patch";

0 commit comments

Comments
 (0)