python3: fix double format detection
commit7be691623a27087cc89c169e21466a0e66a75eb4
authorJérôme Pouiller <jezz@sysmic.org>
Wed, 9 Nov 2016 09:25:08 +0000 (9 10:25 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 9 Nov 2016 21:03:54 +0000 (9 22:03 +0100)
tree2b508d658c1a0c95ce3c7bd17324549111e4ea5a
parent2a6001f17aba3f405f1aa95b3d95a553761d9b03
python3: fix double format detection

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>
[Thomas: rework condition to not use strip, as suggested by Baruch.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/python3/python3.mk