From b3c613b9aaa32a6315f5a10fcf56f5b58e0cd405 Mon Sep 17 00:00:00 2001 From: Ruud van Asseldonk Date: Sun, 11 Aug 2019 20:34:57 +0200 Subject: libressl: fix noexecstack on Darwin The flags to disable executable stacks are different for Clang and GCC, and Clang is used on Darwin. --- pkgs/development/libraries/libressl/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkgs/development/libraries/libressl') 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; -- cgit 1.4.1