[PATCH] newlib: switch to autoconf long double wider macro
Mike Frysinger
vapier@gentoo.org
Fri Jan 21 12:39:11 GMT 2022
On 21 Jan 2022 12:27, Corinna Vinschen wrote:
> On Jan 21 00:04, Mike Frysinger wrote:
> > Now that we require a recent version of autoconf, we can rely on this
> > macro existing. It has inverted semantics from the existing test (it
> > looks for "is wider" instead of "is equal"), so we have to invert the
> > check when creating our _LDBL_EQ_DBL.
> > ---
> > newlib/configure | 72 +++++++++++++++++++++++++++++----------------
> > newlib/configure.ac | 22 ++------------
> > newlib/newlib.hin | 4 +++
> > 3 files changed, 53 insertions(+), 45 deletions(-)
>
> Looks right to me, please push.
for posterity, i'll note that autoconf uses a different (more comprehensive)
testing method that ultimately arrives at a diff answer than what newlib is
atm. for aarch64, _LDBL_EQ_DBL is now defined when it wasn't before.
newlib today is doing:
#if DBL_MANT_DIG == LDBL_MANT_DIG && \
LDBL_MIN_EXP == DBL_MIN_EXP && \
LDBL_MAX_EXP == DBL_MAX_EXP
#define _LDBL_EQ_DBL
#else
#error "LDBL != DBL"
#endif
while autoconf is doing:
(0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
+ (DBL_MANT_DIG < LDBL_MANT_DIG)
- (LDBL_MAX_EXP < DBL_MAX_EXP)
- (LDBL_MANT_DIG < DBL_MANT_DIG)))
&& (int) LDBL_EPSILON == 0
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20220121/aa547b83/attachment.sig>
More information about the Newlib
mailing list