[PATCH/QUESTION] newlib: fenv: AArch64 Cygwin linking fixes

Radek Barton radek.barton@microsoft.com
Fri Jun 27 18:53:28 GMT 2025


Hello.

Thank you for your insights.

The
```
diff --git a/newlib/libm/machine/aarch64/fenv.c b/newlib/libm/machine/aarch64/fenv.c
index 3ffe23441..fb6a67dcc 100644
--- a/newlib/libm/machine/aarch64/fenv.c
+++ b/newlib/libm/machine/aarch64/fenv.c
@@ -27,6 +27,9 @@
  * $FreeBSD$
  */
 
+/* Enable all fenv-related functions.  */
+#define __BSD_VISIBLE
+
 #define        __fenv_static
 #include <fenv.h>
 #include <machine/fenv-fp.h>
```
patch has no effect because `__BSD_VISIBLE` is already set to `1` in `newlib/libc/include/sys/features.h`. I don't know what is the semantics of this macro but I added it to my patch just to make the code consistent with `newlib/libc/machine/mips/machine/fenv-fp.h` because it seems that this file is solving the same problem.

I've checked that for every object of Cygwin build, only the `newlib/libc/machine/aarch64/sys/fenv.h` gets included and the `newlib/libc/include/sys/fenv.h` header is never included.

I am attaching the pre-processed `fenv.c`.

Radek
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fenv-preprocessed.c
URL: <https://sourceware.org/pipermail/newlib/attachments/20250627/e8715367/attachment-0001.c>


More information about the Newlib mailing list