Open risicle opened 3 years ago
I see that recent versions of minisat guard this setting the way you've suggested:
https://github.com/niklasso/minisat/blob/master/minisat/utils/System.cc#L100
#if defined(__linux__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) && defined(_FPU_GETCW)
I should be able to update to use the same checks
Hi,
Main.cc
tries to disable the x87 extended precision mode @ https://github.com/sambayless/monosat/blob/55af2fbf15b628eddfd74675d469689613c2a9dc/src/monosat/Main.cc#L550But this is platform-specific and compilation fails on aarch64 linux:
Full build log: https://hydra.nixos.org/log/gdvq3inxzcyinf032y7vwrdm1lncnw4z-monosat-1.8.0.drv
I've worked around it by patching it out, but it would be better to detect this somehow. Platforms like aarch64 do seem to have an
fpu_control.h
, possibly for backward compatibility, but they don't seem to have_FPU_EXTENDED
or_FPU_DOUBLE
defined. So possibly you could actually check for those being defined to enable/disable this block.Although documentation around this suggests that the C99 standard
fenv.h
should be used these days in preference to use offpu_control.h
at all, so.. :shrug: