diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index 50cf8526c36..1c7c0715e75 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -49,6 +49,11 @@ stdenv.mkDerivation rec { "--enable-pax_emutramp" ]; + preCheck = '' + # The tests use -O0 which is not compatible with -D_FORTIFY_SOURCE. + NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify/} + ''; + inherit doCheck; dontStrip = hostPlatform != buildPlatform; # Don't run the native `strip' when cross-compiling.