You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2018-09-19.06:25:56.225>created_at=<Date2018-09-05.10:57:22.362>labels= ['build', '3.8']
title="Don't use AC_RUN_IFELSE to determine float endian"updated_at=<Date2018-09-19.06:49:08.815>user='https://github.com/rossburton'
Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of floats and doubles. This hurts when cross-compiling because a default is set, resulting in Python silently falling back to sub-optimal codepaths.
A partial improvement would be to not set a fallback, to force the user to set the right byte order explicitly.
However this test can be done without running anything. autoconf-archive has a macro that uses a carefully constructed double that encodes to an ASCII string in the binary, which is then examined using grep. Evil genius.
Attached is a POC using this. Currently the autoconf-archive macro only handles big and little endian not the ARM OABI mixed-endian format, so configure.ac assumes if the byte order is unknown then it's the crazy mixed-endian.
To be honest OABI is so old now, I don't believe anyone actually uses it anymore: everyone still on ARMv4 should have moved to EABI many years ago, and the mixed-endian support could be removed from Py3 in the future.
New changeset 2a9c380 by Benjamin Peterson (Ross Burton) in branch 'master':
closes bpo-34585: Don't do runtime test to get float byte order. (GH-9085) 2a9c380
Unfortunately ax_c_float_words_bigendian.m4 evil magical trickery does not work if certain compiler flags are used. Using gcc and -flto seems to be enough to break it.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: