about summary refs log tree commit diff
path: root/pkgs/servers/http/nginx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/http/nginx/default.nix')
-rw-r--r--pkgs/servers/http/nginx/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/servers/http/nginx/default.nix b/pkgs/servers/http/nginx/default.nix
index cc95c60c7c24..178c0fcbd9e4 100644
--- a/pkgs/servers/http/nginx/default.nix
+++ b/pkgs/servers/http/nginx/default.nix
@@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
   NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized";
 
   preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules)
-    + optionalString hardening ''
+    + optionalString (hardening && (stdenv.cc.cc.isGNU or false)) ''
       configureFlagsArray=(
         --with-cc-opt="-fPIE -fstack-protector-all --param ssp-buffer-size=4 -O2 -D_FORTIFY_SOURCE=2"
         --with-ld-opt="-pie -Wl,-z,relro,-z,now"