science/dakota: fix build on non-x86

fpinit.c uses fpsetmask to workaround a bug that is not present since
FreeBSD 4.0.

This issue also affected Firefox and was resolved 9 years ago
https://bugzilla.mozilla.org/show_bug.cgi?id=789436
This commit is contained in:
Piotr Kubaj 2021-10-22 11:42:25 +00:00
parent d36ef855ff
commit ebdeecfbf8

View File

@ -0,0 +1,11 @@
--- packages/external/ampl/fpinit.c.orig 2021-10-21 13:10:57 UTC
+++ packages/external/ampl/fpinit.c
@@ -214,7 +214,7 @@ fpinit_ASL(Void)
/* Currently, FP_PD is the default on FreeBSD, but enabled traps */
/* can cause surprises, so we restore the default IEEE mask. */
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && (defined (__amd64__) || defined(__i386__))
#include "floatingpoint.h"
#define FP_INIT_DONE
void