diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix index b548b05339e4..dee1cc3d3085 100644 --- a/pkgs/development/compilers/ghc/8.2.2.nix +++ b/pkgs/development/compilers/ghc/8.2.2.nix @@ -232,7 +232,7 @@ stdenv.mkDerivation (rec { checkTarget = "test"; doCheck = false; # fails with "testsuite/tests: No such file or directory. Stop." - hardeningDisable = [ "format" ]; + hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie"; postInstall = '' for bin in "$out"/lib/${name}/bin/*; do diff --git a/pkgs/development/compilers/ghc/8.4.4.nix b/pkgs/development/compilers/ghc/8.4.4.nix index 0588d7fba921..32a9095e1238 100644 --- a/pkgs/development/compilers/ghc/8.4.4.nix +++ b/pkgs/development/compilers/ghc/8.4.4.nix @@ -204,7 +204,7 @@ stdenv.mkDerivation (rec { checkTarget = "test"; - hardeningDisable = [ "format" ]; + hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie"; postInstall = '' for bin in "$out"/lib/${name}/bin/*; do diff --git a/pkgs/development/compilers/ghc/8.6.1.nix b/pkgs/development/compilers/ghc/8.6.1.nix index 2363953e35b8..73ddd3eab204 100644 --- a/pkgs/development/compilers/ghc/8.6.1.nix +++ b/pkgs/development/compilers/ghc/8.6.1.nix @@ -189,7 +189,7 @@ stdenv.mkDerivation (rec { checkTarget = "test"; - hardeningDisable = [ "format" ]; + hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie"; postInstall = '' for bin in "$out"/lib/${name}/bin/*; do diff --git a/pkgs/development/compilers/ghc/8.6.2.nix b/pkgs/development/compilers/ghc/8.6.2.nix index 6470f7b02957..f5e8ec6de0d6 100644 --- a/pkgs/development/compilers/ghc/8.6.2.nix +++ b/pkgs/development/compilers/ghc/8.6.2.nix @@ -189,7 +189,7 @@ stdenv.mkDerivation (rec { checkTarget = "test"; - hardeningDisable = [ "format" ]; + hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie"; postInstall = '' for bin in "$out"/lib/${name}/bin/*; do diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 6546959e0a24..f85e68aafe42 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -171,7 +171,7 @@ stdenv.mkDerivation (rec { checkTarget = "test"; - hardeningDisable = [ "format" ]; + hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie"; postInstall = '' for bin in "$out"/lib/${name}/bin/*; do