stdenv: disable -fPIC on cygwin

It's always on, and you get a warning if you specify it
This commit is contained in:
David McFarland 2017-06-20 15:04:24 -03:00
parent 4ac1901d54
commit 63a1a2ac63

View File

@ -359,7 +359,13 @@ stdenv.mkDerivation {
if [[ "$($ldPath/${prefix}ld -z relro 2>&1 || true)" =~ un(recognized|known)\ option ]]; then
hardening_unsupported_flags+=" relro"
fi
''
+ optionalString hostPlatform.isCygwin ''
hardening_unsupported_flags+=" pic"
''
+ ''
substituteAll ${preWrap ./add-flags.sh} $out/nix-support/add-flags.sh
substituteAll ${preWrap ./add-hardening.sh} $out/nix-support/add-hardening.sh
cp -p ${preWrap ./utils.sh} $out/nix-support/utils.sh