libressl: fix noexecstack on Darwin

The flags to disable executable stacks are different for Clang and GCC,
and Clang is used on Darwin.
This commit is contained in:
Ruud van Asseldonk 2019-08-11 20:34:57 +02:00
parent 8b6a9202e7
commit b3c613b9aa

@ -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;