[PATCH v2] newlib: skip build of AArch64 80bit and 128bit long double functions when sizeof(double) == sizeof(long double)

Corinna Vinschen vinschen@redhat.com
Mon Jul 21 11:39:40 GMT 2025


On Jul 21 13:32, Corinna Vinschen wrote:
> On Jul 21 13:28, Corinna Vinschen wrote:
> > On Jul 21 07:19, Radek Barton via Newlib wrote:
> > > Hello.
> > > 
> > > Is there any further feedback on the second version of the patch? As
> > > far as I understand it, it does not make sense to build
> > > implementations in `aarch64/ld` folder at all if `_LDBL_EQ_DBL` is
> > > defined. Is that assumption correct?
> > 
> > IIUC, sizeof(double) == sizeof(long double), right?
> > 
> > If so, _LDBL_EQ_DBL should be set and the long double functions
> > are automatically mapped to the double functions.
> 
> So, if I'm not completely off-track, you should just define _LDBL_EQ_DBL
> for the aarch64-pc-cygwin target.

Wait... shouldn't that have happened automatically?

configure.ac contains the following statement:

    AC_CACHE_CHECK(whether long double equals double,
		   newlib_cv_ldbl_eq_dbl, [dnl
    cat > conftest.c <<EOF
    #include <float.h>
    #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
    EOF

So the configury should have already fixed that, right?


Corinna



More information about the Newlib mailing list