Commit 2e7a27e6 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

pkgsi686Linux.openexr_3: enforce SSE arithmetics (instead of x87)

On i686 with x87 80-bit FPU precision tests fail as:

F float at 59, 0 not equal: C++ loaded C 0x7f84e300 (nan) vs C++ loaded C++ 7fc4e300 (nan)
    Core Test failed: a.iv == b.iv
               file:/build/source/src/test/OpenEXRCoreTest/compression.cpp
               line:423
           function:static void pixels::compareExact(float, float, int, int, const char*, const char*, const char*)

Force SSE arithmetic to get expected rounding and precision.
parent 0a4206a5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -32,6 +32,10 @@ stdenv.mkDerivation rec {
  nativeBuildInputs = [ cmake ];
  propagatedBuildInputs = [ imath zlib ];

  # Without 'sse' enforcement tests fail on i686 as due to excessive precision as:
  #   error reading back channel B pixel 21,-76 got -nan expected -nan
  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-msse2 -mfpmath=sse";

  doCheck = true;

  meta = with lib; {