aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-04-07 16:32:16 -0400
committerMark H Weaver <mhw@netris.org>2014-04-07 17:41:48 -0400
commit32d5c729522d02fe973cb245fe26262f040e0c13 (patch)
treeefe43cb7adad3bb2e4de5c55a5a8cdb9464af8d8 /gnu/packages/patches
parentd013fe50ba28e5fca813ce067f416477b8041694 (diff)
downloadguix-32d5c729522d02fe973cb245fe26262f040e0c13.tar.gz
guix-32d5c729522d02fe973cb245fe26262f040e0c13.zip
gnu: python: Apply mips n32 fix to bundled libffi.
* gnu/packages/patches/python-libffi-mips-n32-fix.patch: New file. * gnu/packages/python.scm (python-2, python): Add it. * gnu-system.am (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/python-libffi-mips-n32-fix.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-libffi-mips-n32-fix.patch b/gnu/packages/patches/python-libffi-mips-n32-fix.patch
new file mode 100644
index 0000000000..393883779d
--- /dev/null
+++ b/gnu/packages/patches/python-libffi-mips-n32-fix.patch
@@ -0,0 +1,21 @@
+Fix handling of uint32_t arguments on the MIPS N32 ABI.
+
+Patch by Mark H Weaver <mhw@netris.org>.
+
+--- Modules/_ctypes/libffi/src/mips/ffi.c.orig 2013-03-16 07:19:39.000000000 -0400
++++ Modules/_ctypes/libffi/src/mips/ffi.c 2013-10-22 01:11:03.111985247 -0400
+@@ -170,7 +170,14 @@
+ break;
+
+ case FFI_TYPE_UINT32:
++#ifdef FFI_MIPS_N32
++ /* The N32 ABI requires that 32-bit integers
++ be sign-extended to 64-bits, regardless of
++ whether they are signed or unsigned. */
++ *(ffi_arg *)argp = *(SINT32 *)(* p_argv);
++#else
+ *(ffi_arg *)argp = *(UINT32 *)(* p_argv);
++#endif
+ break;
+
+ /* This can only happen with 64bit slots. */