From fbefec0d3e1fde1ad36b661d44935959532b1c1c Mon Sep 17 00:00:00 2001 From: Luflosi Date: Wed, 9 Sep 2020 12:20:48 +0200 Subject: [PATCH] j: fix build on darwin On darwin the compilation would fail with the following warning: ``` clang-7: error: argument unused during compilation: '-fno-strict-overflow' [-Werror,-Wunused-command-line-argument] ``` This error happens because the `-fno-strict-overflow` is passed to the compiler. To fix this, disable the `strictoverflow` hardening feature. Also see #39687. ZHF: #97479 --- pkgs/development/interpreters/j/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/interpreters/j/default.nix b/pkgs/development/interpreters/j/default.nix index c612135cd18..b7f8b63d54a 100644 --- a/pkgs/development/interpreters/j/default.nix +++ b/pkgs/development/interpreters/j/default.nix @@ -27,6 +27,9 @@ stdenv.mkDerivation rec { doCheck = true; + # Causes build failure due to warning + hardeningDisable = stdenv.lib.optional stdenv.cc.isClang "strictoverflow"; + buildPhase = '' export SOURCE_DIR=$(pwd) export HOME=$TMPDIR