From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] python: fix double format detection
Date: Wed, 9 Nov 2016 22:17:13 +0100 [thread overview]
Message-ID: <20161109221713.0cc8eb3b@free-electrons.com> (raw)
In-Reply-To: <20161109092508.4503-1-jezz@sysmic.org>
Hello,
On Wed, 9 Nov 2016 10:25:07 +0100, J?r?me Pouiller wrote:
> Python is not able to detect if compiler double representation is
> compliant with IEE754:
>
> checking whether C doubles are little-endian IEEE 754 binary64... no
> checking whether C doubles are big-endian IEEE 754 binary64... no
> checking whether C doubles are ARM mixed-endian IEEE 754 binary64... no
>
> Accordingly 'legacy' mode isused. It is possible to check this at runtime by
> check if 'sys.float_repr_style' contains 'short' or 'legacy'. Calculus
> correctness is not garanteed with 'legacy'.
>
> Problem is better described here:
>
> http://stackoverflow.com/questions/29920294/what-causes-pythons-float-repr-style-to-use-legacy
> https://bugs.python.org/issue7117
>
> However, all gcc architecture use a representation compliant with IEE754. So,
> we can enable it unconditionnaly.
>
> Signed-off-by: J?r?me Pouiller <jezz@sysmic.org>
> ---
> package/python/python.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
I've applied both patches, after taking into account the comment from
Baruch. Also, I verified that even ARM is not "mixed endian", by
running the test case under Qemu ARM. It seems like "mixed endian" was
only for the old ARM ABI, which we no longer care about.
Thanks for those patches!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
prev parent reply other threads:[~2016-11-09 21:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 9:25 [Buildroot] [PATCH 1/2] python: fix double format detection Jérôme Pouiller
2016-11-09 9:25 ` [Buildroot] [PATCH 2/2] python3: " Jérôme Pouiller
2016-11-09 9:33 ` [Buildroot] [PATCH 1/2] python: " Baruch Siach
2016-11-09 21:17 ` Thomas Petazzoni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161109221713.0cc8eb3b@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox