Skip to content

Commit 67cc3aa

Browse files
committed
gcc15: update patches for 15 version
1 parent f57f415 commit 67cc3aa

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-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: 18 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";
@@ -67,6 +69,10 @@ in
6769
[ (if atLeast12 then ./gcc-12-no-sys-dirs.patch else ./no-sys-dirs.patch) ]
6870
++ (
6971
{
72+
"15" = [
73+
./13/no-sys-dirs-riscv.patch
74+
./13/mangle-NIX_STORE-in-__FILE__.patch
75+
];
7076
"14" = [
7177
./13/no-sys-dirs-riscv.patch
7278
./13/mangle-NIX_STORE-in-__FILE__.patch
@@ -146,8 +152,11 @@ in
146152

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

152161
# Fix detection of bootstrap compiler Ada support (cctools as) on Nix Darwin
153162
++ optional (
@@ -162,6 +171,7 @@ in
162171
# Use absolute path in GNAT dylib install names on Darwin
163172
++ optionals (stdenv.hostPlatform.isDarwin && langAda) (
164173
{
174+
"15" = [ ../patches/14/gnat-darwin-dylib-install-name-14.patch ];
165175
"14" = [ ../patches/14/gnat-darwin-dylib-install-name-14.patch ];
166176
"13" = [ ./gnat-darwin-dylib-install-name-13.patch ];
167177
"12" = [ ./gnat-darwin-dylib-install-name.patch ];
@@ -171,6 +181,13 @@ in
171181

172182
++ optionals canApplyIainsDarwinPatches (
173183
{
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+
];
174191
"14" = [
175192
(fetchpatch {
176193
name = "gcc-14-darwin-aarch64-support.patch";

0 commit comments

Comments
 (0)