Re: [PATCH] newlib: add dummy implementations of fe{get, set}prec for Aarch64 Cygwin
Corinna Vinschen <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On Jul 3 12:42, Radek Barton wrote: > Hello. > > Albeit Aarch64 does not support setting floating point operations precisions at runtime `cygwin1.dll` exports `fegetprec` and `fesetprec` functions leading to undefined references when linking. This patch adds their dummy implementations in a similar way how they are defined in `newlib/libc/machine/shared_x86/sys/fenv.h`, resp. in `/newlib/libm/machine/shared_x86/fenv.c`. > > Alternative fix would be to modify `winsup/cygwin/scripts/mkimport` and `winsup/cygwin/scripts/gendef` scripts so they would exclude those from being exported to the DLL upon specific label in `winsup/cygwin/cygwin.din`, e.g.: > > ``` > fegetprec NOSIGFE NOARM64 > fesetprec NOSIGFE NOARM64 > ``` > > The same options applies to `_fe_nomask_env` which would be for the first option sent as a separate patch as it changes only `winsup` codebase. > > Which one would you prefer? What Richard said, but there's another choice and that might be preferrable: Add a new file to the winsup/cygwin/aarch64 subdir, like, say, feprec.c, and implement those dummy functions there. This keeps the newlib file clean and should work nicely. Thanks, Corinna