|
27 | 27 | }: |
28 | 28 |
|
29 | 29 | let |
| 30 | + atLeast15 = lib.versionAtLeast version "15"; |
30 | 31 | atLeast14 = lib.versionAtLeast version "14"; |
31 | 32 | atLeast13 = lib.versionAtLeast version "13"; |
32 | 33 | atLeast12 = lib.versionAtLeast version "12"; |
33 | 34 | atLeast11 = lib.versionAtLeast version "11"; |
34 | 35 | atLeast10 = lib.versionAtLeast version "10"; |
| 36 | + is15 = majorVersion == "15"; |
35 | 37 | is14 = majorVersion == "14"; |
36 | 38 | is13 = majorVersion == "13"; |
37 | 39 | is12 = majorVersion == "12"; |
|
67 | 69 | [ (if atLeast12 then ./gcc-12-no-sys-dirs.patch else ./no-sys-dirs.patch) ] |
68 | 70 | ++ ( |
69 | 71 | { |
| 72 | + "15" = [ |
| 73 | + ./13/no-sys-dirs-riscv.patch |
| 74 | + ./13/mangle-NIX_STORE-in-__FILE__.patch |
| 75 | + ]; |
70 | 76 | "14" = [ |
71 | 77 | ./13/no-sys-dirs-riscv.patch |
72 | 78 | ./13/mangle-NIX_STORE-in-__FILE__.patch |
|
146 | 152 |
|
147 | 153 | # Fixes detection of Darwin on x86_64-darwin. Otherwise, GCC uses a deployment target of 10.5, which crashes ld64. |
148 | 154 | ++ optional ( |
149 | | - atLeast14 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 |
| 155 | + is14 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 |
150 | 156 | ) ../patches/14/libgcc-darwin-detection.patch |
| 157 | +++ optional ( |
| 158 | + atLeast15 && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 |
| 159 | +) ../patches/15/libgcc-darwin-detection.patch |
151 | 160 |
|
152 | 161 | # Fix detection of bootstrap compiler Ada support (cctools as) on Nix Darwin |
153 | 162 | ++ optional ( |
|
162 | 171 | # Use absolute path in GNAT dylib install names on Darwin |
163 | 172 | ++ optionals (stdenv.hostPlatform.isDarwin && langAda) ( |
164 | 173 | { |
| 174 | + "15" = [ ../patches/14/gnat-darwin-dylib-install-name-14.patch ]; |
165 | 175 | "14" = [ ../patches/14/gnat-darwin-dylib-install-name-14.patch ]; |
166 | 176 | "13" = [ ./gnat-darwin-dylib-install-name-13.patch ]; |
167 | 177 | "12" = [ ./gnat-darwin-dylib-install-name.patch ]; |
|
171 | 181 |
|
172 | 182 | ++ optionals canApplyIainsDarwinPatches ( |
173 | 183 | { |
| 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 | + ]; |
174 | 191 | "14" = [ |
175 | 192 | (fetchpatch { |
176 | 193 | name = "gcc-14-darwin-aarch64-support.patch"; |
|
0 commit comments