include $(TOPDIR)/rules.mk
PKG_NAME:=libffi
-PKG_VERSION:=3.3
-PKG_RELEASE:=2
+PKG_VERSION:=3.4.2
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://sourceware.org/pub/libffi/
-PKG_HASH:=72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056
+PKG_SOURCE_URL:=https://codeload.github.com/libffi/libffi/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=0acbca9fd9c0eeed7e5d9460ae2ea945d3f1f3d48e13a4c54da12c7e0d23c313
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
+PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
+++ /dev/null
-From 76c0cfea70f78586231d7994492396eebfb12d5f Mon Sep 17 00:00:00 2001
-From: Carl Hurd <carl.m.hurd@gmail.com>
-Date: Fri, 29 Nov 2019 14:46:11 -0500
-Subject: [PATCH] Fixed missed #ifndef for __mips_soft_float (#442)
-
-Thank you!
----
- src/mips/o32.S | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/src/mips/o32.S
-+++ b/src/mips/o32.S
-@@ -282,9 +282,11 @@ $LCFI12:
- li $13, 1 # FFI_O32
- bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT
-
-+#ifndef __mips_soft_float
- # Store all possible float/double registers.
- s.d $f12, FA_0_0_OFF2($fp)
- s.d $f14, FA_1_0_OFF2($fp)
-+#endif
- 1:
- # prepare arguments for ffi_closure_mips_inner_O32
- REG_L a0, 4($15) # cif
+++ /dev/null
-From 01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Thu, 28 Nov 2019 12:42:41 +0000
-Subject: [PATCH] powerpc: fix build failure on power7 and older (#532)
-
-Build failure looks as:
-```
-libtool: compile: powerpc-unknown-linux-gnu-gcc \
- -O2 -mcpu=powerpc -mtune=powerpc -pipe ... -c src/powerpc/ffi.c ...
-In file included from src/powerpc/ffi.c:33:
-src/powerpc/ffi_powerpc.h:65:9: error: '__int128' is not supported on this target
- 65 | typedef __int128 float128;
- | ^~~~~~~~
-```
-
-The fix avoids using __int128 in favour of aligned char[16].
-
-Closes: https://github.com/libffi/libffi/issues/531
-Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
----
- src/powerpc/ffi_powerpc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/src/powerpc/ffi_powerpc.h
-+++ b/src/powerpc/ffi_powerpc.h
-@@ -62,7 +62,7 @@ typedef _Float128 float128;
- #elif defined(__FLOAT128__)
- typedef __float128 float128;
- #else
--typedef __int128 float128;
-+typedef char float128[16] __attribute__((aligned(16)));
- #endif
-
- void FFI_HIDDEN ffi_closure_SYSV (void);