+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.
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:
-# 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,
]])
],
[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*)
-# 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,
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.