From f3c6d7cc3817dffd45efb56e8cf24dff45550422 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 8 Nov 2024 11:35:24 +0100 Subject: [PATCH 1/2] gh-89640: Restore configure error message on failure to detect float word order Before #126387, if we didn't detect float word order we'd raise the following configure error: ``` Unknown float word ordering. You need to manually preset ax_cv_c_float_words_bigendian=no (or yes) according to your system. ``` This puts it back (except for host_cpu arm or wasm). --- configure | 11 +++++++++-- configure.ac | 10 +++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 71ffe9ca1c841e..ebcdec32db3f50 100755 --- a/configure +++ b/configure @@ -24219,8 +24219,15 @@ printf "%s\n" "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h printf "%s\n" "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h ;; #( *) : - ;; -esac ;; + as_fn_error $? " + +Unknown float word ordering. You need to manually preset +ax_cv_c_float_words_bigendian=no (or yes) according to your system. + + " "$LINENO" 5 + ;; +esac + ;; esac diff --git a/configure.ac b/configure.ac index 36199b36d27ba2..0eba44320bfb8d 100644 --- a/configure.ac +++ b/configure.ac @@ -5920,7 +5920,15 @@ AX_C_FLOAT_WORDS_BIGENDIAN( stored in ARM mixed-endian order (byte order 45670123)])], [wasm*], [AC_DEFINE([DOUBLE_IS_LITTLE_ENDIAN_IEEE754], [1], [Define if C doubles are 64-bit IEEE 754 binary format, - stored with the least significant byte first])])]) + stored with the least significant byte first])], + [AC_MSG_ERROR([ + +Unknown float word ordering. You need to manually preset +ax_cv_c_float_words_bigendian=no (or yes) according to your system. + + ])] + )] +) # The short float repr introduced in Python 3.1 requires the # correctly-rounded string <-> double conversion functions from From 90ab1e3fbbfc737ece172dbf2c476b8ad2c7bfe5 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 8 Nov 2024 12:32:05 +0100 Subject: [PATCH 2/2] Nit: follow the AC_MSG_ERROR convention of keeping the error on one line --- configure | 11 ++--------- configure.ac | 13 +++++-------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/configure b/configure index ebcdec32db3f50..7a9d9627e50dfc 100755 --- a/configure +++ b/configure @@ -24219,15 +24219,8 @@ printf "%s\n" "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h printf "%s\n" "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h ;; #( *) : - as_fn_error $? " - -Unknown float word ordering. You need to manually preset -ax_cv_c_float_words_bigendian=no (or yes) according to your system. - - " "$LINENO" 5 - ;; -esac - ;; + as_fn_error $? "Unknown float word ordering. You need to manually preset ax_cv_c_float_words_bigendian=no (or yes) according to your system." "$LINENO" 5 ;; +esac ;; esac diff --git a/configure.ac b/configure.ac index 0eba44320bfb8d..bc3d2d0e63b77a 100644 --- a/configure.ac +++ b/configure.ac @@ -5921,14 +5921,11 @@ AX_C_FLOAT_WORDS_BIGENDIAN( [wasm*], [AC_DEFINE([DOUBLE_IS_LITTLE_ENDIAN_IEEE754], [1], [Define if C doubles are 64-bit IEEE 754 binary format, stored with the least significant byte first])], - [AC_MSG_ERROR([ - -Unknown float word ordering. You need to manually preset -ax_cv_c_float_words_bigendian=no (or yes) according to your system. - - ])] - )] -) + [AC_MSG_ERROR([m4_normalize([ + Unknown float word ordering. You need to manually + preset ax_cv_c_float_words_bigendian=no (or yes) + according to your system. + ])])])]) # The short float repr introduced in Python 3.1 requires the # correctly-rounded string <-> double conversion functions from