diff options
-rw-r--r-- | system/libffi/APKBUILD | 9 | ||||
-rw-r--r-- | system/libffi/gnu-linux-define.patch | 15 | ||||
-rw-r--r-- | system/libffi/long-double-size.patch | 44 | ||||
-rw-r--r-- | system/libffi/powerpc-fixes.patch | 79 |
4 files changed, 3 insertions, 144 deletions
diff --git a/system/libffi/APKBUILD b/system/libffi/APKBUILD index 659ec1984..7b9e3b07c 100644 --- a/system/libffi/APKBUILD +++ b/system/libffi/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libffi -pkgver=3.4.2 +pkgver=3.4.4 pkgrel=0 pkgdesc="A portable foreign function interface library" url="https://sourceware.org/libffi" @@ -10,9 +10,7 @@ depends="" makedepends="texinfo" checkdepends="dejagnu" subpackages="$pkgname-dev $pkgname-doc" -source="https://github.com/$pkgname/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz - long-double-size.patch - " +source="https://github.com/$pkgname/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz" build () { ./configure \ @@ -32,5 +30,4 @@ package() { install -m644 LICENSE ""$pkgdir"/usr/share/licenses/$pkgname/" } -sha512sums="31bad35251bf5c0adb998c88ff065085ca6105cf22071b9bd4b5d5d69db4fadf16cadeec9baca944c4bb97b619b035bb8279de8794b922531fddeb0779eb7fb1 libffi-3.4.2.tar.gz -ef6ee13ac5ad6a5c7b60235d64e0c4bd57ccea320c7498327a0602cbe9398dadeef2c10f2ff958f106ae033412d1e174735a6c5ab0ee68982275274cc4906fde long-double-size.patch" +sha512sums="88680aeb0fa0dc0319e5cd2ba45b4b5a340bc9b4bcf20b1e0613b39cd898f177a3863aa94034d8e23a7f6f44d858a53dcd36d1bb8dee13b751ef814224061889 libffi-3.4.4.tar.gz" diff --git a/system/libffi/gnu-linux-define.patch b/system/libffi/gnu-linux-define.patch deleted file mode 100644 index 8dcae738b..000000000 --- a/system/libffi/gnu-linux-define.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://bugs.alpinelinux.org/issues/4275 - -diff --git a/closures.c.orig b/closures.c -index 721ff00..22a699c 100644 ---- a/src/closures.c.orig -+++ b/src/closures.c -@@ -34,7 +34,7 @@ - #include <ffi_common.h> - - #if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE --# if __gnu_linux__ && !defined(__ANDROID__) -+# if __linux__ && !defined(__ANDROID__) - /* This macro indicates it may be forbidden to map anonymous memory - with both write and execute permission. Code compiled when this - option is defined will attempt to map such pages once, but if it diff --git a/system/libffi/long-double-size.patch b/system/libffi/long-double-size.patch deleted file mode 100644 index 8f04496eb..000000000 --- a/system/libffi/long-double-size.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- libffi-3.4.2/testsuite/libffi.closures/huge_struct.c.old 2021-06-27 10:17:08.000000000 -0500 -+++ libffi-3.4.2/testsuite/libffi.closures/huge_struct.c 2022-05-05 03:22:39.842515657 -0500 -@@ -6,7 +6,7 @@ - */ - - /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ --/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */ -+/* { dg-options -mlong-double-128 { target powerpc64*-*-linux-gnu* } } */ - /* { dg-options -Wformat=0 { target moxie*-*-elf or1k-*-* } } */ - - #include <inttypes.h> ---- libffi-3.4.2/testsuite/libffi.closures/cls_longdouble.c.old 2021-06-27 10:17:08.000000000 -0500 -+++ libffi-3.4.2/testsuite/libffi.closures/cls_longdouble.c 2022-05-05 03:22:48.131612271 -0500 -@@ -7,7 +7,7 @@ - /* This test is known to PASS on armv7l-unknown-linux-gnueabihf, so I have - remove the xfail for arm*-*-* below, until we know more. */ - /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ --/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */ -+/* { dg-options -mlong-double-128 { target powerpc64*-*-linux-gnu* } } */ - - #include "ffitest.h" - ---- libffi-3.4.2/testsuite/libffi.closures/cls_align_longdouble_split.c.old 2021-06-27 10:17:08.000000000 -0500 -+++ libffi-3.4.2/testsuite/libffi.closures/cls_align_longdouble_split.c 2022-05-05 03:22:55.740782984 -0500 -@@ -5,7 +5,7 @@ - Originator: <hos@tamanegi.org> 20031203 */ - - /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ --/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */ -+/* { dg-options -mlong-double-128 { target powerpc64*-*-linux-gnu* } } */ - - #include "ffitest.h" - ---- libffi-3.4.2/testsuite/libffi.closures/cls_align_longdouble_split2.c.old 2021-06-27 10:17:08.000000000 -0500 -+++ libffi-3.4.2/testsuite/libffi.closures/cls_align_longdouble_split2.c 2022-05-05 03:23:00.930217413 -0500 -@@ -6,7 +6,7 @@ - */ - - /* { dg-do run { xfail strongarm*-*-* } } */ --/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */ -+/* { dg-options -mlong-double-128 { target powerpc64*-*-linux-gnu* } } */ - - #include "ffitest.h" - diff --git a/system/libffi/powerpc-fixes.patch b/system/libffi/powerpc-fixes.patch deleted file mode 100644 index e62ae32d1..000000000 --- a/system/libffi/powerpc-fixes.patch +++ /dev/null @@ -1,79 +0,0 @@ -From bf6946074b948540e4147154041ea244bafb38c4 Mon Sep 17 00:00:00 2001 -From: Samuel Holland <samuel@sholland.org> -Date: Sat, 13 Oct 2018 01:14:03 +0000 -Subject: [PATCH] powerpc: Fix alignment after float structs - ---- - src/powerpc/ffi_linux64.c | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c -index 2534ecf3..197a270d 100644 ---- a/src/powerpc/ffi_linux64.c -+++ b/src/powerpc/ffi_linux64.c -@@ -580,11 +580,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack) - fparg_count++; - } - while (--elnum != 0); -- if ((next_arg.p & 3) != 0) -- { -- if (++next_arg.f == gpr_end.f) -- next_arg.f = rest.f; -- } -+ if ((next_arg.p & 7) != 0) -+ if (++next_arg.f == gpr_end.f) -+ next_arg.f = rest.f; - } - else - do -From 49a1bbadfa0b5ad5c373271c8ba7a5d8911a85d9 Mon Sep 17 00:00:00 2001 -From: Samuel Holland <samuel@sholland.org> -Date: Sat, 13 Oct 2018 01:14:20 +0000 -Subject: [PATCH] powerpc: Don't pad rvalues copied from FP regs - ---- - src/powerpc/ffi.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/powerpc/ffi.c b/src/powerpc/ffi.c -index 7eb543e4..94a11700 100644 ---- a/src/powerpc/ffi.c -+++ b/src/powerpc/ffi.c -@@ -121,8 +121,9 @@ ffi_call_int (ffi_cif *cif, - # endif - /* The SYSV ABI returns a structure of up to 8 bytes in size - left-padded in r3/r4, and the ELFv2 ABI similarly returns a -- structure of up to 8 bytes in size left-padded in r3. */ -- if (rsize <= 8) -+ structure of up to 8 bytes in size left-padded in r3. But -+ note that a structure of a single float is not paddded. */ -+ if (rsize <= 8 && (cif->flags & FLAG_RETURNS_FP) == 0) - memcpy (rvalue, (char *) smst_buffer + 8 - rsize, rsize); - else - #endif -From b0c598d5d6b653a3ea87a2d04afb6b35441e5f7e Mon Sep 17 00:00:00 2001 -From: Samuel Holland <samuel@sholland.org> -Date: Sat, 13 Oct 2018 01:14:58 +0000 -Subject: [PATCH] powerpc: Add missing check in struct alignment - ---- - src/powerpc/ffi_linux64.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c -index 197a270d..d755c712 100644 ---- a/src/powerpc/ffi_linux64.c -+++ b/src/powerpc/ffi_linux64.c -@@ -536,7 +536,11 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack) - if (align > 16) - align = 16; - if (align > 1) -- next_arg.p = ALIGN (next_arg.p, align); -+ { -+ next_arg.p = ALIGN (next_arg.p, align); -+ if (next_arg.ul == gpr_end.ul) -+ next_arg.ul = rest.ul; -+ } - } - #if _CALL_ELF == 2 - elt = discover_homogeneous_aggregate (*ptr, &elnum); |