diff --git a/pkgs/development/compilers/ghc/8.10.7-binary.nix b/pkgs/development/compilers/ghc/8.10.7-binary.nix index 5d680574ad23..c4a20e7af4bc 100644 --- a/pkgs/development/compilers/ghc/8.10.7-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.7-binary.nix @@ -471,14 +471,12 @@ stdenv.mkDerivation rec { # They're in $out/share/{doc,man}. ''; - # 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. + # 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"; + hardeningDisable = [ "pie" ]; doInstallCheck = true; installCheckPhase = '' diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index f6a4337d8622..c0d9e2b371f7 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -557,16 +557,15 @@ stdenv.mkDerivation ( checkTarget = "test"; - hardeningDisable = - [ "format" ] - # 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 - ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + # 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 = [ + "format" + "pie" + ]; # big-parallel allows us to build with more than 2 cores on # Hydra which already warrants a significant speedup diff --git a/pkgs/development/compilers/ghc/8.6.5-binary.nix b/pkgs/development/compilers/ghc/8.6.5-binary.nix index 9e205aa0796d..dc425f885805 100644 --- a/pkgs/development/compilers/ghc/8.6.5-binary.nix +++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix @@ -211,14 +211,12 @@ 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. + # 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"; + hardeningDisable = [ "pie" ]; doInstallCheck = true; installCheckPhase = '' diff --git a/pkgs/development/compilers/ghc/9.2.4-binary.nix b/pkgs/development/compilers/ghc/9.2.4-binary.nix index 73873ec823a0..c5a704e8ad86 100644 --- a/pkgs/development/compilers/ghc/9.2.4-binary.nix +++ b/pkgs/development/compilers/ghc/9.2.4-binary.nix @@ -437,14 +437,12 @@ stdenv.mkDerivation rec { "$out/bin/ghc-pkg" --package-db="$package_db" recache ''; - # 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. + # 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"; + hardeningDisable = [ "pie" ]; doInstallCheck = true; installCheckPhase = '' diff --git a/pkgs/development/compilers/ghc/9.6.3-binary.nix b/pkgs/development/compilers/ghc/9.6.3-binary.nix index 96bf217884b6..ef4828814854 100644 --- a/pkgs/development/compilers/ghc/9.6.3-binary.nix +++ b/pkgs/development/compilers/ghc/9.6.3-binary.nix @@ -416,14 +416,12 @@ stdenv.mkDerivation rec { "$out/bin/ghc-pkg" --package-db="$package_db" recache ''; - # 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. + # 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"; + hardeningDisable = [ "pie" ]; doInstallCheck = true; installCheckPhase = '' diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 3ea73b14653a..4b2f4337b0d1 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -620,16 +620,12 @@ stdenv.mkDerivation ({ checkTarget = "test"; - hardeningDisable = - [ "format" ] - # 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 - ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + # 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 = [ "format" "pie" ]; # big-parallel allows us to build with more than 2 cores on # Hydra which already warrants a significant speedup diff --git a/pkgs/development/compilers/ghc/common-make-native-bignum.nix b/pkgs/development/compilers/ghc/common-make-native-bignum.nix index d4cb0f706572..29d60dc24455 100644 --- a/pkgs/development/compilers/ghc/common-make-native-bignum.nix +++ b/pkgs/development/compilers/ghc/common-make-native-bignum.nix @@ -569,16 +569,15 @@ stdenv.mkDerivation ( checkTarget = "test"; - hardeningDisable = - [ "format" ] - # 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 - ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + # 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 = [ + "format" + "pie" + ]; # big-parallel allows us to build with more than 2 cores on # Hydra which already warrants a significant speedup