diff options
author | Mark H Weaver <mhw@netris.org> | 2013-11-03 18:20:00 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2013-11-03 23:26:04 -0500 |
commit | 1602fcea18879f855f906cf21bb6ee849cbf62c2 (patch) | |
tree | 01ed85a25c073a9cec302e6125467d40692d241b /gnu/packages/patches | |
parent | bf2cc1e5d14df7d8ff0c9456798d48fba65de317 (diff) | |
download | guix-1602fcea18879f855f906cf21bb6ee849cbf62c2.tar guix-1602fcea18879f855f906cf21bb6ee849cbf62c2.tar.gz |
gnu: libffi: fix handling of uint32_t arguments on MIPS N32.
* gnu/packages/patches/libffi-mips-n32-fix.patch: New file.
* gnu/packages/libffi.scm (libffi): Add patch.
* gnu-system.am (dist_patch_DATA): Add patch.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/libffi-mips-n32-fix.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/patches/libffi-mips-n32-fix.patch b/gnu/packages/patches/libffi-mips-n32-fix.patch new file mode 100644 index 0000000000..87ec48f883 --- /dev/null +++ b/gnu/packages/patches/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>. + +--- libffi/src/mips/ffi.c.orig 2013-03-16 07:19:39.000000000 -0400 ++++ 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. */ |