python3: don't use runtime checks to identify float endianism

Python uses AC_RUN_IFELSE to determine the byte order for floats and doubles,
and falls back onto "I don't know" if it can't run code.  This results in
crippled floating point numbers in Python, and the regression tests fail.

Instead of running code, take a macro from autoconf-archive which compiles C
with a special double in which has an ASCII representation, and then greps the
binary to identify the format.

(From OE-Core rev: 1781b87ae0765c1867da2fa8c56bf988b4e84405)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2018-09-05 11:48:53 +01:00
committed by Richard Purdie
parent ef38b43dbb
commit dbb2d923de
2 changed files with 213 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ SRC_URI += "\
file://pass-missing-libraries-to-Extension-for-mul.patch \
file://Use-correct-CFLAGS-for-extensions-when-cross-compili.patch \
file://0002-Makefile-add-target-to-split-profile-generation.patch \
file://float-endian.patch \
"
SRC_URI[md5sum] = "f3763edf9824d5d3a15f5f646083b6e0"
SRC_URI[sha256sum] = "063d2c3b0402d6191b90731e0f735c64830e7522348aeb7ed382a83165d45009"