| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Thanks for the help @erlend-aasland! |
Sorry, something went wrong.
|
Any compliant implementation of webassembly is little endian: I think that if someone forked the spec and invented "big endian wasm" but still called the target wasm32-???-??? that would be met with a lot of hostility by the webassembly folks. Only wasm32-emscripten should ever hit this branch though, so it might be a tiny bit better to match [*emscripten*] and then we'll find out if AX_C_FLOAT_WORDS_BIGENDIAN ever started failing to detect wasi correctly, however unlikely that might be. If for some reason we don't want to hard code Emscripten, there is an option here: |
Sorry, something went wrong.
…ython#126387) Properly detect float word ordering on Linux (pythongh-125571) autoconf-archive patch by Dan Amelang. (cherry picked from commit 26d6277) Hardcode WASM float word ordering to little endian (pythongh-126387) (cherry picked from commit 532fc08)
|
One effect that this change had is that it will no longer raise the error: Unknown float word ordering. You need to manually preset ax_cv_c_float_words_bigendian=no (or yes) according to your system. if the float word order does not match arm or wasm and AX_C_FLOAT_WORDS_BIGENDIAN returns undefined. I think we should consider doing this: --- 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 |
Sorry, something went wrong.
…float word order Before python#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).
…float word order Before python#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).
|
Good catch, @hoodmane! Yes, indeed we should. Would you like to propose a PR? I noticed you already did :) |
Sorry, something went wrong.
…word order (#126569) 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 ARM or WASM, which as hardcoded).
The original patch: autoconf-archive/autoconf-archive#279 broke endianness detection on Emscripten. This was fixed in this followup: autoconf-archive/autoconf-archive#316 We also have worked around the problem by adjusting `configure.ac` in the Python repo to handle this case: python/cpython#126387 But it's useful for us to use the upstream autoconf-archive detection so that we can be completely sure that the fix works in practice.
…float word order (python#126569) Before python#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 ARM or WASM, which as hardcoded).
…float word order (python#126569) Before python#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 ARM or WASM, which as hardcoded).
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.