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
This commit is contained in:
Shea Levy 2021-08-11 05:07:42 -04:00
parent 3e80403848
commit 9ecfbe0c5b
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27

View file

@ -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") ''