diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 2a1a8699485c..16a9a0c7b228 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -335,6 +335,11 @@ stdenv.mkDerivation { echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/libc-ldflags '' + # lld's MinGW driver (e.g. `ld.lld -m i386pep`) does not support the `-z` flag. + + optionalString (targetPlatform.isWindows && isLld) '' + hardening_unsupported_flags+=" relro bindnow" + '' + ## ## GNU specific extra strip flags ##