]> Savannah Git Hosting - gnulib.git/commitdiff
fenv-exceptions-tracking-c99: Fix test failures on OpenBSD/mips64.
authorBruno Haible <bruno@clisp.org>
Tue, 7 Nov 2023 01:04:47 +0000 (02:04 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 7 Nov 2023 01:04:47 +0000 (02:04 +0100)
* m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On
OpenBSD/mips, set REPLACE_FECLEAREXCEPT to 1.
* doc/posix-functions/feclearexcept.texi: Mention the OpenBSD/mips64
bug.
* m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): No need to set
gl_cv_func_fesetexceptflag_works1 to 'no' on OpenBSD/mips.

ChangeLog
doc/posix-functions/feclearexcept.texi
m4/fenv-exceptions-state.m4
m4/fenv-exceptions-tracking.m4

index 1806fe19decc887433ba2cf495a47ed3931e9a7c..7fd78a2bd87e7143b551dd5bce782a033041bc15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2023-11-06  Bruno Haible  <bruno@clisp.org>
+
+       fenv-exceptions-tracking-c99: Fix test failures on OpenBSD/mips64.
+       * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On
+       OpenBSD/mips, set REPLACE_FECLEAREXCEPT to 1.
+       * doc/posix-functions/feclearexcept.texi: Mention the OpenBSD/mips64
+       bug.
+       * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): No need to set
+       gl_cv_func_fesetexceptflag_works1 to 'no' on OpenBSD/mips.
+
 2023-11-06  Bruno Haible  <bruno@clisp.org>
 
        nan: Defeat clang's incorrect -O2 optimization on mips64.
index 4df9178c3063e19259dde1c7ff3828bbf4b8fea0..a553371abe115ead0b56a29b98e75253bf0a1596 100644 (file)
@@ -13,7 +13,7 @@ This function is missing on some platforms:
 FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, IRIX 6.5, Solaris 9, Cygwin 1.7.7, MSVC 9, Android 4.4.
 @item
 This function is broken on some platforms:
-Minix 3.3/i386.
+OpenBSD 7.4/mips64, Minix 3.3/i386.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 3cd09edd11bf8482bc156cc8d51916677bcaa5e5..239adedba02ef2b52ce6d72ea151dfafcae283a6 100644 (file)
@@ -1,4 +1,4 @@
-# fenv-exceptions-state.m4 serial 1
+# fenv-exceptions-state.m4 serial 2
 dnl Copyright (C) 2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -89,7 +89,17 @@ AC_DEFUN([gl_FENV_EXCEPTIONS_STATE],
                 ]])
              ],
              [gl_cv_func_fesetexceptflag_works1=yes],
-             [gl_cv_func_fesetexceptflag_works1=no],
+             [dnl On OpenBSD 7.4/mips64 this test fails because feclearexcept
+              dnl is buggy, not because of fesetexceptflag.
+              case "$host" in
+                mips*-*-openbsd*)
+                  gl_cv_func_fesetexceptflag_works1="guessing yes"
+                  ;;
+                *)
+                  gl_cv_func_fesetexceptflag_works1=no
+                  ;;
+              esac
+             ],
              [case "$host_os" in
                 # Guess yes or no on glibc systems, depending on CPU.
                 *-gnu*)
index d5c384c9cbc3b55598d1709bce87f6542ba7d504..4861cdc0e1cf49e28472d0056f89a52851f3e88f 100644 (file)
@@ -1,4 +1,4 @@
-# fenv-exceptions-tracking.m4 serial 3
+# fenv-exceptions-tracking.m4 serial 4
 dnl Copyright (C) 2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -118,6 +118,11 @@ AC_DEFUN_ONCE([gl_FENV_EXCEPTIONS_TRACKING],
         dnl 'fnstenv' instruction without subsequent 'fldenv' or 'fldcw').
         REPLACE_FETESTEXCEPT=1
         ;;
+      mips*-*-openbsd*)
+        dnl On OpenBSD 7.4/mips64, the feclearexcept function does not work:
+        dnl it misses to clear the "cause bits".
+        REPLACE_FECLEAREXCEPT=1
+        ;;
       *86*-*-minix*)
         dnl On Minix 3.3, both the feclearexcept and fetestexcept functions
         dnl need to be overridden; otherwise we get unit test failures.