haskell.compiler.ghc865Binary: Disable "pie" hardening. See #129247

While this does not fix `ghc865Binary` with musl, it at least prevents
that the other, newer errors are shadowed (see #129247).
This commit is contained in:
Niklas Hambüchen 2021-07-04 21:44:23 +00:00
parent c866b8a13b
commit f154c3adde

View file

@ -152,6 +152,15 @@ stdenv.mkDerivation rec {
done
'';
# In nixpkgs, musl based builds currently enable `pie` hardening by default
# (see `defaultHardeningFlags` in `make-derivation.nix`).
# But GHC cannot currently produce outputs that are ready for `-pie` linking.
# Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
# See:
# * https://github.com/NixOS/nixpkgs/issues/129247
# * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie";
doInstallCheck = true;
installCheckPhase = ''
unset ${libEnvVar}