summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-10-19 20:47:20 +0100
committerSam James <sam@gentoo.org>2023-10-19 20:48:18 +0100
commita24d0c4442a09fd9b15e538035a7fa317fc0ca73 (patch)
tree2f37bb603b78336e75a247d8c85c940684325c54 /dev-libs/libffi/files
parentsys-apps/file: seccomp: also allow geteuid and getegid (diff)
downloadgentoo-a24d0c4442a09fd9b15e538035a7fa317fc0ca73.tar.gz
gentoo-a24d0c4442a09fd9b15e538035a7fa317fc0ca73.tar.bz2
gentoo-a24d0c4442a09fd9b15e538035a7fa317fc0ca73.zip
dev-libs/libffi: update EAPI 7 -> 8; fix float args on sparc
This fixes the gjs test suite on sparc. Tests continue to pass on libffi and gjs tests now completely pass (previously GIMarshalling failed). The fix is obvious so I don't see much of a need to wait until it's merged upstream, and it only affects sparc. Bug: https://github.com/libffi/libffi/issues/778 Closes: https://bugs.gentoo.org/882071 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libffi/files')
-rw-r--r--dev-libs/libffi/files/libffi-3.4.4-sparc-float-typo.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/dev-libs/libffi/files/libffi-3.4.4-sparc-float-typo.patch b/dev-libs/libffi/files/libffi-3.4.4-sparc-float-typo.patch
new file mode 100644
index 000000000000..3768df62df9f
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.4.4-sparc-float-typo.patch
@@ -0,0 +1,28 @@
+https://github.com/libffi/libffi/issues/778
+https://bugs.gentoo.org/882071
+
+Fix incorrect type for passing floats. Thanks to Petr Sumbera and Richard Henderson
+for figuring it out on the upstream bug.
+--- a/src/sparc/ffi64.c
++++ b/src/sparc/ffi64.c
+@@ -382,13 +382,19 @@ ffi_prep_args_v9(ffi_cif *cif, unsigned long *argp, void *rvalue, void **avalue)
+ *argp++ = *(SINT32 *)a;
+ break;
+ case FFI_TYPE_UINT32:
+- case FFI_TYPE_FLOAT:
+ *argp++ = *(UINT32 *)a;
+ break;
+ case FFI_TYPE_SINT64:
+ case FFI_TYPE_UINT64:
+ case FFI_TYPE_POINTER:
++ *argp++ = *(UINT64 *)a;
++ break;
++ case FFI_TYPE_FLOAT:
++ flags |= SPARC_FLAG_FP_ARGS;
++ *argp++ = *(UINT32 *)a;
++ break;
+ case FFI_TYPE_DOUBLE:
++ flags |= SPARC_FLAG_FP_ARGS;
+ *argp++ = *(UINT64 *)a;
+ break;
+