]> Savannah Git Hosting - gnulib.git/commitdiff
isnanl, isfinite, snan: Improve cross-compilation guess.
authorBruno Haible <bruno@clisp.org>
Mon, 14 Apr 2025 10:14:38 +0000 (12:14 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 14 Apr 2025 10:14:38 +0000 (12:14 +0200)
* m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Don't assume that
arm is always little-endian.

ChangeLog
m4/exponentl.m4

index bdbf12b53585c4fde2c18856ef7b4c887a5a4b60..e64c3e985eb83bcce891a478fae92d04018144fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2025-04-14  Bruno Haible  <bruno@clisp.org>
 
+       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
index a52e996b5e0192127a90a8db55ef93d666a9c2f1..f4d0923e73b26bc30b7f48b5c17adb6db6be319b 100644 (file)
@@ -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([[