summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorDavid McFarland <corngood@gmail.com>2017-06-20 15:04:24 -0300
committerDavid McFarland <corngood@gmail.com>2017-06-26 09:33:44 -0300
commit63a1a2ac63451fc47a5992f8e04e42843f019ecd (patch)
tree29b8707acc5fbbb2e9eb1274352fada44ee40fa9 /pkgs/build-support
parent4ac1901d54f4301df2f09b85e2f69769ee61dfc1 (diff)
downloadnixlib-63a1a2ac63451fc47a5992f8e04e42843f019ecd.tar
nixlib-63a1a2ac63451fc47a5992f8e04e42843f019ecd.tar.gz
nixlib-63a1a2ac63451fc47a5992f8e04e42843f019ecd.tar.bz2
nixlib-63a1a2ac63451fc47a5992f8e04e42843f019ecd.tar.lz
nixlib-63a1a2ac63451fc47a5992f8e04e42843f019ecd.tar.xz
nixlib-63a1a2ac63451fc47a5992f8e04e42843f019ecd.tar.zst
nixlib-63a1a2ac63451fc47a5992f8e04e42843f019ecd.zip
stdenv: disable -fPIC on cygwin
It's always on, and you get a warning if you specify it
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index 0c624a1454a3..e955313e7bde 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -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