summary refs log tree commit diff
path: root/pkgs/development/libraries/libressl
diff options
context:
space:
mode:
authorRuud van Asseldonk <dev@veniogames.com>2019-08-11 20:34:57 +0200
committerRuud van Asseldonk <dev@veniogames.com>2019-08-11 20:34:57 +0200
commitb3c613b9aaa32a6315f5a10fcf56f5b58e0cd405 (patch)
treebd4625e13c032874b0eedbc769b01be45641b512 /pkgs/development/libraries/libressl
parent8b6a9202e7fb543d948efc20ff478d362665b945 (diff)
libressl: fix noexecstack on Darwin
The flags to disable executable stacks are different for Clang and GCC,
and Clang is used on Darwin.
Diffstat (limited to 'pkgs/development/libraries/libressl')
-rw-r--r--pkgs/development/libraries/libressl/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libressl/default.nix b/pkgs/development/libraries/libressl/default.nix
index 34262b89cd131..32b58c736fb29 100644
--- a/pkgs/development/libraries/libressl/default.nix
+++ b/pkgs/development/libraries/libressl/default.nix
@@ -25,7 +25,10 @@ let
 
     # Ensure that the output libraries do not require an executable stack.
     # Without this, libcrypto would be built with the executable stack flag set.
-    NIX_LDFLAGS = ["-z" "noexecstack"];
+    # For Clang, the flag is '--noexecstack', for GCC it is '-z noexecstack'.
+    NIX_LDFLAGS = if stdenv.isDarwin
+      then ["--noexecstack"]
+      else ["-z" "noexecstack"];
 
     enableParallelBuilding = true;