aboutsummaryrefslogtreecommitdiff
path: root/math/octave/files/patch-libinterp_corefcn_sysdep.cc
blob: 11e2c73c3375c912bbcb940c2487829fbe77947e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- libinterp/corefcn/sysdep.cc.orig	2024-12-12 11:30:00 UTC
+++ libinterp/corefcn/sysdep.cc
@@ -61,6 +61,10 @@
 #  include <omp.h>
 #endif
 
+#if defined (__FreeBSD__) && defined(__arm__)
+#include <fenv.h>
+#endif
+
 #include "cmd-edit.h"
 #include "file-ops.h"
 #include "lo-mappers.h"
@@ -110,6 +114,9 @@ BSD_init ()
 static void
 BSD_init ()
 {
+#if defined(__FreeBSD__) && defined(__arm__)
+  fedisableexcept(FE_ALL_EXCEPT);
+#else /* !defined(__FreeBSD__) || !defined(__arm__) */
 #  if defined (HAVE_FLOATINGPOINT_H)
   // Disable trapping on common exceptions.
 #    if ! defined (FP_X_DNML)
@@ -117,6 +124,7 @@ BSD_init ()
 #    endif
   fpsetmask (~(FP_X_OFL|FP_X_INV|FP_X_DZ|FP_X_DNML|FP_X_UFL|FP_X_IMP));
 #  endif
+#endif
 }
 
 #endif