Maintenance of the foregin function interface library. Fix peculiar packageconfig manipulation. Patches adapted from buildroot and yoctoproject.
Signed-off-by: Christian Melki <[email protected]> --- ...sed-ifndef-for-__mips_soft_float-442.patch | 25 ------------- ...uild-failure-on-power7-and-older-532.patch | 35 ------------------- patches/libffi-3.3/series | 6 ---- ...on-of-libraries-for-multilib-toolch.patch} | 0 patches/libffi-3.4.2/0002-not-win32.patch | 35 +++++++++++++++++++ .../{libffi-3.3 => libffi-3.4.2}/autogen.sh | 0 patches/libffi-3.4.2/series | 2 ++ rules/libffi.make | 6 ++-- 8 files changed, 40 insertions(+), 69 deletions(-) delete mode 100644 patches/libffi-3.3/0001-Fixed-missed-ifndef-for-__mips_soft_float-442.patch delete mode 100644 patches/libffi-3.3/0002-powerpc-fix-build-failure-on-power7-and-older-532.patch delete mode 100644 patches/libffi-3.3/series rename patches/{libffi-3.3/0003-libffi-Fix-location-of-libraries-for-multilib-toolch.patch => libffi-3.4.2/0001-libffi-Fix-location-of-libraries-for-multilib-toolch.patch} (100%) create mode 100644 patches/libffi-3.4.2/0002-not-win32.patch rename patches/{libffi-3.3 => libffi-3.4.2}/autogen.sh (100%) create mode 100644 patches/libffi-3.4.2/series diff --git a/patches/libffi-3.3/0001-Fixed-missed-ifndef-for-__mips_soft_float-442.patch b/patches/libffi-3.3/0001-Fixed-missed-ifndef-for-__mips_soft_float-442.patch deleted file mode 100644 index fae0a0e7d..000000000 --- a/patches/libffi-3.3/0001-Fixed-missed-ifndef-for-__mips_soft_float-442.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Carl Hurd <[email protected]> -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(+) - -diff --git a/src/mips/o32.S b/src/mips/o32.S -index 44e74cb91a21..799139b2968b 100644 ---- 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 diff --git a/patches/libffi-3.3/0002-powerpc-fix-build-failure-on-power7-and-older-532.patch b/patches/libffi-3.3/0002-powerpc-fix-build-failure-on-power7-and-older-532.patch deleted file mode 100644 index aa2487c29..000000000 --- a/patches/libffi-3.3/0002-powerpc-fix-build-failure-on-power7-and-older-532.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Sergei Trofimovich <[email protected]> -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 <[email protected]> ---- - src/powerpc/ffi_powerpc.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h -index 5ee2a7095a6a..8e2f2f0e74a3 100644 ---- 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); diff --git a/patches/libffi-3.3/series b/patches/libffi-3.3/series deleted file mode 100644 index 83b0b511d..000000000 --- a/patches/libffi-3.3/series +++ /dev/null @@ -1,6 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-Fixed-missed-ifndef-for-__mips_soft_float-442.patch -0002-powerpc-fix-build-failure-on-power7-and-older-532.patch -0003-libffi-Fix-location-of-libraries-for-multilib-toolch.patch -# 9afbef7cf862f28908b007f73dce1db0 - git-ptx-patches magic diff --git a/patches/libffi-3.3/0003-libffi-Fix-location-of-libraries-for-multilib-toolch.patch b/patches/libffi-3.4.2/0001-libffi-Fix-location-of-libraries-for-multilib-toolch.patch similarity index 100% rename from patches/libffi-3.3/0003-libffi-Fix-location-of-libraries-for-multilib-toolch.patch rename to patches/libffi-3.4.2/0001-libffi-Fix-location-of-libraries-for-multilib-toolch.patch diff --git a/patches/libffi-3.4.2/0002-not-win32.patch b/patches/libffi-3.4.2/0002-not-win32.patch new file mode 100644 index 000000000..62daaf4b3 --- /dev/null +++ b/patches/libffi-3.4.2/0002-not-win32.patch @@ -0,0 +1,35 @@ +From 306719369a0d3608b4ff2737de74ae284788a14b Mon Sep 17 00:00:00 2001 +From: Ross Burton <[email protected]> +Date: Thu, 4 Feb 2016 16:22:50 +0000 +Subject: [PATCH] libffi: ensure sysroot paths are not in libffi.pc + +libffi's configure assumes that cross-compiled builds are complicated and +introduces convoluted path manipulation involving gcc search paths to the +install paths, resulting in paths like -L/usr/lib/../lib/ appearing in +libffi.pc. When pkg-config is then used to obtain the linker flags for libffi +it can't tell that this path is on the default search path and returns +$SYSROOT/usr/lib/../lib which then gets written all over the target sysroot. +This then means the sstate can't be shared and triggers QA errors. + +As this block is generally pointless, disable it. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <[email protected]> + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index b764368..d51ce91 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -354,7 +354,7 @@ AC_ARG_ENABLE(multi-os-directory, + + # These variables are only ever used when we cross-build to X86_WIN32. + # And we only support this with GCC, so... +-if test "x$GCC" = "xyes"; then ++if false; then + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + toolexecdir='${exec_prefix}'/'$(target_alias)' diff --git a/patches/libffi-3.3/autogen.sh b/patches/libffi-3.4.2/autogen.sh similarity index 100% rename from patches/libffi-3.3/autogen.sh rename to patches/libffi-3.4.2/autogen.sh diff --git a/patches/libffi-3.4.2/series b/patches/libffi-3.4.2/series new file mode 100644 index 000000000..493d7a3c2 --- /dev/null +++ b/patches/libffi-3.4.2/series @@ -0,0 +1,2 @@ +0001-libffi-Fix-location-of-libraries-for-multilib-toolch.patch +0002-not-win32.patch diff --git a/rules/libffi.make b/rules/libffi.make index 1feab4bdc..b22dd266a 100644 --- a/rules/libffi.make +++ b/rules/libffi.make @@ -15,14 +15,14 @@ PACKAGES-$(PTXCONF_LIBFFI) += libffi # # Paths and names # -LIBFFI_VERSION := 3.3 -LIBFFI_MD5 := 6313289e32f1d38a9df4770b014a2ca7 +LIBFFI_VERSION := 3.4.2 +LIBFFI_MD5 := 294b921e6cf9ab0fbaea4b639f8fdbe8 LIBFFI := libffi-$(LIBFFI_VERSION) LIBFFI_SUFFIX := tar.gz LIBFFI_SOURCE := $(SRCDIR)/$(LIBFFI).$(LIBFFI_SUFFIX) LIBFFI_DIR := $(BUILDDIR)/$(LIBFFI) LIBFFI_URL := \ - http://ftp.gwdg.de/pub/linux/sources.redhat.com/libffi/$(LIBFFI).$(LIBFFI_SUFFIX) \ + https://github.com/libffi/libffi/releases/download/v$(LIBFFI_VERSION)/$(LIBFFI).$(LIBFFI_SUFFIX) \ ftp://sourceware.org/pub/libffi/$(LIBFFI).$(LIBFFI_SUFFIX) LIBFFI_LICENSE := MIT -- 2.30.2 _______________________________________________ ptxdist mailing list [email protected] To unsubscribe, send a mail with subject "unsubscribe" to [email protected]
