diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 341e2850437c..3939b3efb647 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -451,7 +451,9 @@ stdenv.mkDerivation { hardening_unsupported_flags+=" stackprotector pic" '' + optionalString (targetPlatform.libc == "newlib") '' hardening_unsupported_flags+=" stackprotector fortify pie pic" - '' + optionalString targetPlatform.isNetBSD '' + '' + optionalString (targetPlatform.libc == "musl" && targetPlatform.isi686) '' + hardening_unsupported_flags+=" stackprotector" + '' + optionalString targetPlatform.isNetBSD '' hardening_unsupported_flags+=" stackprotector fortify" '' + optionalString cc.langAda or false '' hardening_unsupported_flags+=" format stackprotector strictoverflow"