From: Bruno Haible Date: Mon, 14 Apr 2025 10:14:38 +0000 (+0200) Subject: isnanl, isfinite, snan: Improve cross-compilation guess. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=5582e2f8325884b5a16ebf53a17c94c360ddf740;p=gnulib.git isnanl, isfinite, snan: Improve cross-compilation guess. * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Don't assume that arm is always little-endian. --- diff --git a/ChangeLog b/ChangeLog index bdbf12b535..e64c3e985e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2025-04-14 Bruno Haible + isnanl, isfinite, snan: Improve cross-compilation guess. + * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Don't assume that + arm is always little-endian. + isnanl, isfinite, snan: Improve cross-compilation guess. * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): When cross-compiling, invoke gl_LONG_DOUBLE_VS_DOUBLE and diff --git a/m4/exponentl.m4 b/m4/exponentl.m4 index a52e996b5e..f4d0923e73 100644 --- a/m4/exponentl.m4 +++ b/m4/exponentl.m4 @@ -131,7 +131,7 @@ changequote([,])dnl # big-endian, 80-bits padded to 96 bits, non-IEEE exponent gl_cv_cc_long_double_expbit0='word 0 bit 16' ;; - alpha* | arm* | aarch64 | loongarch64 | riscv32 | riscv64 | sh4) + alpha* | aarch64 | loongarch64 | riscv32 | riscv64 | sh4) # little-endian IEEE 754 quadruple-precision gl_cv_cc_long_double_expbit0='word 3 bit 16' ;; @@ -139,6 +139,23 @@ changequote([,])dnl # big-endian IEEE 754 quadruple-precision gl_cv_cc_long_double_expbit0='word 0 bit 16' ;; + arm*) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #if defined _ARMEL + int little; + #else + #error big + #endif + ]], [[]]) + ], + [# little-endian IEEE 754 quadruple-precision + gl_cv_cc_long_double_expbit0='word 3 bit 16' + ], + [# big-endian IEEE 754 quadruple-precision + gl_cv_cc_long_double_expbit0='word 0 bit 16' + ]) + ;; mips*) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[