diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index d74d0490b409..623457bc7b9a 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -474,7 +474,7 @@ stdenv.mkDerivation { hardening_unsupported_flags+=" stackprotector fortify" '' + optionalString targetPlatform.isAvr '' hardening_unsupported_flags+=" stackprotector pic" - '' + optionalString (targetPlatform.libc == "newlib") '' + '' + optionalString (targetPlatform.libc == "newlib" || targetPlatform.libc == "newlib-nano") '' hardening_unsupported_flags+=" stackprotector fortify pie pic" '' + optionalString (targetPlatform.libc == "musl" && targetPlatform.isx86_32) '' hardening_unsupported_flags+=" stackprotector"