diff --git a/libs/libffi/Makefile b/libs/libffi/Makefile index c625f447d5..1f2119221c 100644 --- a/libs/libffi/Makefile +++ b/libs/libffi/Makefile @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libffi -PKG_VERSION:=3.2.1 -PKG_RELEASE:=4 +PKG_VERSION:=3.3 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=ftp://sourceware.org/pub/libffi/ -PKG_HASH:=d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37 +PKG_SOURCE_URL:=https://sourceware.org/pub/libffi/ +PKG_HASH:=72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 include $(INCLUDE_DIR)/package.mk @@ -46,6 +46,20 @@ A layer must exist above libffi that handles type conversions for values passed between the two languages. endef +HOST_CONFIGURE_ARGS += \ + --disable-debug \ + --disable-docs \ + --disable-multi-os-directory \ + --disable-raw-api \ + --disable-structs + +CONFIGURE_ARGS += \ + --disable-debug \ + --disable-docs \ + --disable-multi-os-directory \ + --disable-raw-api \ + --disable-structs + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) \ @@ -54,11 +68,11 @@ define Build/InstallDev $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ $(1)/usr/lib/pkgconfig/ - sed -i -e 's,includedir=.*,includedir=$$$${prefix}/include,' $(1)/usr/lib/pkgconfig/libffi.pc + $(SED) 's,includedir=.*,includedir=$$$${prefix}/include,' $(1)/usr/lib/pkgconfig/libffi.pc $(INSTALL_DIR) $(1)/usr/include $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)-$(PKG_VERSION)/include/*.h \ + $(PKG_INSTALL_DIR)/usr/include/*.h \ $(1)/usr/include/ endef @@ -69,15 +83,5 @@ define Package/libffi/install $(1)/usr/lib/ endef -define Host/Install - $(call Host/Install/Default) - # Adjust host libffi headers ; the default rule does - # not seem to install them to the proper include folder - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/include - $(CP) \ - $(STAGING_DIR_HOSTPKG)/lib/libffi-$(PKG_VERSION)/include/*.h \ - $(STAGING_DIR_HOSTPKG)/include -endef - $(eval $(call HostBuild)) $(eval $(call BuildPackage,libffi)) diff --git a/libs/libffi/patches/002-fix-toolexeclibdir-path.patch b/libs/libffi/patches/002-fix-toolexeclibdir-path.patch deleted file mode 100644 index f79c13233e..0000000000 --- a/libs/libffi/patches/002-fix-toolexeclibdir-path.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -rupN libffi-3.2.1.orig/configure libffi-3.2.1/configure ---- libffi-3.2.1.orig/configure 2014-11-12 12:59:57.000000000 +0100 -+++ libffi-3.2.1/configure 2016-05-11 17:14:58.606625260 +0200 -@@ -18725,12 +18725,6 @@ if test "x$GCC" = "xyes"; then - toolexecdir="${libdir}"/gcc-lib/'$(target_alias)' - toolexeclibdir="${libdir}" - fi -- multi_os_directory=`$CC $CFLAGS -print-multi-os-directory` -- case $multi_os_directory in -- .) ;; # Avoid trailing /. -- ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; -- esac -- - else - toolexeclibdir="${libdir}" - fi -diff -rupN libffi-3.2.1.orig/configure.ac libffi-3.2.1/configure.ac ---- libffi-3.2.1.orig/configure.ac 2014-11-12 12:56:51.000000000 +0100 -+++ libffi-3.2.1/configure.ac 2016-05-11 17:15:19.694626266 +0200 -@@ -601,11 +601,6 @@ if test "x$GCC" = "xyes"; then - toolexecdir="${libdir}"/gcc-lib/'$(target_alias)' - toolexeclibdir="${libdir}" - fi -- multi_os_directory=`$CC $CFLAGS -print-multi-os-directory` -- case $multi_os_directory in -- .) ;; # Avoid trailing /. -- ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; -- esac - AC_SUBST(toolexecdir) - else - toolexeclibdir="${libdir}" diff --git a/libs/libffi/patches/100-fix_mips_softfloat.patch b/libs/libffi/patches/100-fix_mips_softfloat.patch index 09b91eff53..c3f70242ab 100644 --- a/libs/libffi/patches/100-fix_mips_softfloat.patch +++ b/libs/libffi/patches/100-fix_mips_softfloat.patch @@ -1,149 +1,18 @@ -From bfeac1b2d18b12c1c3c64a41a09c90f93d0ed4ca Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Mon, 15 Aug 2016 15:00:13 +0800 -Subject: [PATCH] mips: fix MIPS softfloat build issue +From 76c0cfea70f78586231d7994492396eebfb12d5f Mon Sep 17 00:00:00 2001 +From: Carl Hurd +Date: Fri, 29 Nov 2019 14:46:11 -0500 +Subject: [PATCH] Fixed missed #ifndef for __mips_soft_float (#442) -The patch for o32.S is taken from OpenWrt packages repo 3a7a4bf "libffi: -fix MIPS softfloat build issue with current binutils" - -Signed-off-by: Felix Fietkau -Signed-off-by: Yousong Zhou +Thank you! --- - src/mips/n32.S | 17 +++++++++++++++++ - src/mips/o32.S | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+) + src/mips/o32.S | 2 ++ + 1 file changed, 2 insertions(+) -diff --git a/src/mips/n32.S b/src/mips/n32.S -index c6985d3..8f25994 100644 ---- a/src/mips/n32.S -+++ b/src/mips/n32.S -@@ -107,6 +107,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1<