mingw: Disalbe FORTIFY_SOURCE by default.

In newer versions of mingw, programs compiled with FORTIFY_SOURCE need
to link to libssp or they will have link-time errors.

gmp has been broken since @pstn updated mingw-64 in c60a0b0447
launchpad/nixpkgs/master
Shea Levy 3 years ago
parent 3e80403848
commit 9ecfbe0c5b
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27
  1. 2
      pkgs/build-support/cc-wrapper/default.nix

@ -472,7 +472,7 @@ stdenv.mkDerivation {
+ optionalString hostPlatform.isCygwin ''
hardening_unsupported_flags+=" pic"
'' + optionalString targetPlatform.isMinGW ''
hardening_unsupported_flags+=" stackprotector"
hardening_unsupported_flags+=" stackprotector fortify"
'' + optionalString targetPlatform.isAvr ''
hardening_unsupported_flags+=" stackprotector pic"
'' + optionalString (targetPlatform.libc == "newlib") ''

Loading…
Cancel
Save