diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-04-01 12:58:32 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-04-01 12:58:32 +0200 |
commit | 67ca82e6ddc9f1c87fa8c033729a1f53b7c2b3ba (patch) | |
tree | ffc5b49c9b6a40b1012f6a911eaec6399db7b5ca /gnu/packages/patches | |
parent | 3e902bbb56e34669bc3de8a3768104aa118a0881 (diff) | |
download | guix-67ca82e6ddc9f1c87fa8c033729a1f53b7c2b3ba.tar.gz |
gnu: Python: Fix test failure on ARMv7.
* gnu/packages/patches/python-3-arm-alignment.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python.scm (python-3.8)[source](patches): Add it when the current system is ARM.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/python-3-arm-alignment.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-3-arm-alignment.patch b/gnu/packages/patches/python-3-arm-alignment.patch new file mode 100644 index 0000000000..065c1a7bb2 --- /dev/null +++ b/gnu/packages/patches/python-3-arm-alignment.patch @@ -0,0 +1,21 @@ +Ensure memory accesses in the sha3 module are aligned on ARM as it causes +problems when running 32-bit code on a 64-bit kernel. + +Patch taken from upstream bug report: +https://bugs.python.org/issue36515 + +--- a/Modules/_sha3/sha3module.c ++++ b/Modules/_sha3/sha3module.c +@@ -64,6 +64,12 @@ + #define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN + #endif + ++/* Bus error on 32-bit ARM due to un-aligned memory accesses; 64-bit ARM ++ * doesn't complain but un-aligned memory accesses are sub-optimal */ ++#if defined(__arm__) || defined(__aarch64__) ++#define NO_MISALIGNED_ACCESSES ++#endif ++ + /* mangle names */ + #define KeccakF1600_FastLoop_Absorb _PySHA3_KeccakF1600_FastLoop_Absorb + #define Keccak_HashFinal _PySHA3_Keccak_HashFinal |