nginx, nginxUnstable: hardening: only use when the compiler is gcc

+2 -2
+1 -1
pkgs/servers/http/nginx/default.nix
··· 55 55 NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized"; 56 56 57 57 preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules) 58 - + optionalString hardening '' 58 + + optionalString (hardening && (stdenv.cc.cc.isGNU or false)) '' 59 59 configureFlagsArray=( 60 60 --with-cc-opt="-fPIE -fstack-protector-all --param ssp-buffer-size=4 -O2 -D_FORTIFY_SOURCE=2" 61 61 --with-ld-opt="-pie -Wl,-z,relro,-z,now"
+1 -1
pkgs/servers/http/nginx/unstable.nix
··· 53 53 NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations"; 54 54 55 55 preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules) 56 - + optionalString hardening '' 56 + + optionalString (hardening && (stdenv.cc.cc.isGNU or false)) '' 57 57 configureFlagsArray=( 58 58 --with-cc-opt="-fPIE -fstack-protector-all --param ssp-buffer-size=4 -O2 -D_FORTIFY_SOURCE=2" 59 59 --with-ld-opt="-pie -Wl,-z,relro,-z,now"