163
163
++ fromUntil "8.10.2" "8.10.3" ./patches/ghc/MR3714-backported-to-8.10.2.patch
164
164
165
165
# See https://github.com/input-output-hk/haskell.nix/issues/1027
166
+ ++ final . lib . optional ( versionAtLeast "8.10.3" && versionLessThan "9.2" && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/ghc-8.10-3434-armv7a.patch
166
167
++ final . lib . optional ( versionAtLeast "8.10.3" && versionLessThan "9.2" && final . stdenv . targetPlatform . isAarch64 ) ./patches/ghc/ghc-8.10-3434.patch
167
- ++ final . lib . optional ( versionAtLeast "9.2.1" && versionLessThan "9.3" && final . stdenv . targetPlatform . isAarch64 ) ./patches/ghc/ghc-9.2-3434.patch
168
+ ++ final . lib . optional ( versionAtLeast "9.2.1" && versionLessThan "9.3" && ( final . stdenv . targetPlatform . isAarch64 || final . stdenv . targetPlatform . isAndroid ) ) ./patches/ghc/ghc-9.2-3434.patch
168
169
169
170
++ fromUntil "8.10.1" "9.4" ./patches/ghc/ghc-acrt-iob-func.patch
170
171
++ fromUntil "8.10.1" "9.2" ./patches/ghc/ghc-mprotect-nonzero-len.patch
@@ -247,16 +248,27 @@ in {
247
248
++ final . lib . optionals ( final . stdenv . targetPlatform . isGhcjs ) ( fromUntil "9.6.3" "9.8" ./patches/ghc/ghc-9.6.3-JS-implement-TH-support.patch )
248
249
++ fromUntil "9.8.1" "9.8.2" ./patches/ghc/ghc-9.8-cabal-c-soures-fix.patch
249
250
++ fromUntil "9.6.3" "9.9" ./patches/ghc/ghc-9.6.3-Cabal-9384.patch
251
+ ++ final . lib . optionals ( final . stdenv . targetPlatform . isWindows ) ( fromUntil "9.4.1" "9.5" ./patches/ghc/ghc-9.4-hadrian-win-cross.patch )
252
+ ++ fromUntil "9.6.1" "9.8" ./patches/ghc/MR10116.patch
253
+ ++ fromUntil "9.4.1" "9.6" ./patches/ghc/hadrian-build-deriveConstants-genprimopcode-ghc94.patch
254
+ ++ fromUntil "9.6.1" "9.8" ./patches/ghc/hadrian-build-deriveConstants-genprimopcode.patch
255
+ ++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.4" && final . stdenv . targetPlatform != final . stdenv . hostPlatform ) ./patches/ghc/ghc-make-stage-1-lib-ghc.patch
250
256
251
257
# the following is a partial reversal of https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4391, to address haskell.nix#1227
252
258
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAarch64 ) ./patches/ghc/mmap-next.patch
253
259
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAarch64 ) ./patches/ghc/m32_alloc.patch
260
+
261
+ # Android
254
262
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid ) ./patches/ghc/rts-android-jemalloc-qemu.patch
255
263
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid ) ./patches/ghc/stack-protector-symbols.patch
256
- ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid ) ./patches/ghc/libraries-prim-os-android.patch
264
+ ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/libraries-prim-os-android-armv7a.patch
265
+ ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch64 ) ./patches/ghc/libraries-prim-os-android.patch
257
266
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid ) ./patches/ghc/ghc-rts-linker-condbr.patch
258
- ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid ) ./patches/ghc/ghc-8.10.7-linker-weak-and-common.patch
259
- ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid ) ./patches/ghc/libc-memory-symbols.patch
267
+ # due to mmap-next renaming we need different ones for aarch64 and aarch32 m(
268
+ ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/ghc-8.10.7-linker-weak-and-common-armv7a.patch
269
+ ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch64 ) ./patches/ghc/ghc-8.10.7-linker-weak-and-common.patch
270
+ ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/libc-memory-symbols-armv7a.patch
271
+ ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch64 ) ./patches/ghc/libc-memory-symbols.patch
260
272
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid ) ./patches/ghc/android-base-needs-iconv.patch
261
273
++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.4" && final . stdenv . targetPlatform != final . stdenv . hostPlatform ) ./patches/ghc/ghc-make-stage-1-lib-ghc.patch
262
274
++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAarch64 ) ./patches/ghc/ghc-8.10-better-symbol-addr-debug.patch
@@ -274,6 +286,10 @@ in {
274
286
# Fix the bad fixups: https://gitlab.haskell.org/ghc/ghc/-/commit/2adc050857a9c1b992040fbfd55fbe65b2851b19
275
287
++ final . lib . optional ( versionAtLeast "9.6" && versionLessThan "9.6.4" && final . stdenv . targetPlatform . isAarch64 ) ./patches/ghc/2adc050857a9c1b992040fbfd55fbe65b2851b19.patch
276
288
++ final . lib . optional ( versionAtLeast "8.10.7" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAarch64 && final . stdenv . targetPlatform . isMusl && final . stdenv . targetPlatform != final . stdenv . hostPlatform ) ./patches/ghc/ghc-8.10-aarch64-musl-gettimeofday.patch
289
+ ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.2" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/ghc-8.10-android.patch
290
+ ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.2" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/ghc-8.10.7-android-bionic-symbols.patch
291
+ ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.2" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/ghc-8.10.7-bionic-libc.patch
292
+ ++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.2" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/ghc-8.10.7-cross-dont-build-stage2-tools.patch
277
293
;
278
294
in ( {
279
295
ghc865 = final . callPackage ../compiler/ghc ( traceWarnOld "8.6" {
0 commit comments