Skip to content

Commit

Permalink
j: fix build on darwin
Browse files Browse the repository at this point in the history
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 NixOS#39687.

ZHF: NixOS#97479
  • Loading branch information
Luflosi committed Sep 9, 2020
1 parent 959c0bf commit e29932e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkgs/development/interpreters/j/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e29932e

Please sign in to comment.