I'm abandoning this patch. It was fixed in FreeBSD instead to have feenableexcept() in libm in https://cgit.freebsd.org/src/commit/?id=448c505c33cc334193590f3844406d6a74f26e2a Thanks for your insight! On 22-05-13 10:59:59, Kewen.Lin wrote: > on 2022/5/13 04:16, Segher Boessenkool wrote: > > Hi Piotr, > > > > On Tue, May 03, 2022 at 12:21:12PM +0200, pkubaj@FreeBSD.org wrote: > >> FreeBSD/powerpc* has feenableexcept() defined in fenv.h header. > > > > Declared, not defined. These are required to be real functions (on all > > platforms that have these functions), not macros or inlines or whatever. > > > > Piotr's reply "FreeBSD doesn't have this function in libm, it's > implemented in /usr/include/fenv.h." from [1] made me feel like > it's a definition instead of declaration. So I thought the check > should use AC_LINK_IFELSE instead, since one fenv.h which doesn't > have the definition can still pass the proposed AC_COMPILE_IFELSE > check. > > I just did a further search, the powerpc fenv.h [2] does include > the definition of feenableexcept. By comparison, the x86 fenv.h [3] > doesn't. But I'm not sure if it's the same as what Piotr's > environments have. Hope it's similar. :-) > > [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593193.html > [2] https://github.com/freebsd/freebsd-src/blob/main/lib/msun/powerpc/fenv.h > [3] https://github.com/freebsd/freebsd-src/blob/main/lib/msun/x86/fenv.h > > BR, > Kewen >