Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up[RFC] bpo-34585: Don't do runtime test to get float byte order #9085
Conversation
This comment has been minimized.
This comment has been minimized.
the-knights-who-say-ni
commented
Sep 6, 2018
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
This comment has been minimized.
This comment has been minimized.
That's a great idea and it should help Android builds, too! A minor issue is - I remember in CPython, changes to ./configure should be added to the commit if configure.ac is modified. |
This comment has been minimized.
This comment has been minimized.
This seems fine, but we should get a CLA. |
This comment has been minimized.
This comment has been minimized.
CLA sorted. |
2a9c380
into
python:master
This comment has been minimized.
This comment has been minimized.
Thanks for the PR. I agree we should probably look into not pretending to support ARM4. |
Support for cross-builds is added in python/cpython#9085
…honGH-9085) Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of doubles, but this silently fails under cross compilation and Python doesn't do floats properly. Instead, steal a macro from autoconf-archive which compiles code using magic doubles (which encode to ASCII) and grep for the representation in the binary. RFC because this doesn't yet handle the weird ancient ARMv4 OABI 'mixed-endian' encoding properly. This encoding is ancient and I don't believe the union of "Python 3.8 users" and "OABI users" has anything in. Should the support for this just be dropped too? Alternatively, someone will need to find an OABI toolchain to verify the encoding of the magic double.
rossburton commentedSep 6, 2018
•
edited by bedevere-bot
Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of doubles, but this silently fails under cross compilation and Python doesn't do floats properly.
Instead, steal a macro from autoconf-archive which compiles code using magic doubles (which encode to ASCII) and grep for the representation in the binary.
RFC because this doesn't yet handle the weird ancient ARMv4 OABI 'mixed-endian' encoding properly. This encoding is ancient and I don't believe the union of "Python 3.8 users" and "OABI users" has anything in. Should the support for this just be dropped too? Alternatively, someone will need to find an OABI toolchain to verify the encoding of the magic double.
https://bugs.python.org/issue34585