Skip to content

Commit

Permalink
haskell.compiler.ghc865Binary: Disable "pie" hardening. See NixOS#129247
Browse files Browse the repository at this point in the history


While this does not fix `ghc865Binary` with musl, it at least prevents
that the other, newer errors are shadowed (see NixOS#129247).
  • Loading branch information
nh2 committed Jul 4, 2021
1 parent 9d8a20d commit 62d5cb4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkgs/development/compilers/ghc/8.6.5-binary.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 62d5cb4

Please sign in to comment.