diff options
Diffstat (limited to 'pkgs/development/compilers/ghc/8.6.5-binary.nix')
-rw-r--r-- | pkgs/development/compilers/ghc/8.6.5-binary.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/compilers/ghc/8.6.5-binary.nix b/pkgs/development/compilers/ghc/8.6.5-binary.nix index 8a0994b8b6a..c3d6ab1beca 100644 --- a/pkgs/development/compilers/ghc/8.6.5-binary.nix +++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix @@ -121,8 +121,9 @@ stdenv.mkDerivation rec { configurePlatforms = [ ]; configureFlags = [ - "--with-gmp-libraries=${lib.getLib gmp}/lib" "--with-gmp-includes=${lib.getDev gmp}/include" + # Note `--with-gmp-libraries` does nothing for GHC bindists: + # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124 ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override"; @@ -152,6 +153,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} |