haskell.compiler.*: fix stack overrun on 32bit (#402925)

Changed files
+20
pkgs
development
compilers
haskell-modules
+11
pkgs/development/compilers/ghc/common-hadrian.nix
···
includes = [ "configure.ac" ];
hash = "sha256-L3FQvcm9QB59BOiR2g5/HACAufIG08HiT53EIOjj64g=";
})
+
]
+
# Fixes stack overrun in rts which crashes an process whenever
+
# freeHaskellFunPtr is called with nixpkgs' hardening flags.
+
# https://gitlab.haskell.org/ghc/ghc/-/issues/25485
+
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13599
+
++ lib.optionals (lib.versionOlder version "9.13" && stdenv.hostPlatform.is32bit) [
+
(fetchpatch {
+
name = "ghc-rts-adjustor-fix-i386-stack-overrun.patch";
+
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/39bb6e583d64738db51441a556d499aa93a4fc4a.patch";
+
sha256 = "0w5fx413z924bi2irsy1l4xapxxhrq158b5gn6jzrbsmhvmpirs0";
+
})
];
stdenv = stdenvNoCC;
+9
pkgs/development/haskell-modules/configuration-common.nix
···
# Overwrite the build cores
raaz = disableParallelBuilding super.raaz;
+
# Test suite uses SHA as a point of comparison which doesn't
+
# succeeds its own test suite on 32bit:
+
# https://github.com/GaloisInc/SHA/issues/16
+
cryptohash-sha256 =
+
if pkgs.stdenv.hostPlatform.is32bit then
+
dontCheck super.cryptohash-sha256
+
else
+
super.cryptohash-sha256;
+
# https://github.com/andreymulik/sdp/issues/3
sdp = disableLibraryProfiling super.sdp;
sdp-binary = disableLibraryProfiling super.sdp-binary;