aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadek Bartoň <radek.barton@microsoft.com>2025-07-03 12:00:22 +0200
committerRichard Earnshaw <rearnsha@arm.com>2025-07-04 11:10:04 +0100
commit94524fa9c59101ed4485468665d4063c66456fc4 (patch)
tree702f33b2134f2157a55c950c62a6205828915d52
parentc85f42a4f3ee65c575e35af7b432c1a0ac2e0f8d (diff)
downloadnewlib-94524fa9c59101ed4485468665d4063c66456fc4.zip
newlib-94524fa9c59101ed4485468665d4063c66456fc4.tar.gz
newlib-94524fa9c59101ed4485468665d4063c66456fc4.tar.bz2
aarch64: Export fe{enable,disable,get}except on Cygwin
For aarch64 on ELF targets, the library does not export fe{enable,disable,get}except as symbols from the library, relying on static inline functions to provide suitable definitions if required. But for Cygwin we need to create real definitions to satisfy the DLL export script. So arrange for real definitions of these functions when building on Cygwin. Signed-off-by: Radek Bartoň <radek.barton@microsoft.com>
-rw-r--r--newlib/libc/machine/aarch64/sys/fenv.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/newlib/libc/machine/aarch64/sys/fenv.h b/newlib/libc/machine/aarch64/sys/fenv.h
index 6b08792..1f97791 100644
--- a/newlib/libc/machine/aarch64/sys/fenv.h
+++ b/newlib/libc/machine/aarch64/sys/fenv.h
@@ -80,9 +80,17 @@ extern const fenv_t *_fe_dfl_env;
#if __BSD_VISIBLE
-/* We currently provide no external definitions of the functions below. */
+/* We currently provide no external definitions of the functions below
+ except of for Cygwin where those functions are exported by
+ winsup/cygwin/cygwin.din. */
+
+#ifdef __CYGWIN__
+#define __cygwin_fenv_static __fenv_static
+#else
+#define __cygwin_fenv_static static
+#endif
-static inline int
+__cygwin_fenv_static inline int
feenableexcept(int __mask)
{
fenv_t __old_r, __new_r;
@@ -93,7 +101,7 @@ feenableexcept(int __mask)
return ((__old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT);
}
-static inline int
+__cygwin_fenv_static inline int
fedisableexcept(int __mask)
{
fenv_t __old_r, __new_r;
@@ -104,7 +112,7 @@ fedisableexcept(int __mask)
return ((__old_r >> _FPUSW_SHIFT) & FE_ALL_EXCEPT);
}
-static inline int
+__cygwin_fenv_static inline int
fegetexcept(void)
{
fenv_t __r;