meta-openembedded and poky: subtree updates

Squash of the following due to dependencies among them
and OpenBMC changes:

meta-openembedded: subtree update:d0748372d2..9201611135
meta-openembedded: subtree update:9201611135..17fd382f34
poky: subtree update:9052e5b32a..2e11d97b6c
poky: subtree update:2e11d97b6c..a8544811d7

The change log was too large for the jenkins plugin
to handle therefore it has been removed. Here is
the first and last commit of each subtree:

meta-openembedded:d0748372d2
      cppzmq: bump to version 4.6.0
meta-openembedded:17fd382f34
      mpv: Remove X11 dependency
poky:9052e5b32a
      package_ipk: Remove pointless comment to trigger rebuild
poky:a8544811d7
      pbzip2: Fix license warning

Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/poky/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128-part2.patch b/poky/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128-part2.patch
new file mode 100644
index 0000000..6b5b7d4
--- /dev/null
+++ b/poky/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128-part2.patch
@@ -0,0 +1,34 @@
+Address platforms with no __int128.
+
+Fixes remaining pieces from
+https://github.com/libffi/libffi/commit/6663047f56c2932a6b10a790f4ac6666dd181326
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/src/powerpc/ffi_linux64.c.org	2019-12-05 14:48:33.140579431 -0800
++++ a/src/powerpc/ffi_linux64.c	2019-12-05 14:53:58.827244495 -0800
+@@ -680,9 +680,9 @@ ffi_prep_args64 (extended_cif *ecif, uns
+                     {
+                       if (vecarg_count < NUM_VEC_ARG_REGISTERS64
+                           && i < nfixedargs)
+-                        *vec_base.f128++ = *arg.f128++;
++		        memcpy (vec_base.f128++, arg.f128, sizeof (float128));
+                       else
+-                        *next_arg.f128 = *arg.f128++;
++		        memcpy (next_arg.f128, arg.f128++, sizeof (float128));
+                       if (++next_arg.f128 == gpr_end.f128)
+                         next_arg.f128 = rest.f128;
+                       vecarg_count++;
+@@ -986,9 +986,9 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif
+                   do
+                     {
+                       if (pvec < end_pvec && i < nfixedargs)
+-                        *to.f128 = *pvec++;
++		        memcpy (to.f128, pvec++, sizeof (float128));
+                       else
+-                        *to.f128 = *from.f128;
++		        memcpy (to.f128, from.f128, sizeof (float128));
+                       to.f128++;
+                       from.f128++;
+                     }
diff --git a/poky/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128.patch b/poky/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128.patch
new file mode 100644
index 0000000..2e32a50
--- /dev/null
+++ b/poky/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128.patch
@@ -0,0 +1,27 @@
+From 68f45b9049dffb54f5a29a3a495ab3dfcf010634 Mon Sep 17 00:00:00 2001
+From: Anthony Green <green@moxielogic.com>
+Date: Fri, 29 Nov 2019 07:00:35 -0500
+Subject: [PATCH] Address platforms with no __int128.
+
+Upstream-Status: Backport [https://github.com/libffi/libffi/commit/6663047f56c2932a6b10a790f4ac6666dd181326]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/powerpc/ffi_linux64.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c
+index de0d033..7364770 100644
+--- a/src/powerpc/ffi_linux64.c
++++ b/src/powerpc/ffi_linux64.c
+@@ -547,9 +547,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
+               if (next_arg.ul == gpr_end.ul)
+                 next_arg.ul = rest.ul;
+               if (vecarg_count < NUM_VEC_ARG_REGISTERS64 && i < nfixedargs)
+-                *vec_base.f128++ = **p_argv.f128;
++		memcpy (vec_base.f128++, *p_argv.f128, sizeof (float128));
+               else
+-                *next_arg.f128 = **p_argv.f128;
++		memcpy (next_arg.f128, *p_argv.f128, sizeof (float128));
+               if (++next_arg.f128 == gpr_end.f128)
+                 next_arg.f128 = rest.f128;
+               vecarg_count++;
diff --git a/poky/meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch b/poky/meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch
index 00a30a3..397194b 100644
--- a/poky/meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch
+++ b/poky/meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch
@@ -1,12 +1,11 @@
-From 4149a7627a998731cc246d3f58a36808745d04c8 Mon Sep 17 00:00:00 2001
+From 14e2e74682db3bfcf057688f738fdd842a02ff2d Mon Sep 17 00:00:00 2001
 From: Carl Hurd <carl@Carls-MacBook-Pro.local>
 Date: Wed, 18 Jul 2018 09:04:32 -0400
 Subject: [PATCH] Fixed missed #ifndef for __mips_soft_float
 
 Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
----
 Upstream-Status: Submitted [https://github.com/libffi/libffi/pull/442]
-
+---
  src/mips/o32.S | 2 ++
  1 file changed, 2 insertions(+)
 
@@ -26,6 +25,3 @@
  1:
  	# prepare arguments for ffi_closure_mips_inner_O32
  	REG_L	a0, 4($15)	 # cif 
--- 
-2.21.0
-
diff --git a/poky/meta/recipes-support/libffi/libffi/0001-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch b/poky/meta/recipes-support/libffi/libffi/0001-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch
new file mode 100644
index 0000000..52e6e45
--- /dev/null
+++ b/poky/meta/recipes-support/libffi/libffi/0001-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch
@@ -0,0 +1,62 @@
+From de93adfb6f48100946bba2c3abad2a77a0cfde0b Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 24 Nov 2019 09:52:01 +0100
+Subject: [PATCH] ffi_powerpc.h: fix build failure with powerpc7
+
+This is a patch pulled down from the following:
+https://github.com/buildroot/buildroot/blob/78926f610b1411b03464152472fd430012deb9ac/package/libffi/0004-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch
+
+This issue is being hit on OpenBMC code when pulling the latest
+libffi tag and building on a P8 ppc64le machine. I verified this
+patch fixes the issue we are seeing.
+
+Below is the original commit message:
+
+Sicne commit 73dd43afc8a447ba98ea02e9aad4c6898dc77fb0, build on powerpc7
+fails on:
+
+In file included from ../src/powerpc/ffi.c:33:0:
+../src/powerpc/ffi_powerpc.h:61:9: error: '_Float128' is not supported on this target
+ typedef _Float128 float128;
+         ^~~~~~~~~
+
+Fix this build failure by checking for __HAVE_FLOAT128 before using
+_Float128, as _Float128 is enabled only on specific conditions, see
+output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/floatn.h:
+
+ /* Defined to 1 if the current compiler invocation provides a
+    floating-point type with the IEEE 754 binary128 format, and this glibc
+    includes corresponding *f128 interfaces for it.  */
+ #if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \
+     && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH
+ # define __HAVE_FLOAT128 1
+ #else
+ # define __HAVE_FLOAT128 0
+ #endif
+
+Fixes:
+ - http://autobuild.buildroot.org/results/5c9dd8fb3b6a128882b6250f197c80232d8a3b53
+
+Upstream-Status: Submitted [https://github.com/libffi/libffi/pull/561]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
+---
+ 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 8e2f2f0..960a5c4 100644
+--- a/src/powerpc/ffi_powerpc.h
++++ b/src/powerpc/ffi_powerpc.h
+@@ -57,7 +57,7 @@ typedef union
+   double d;
+ } ffi_dblfl;
+
+-#if defined(__FLOAT128_TYPE__)
++#if defined(__FLOAT128_TYPE__) && defined(__HAVE_FLOAT128)
+ typedef _Float128 float128;
+ #elif defined(__FLOAT128__)
+ typedef __float128 float128;
+--
+2.21.0 (Apple Git-122)
+
diff --git a/poky/meta/recipes-support/libffi/libffi/0001-powerpc-fix-build-failure-on-power7-and-older-532.patch b/poky/meta/recipes-support/libffi/libffi/0001-powerpc-fix-build-failure-on-power7-and-older-532.patch
new file mode 100644
index 0000000..8a7aea4
--- /dev/null
+++ b/poky/meta/recipes-support/libffi/libffi/0001-powerpc-fix-build-failure-on-power7-and-older-532.patch
@@ -0,0 +1,38 @@
+From 4dc6cc961300b9deffb648b1237390a5bea1c6d6 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
+Upstream-Status: Backport [https://github.com/libffi/libffi/commit/01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd]
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ 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 5ee2a70..8e2f2f0 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/poky/meta/recipes-support/libffi/libffi/not-win32.patch b/poky/meta/recipes-support/libffi/libffi/not-win32.patch
index 86a7fc9..62daaf4 100644
--- a/poky/meta/recipes-support/libffi/libffi/not-win32.patch
+++ b/poky/meta/recipes-support/libffi/libffi/not-win32.patch
@@ -1,3 +1,8 @@
+From 306719369a0d3608b4ff2737de74ae284788a14b Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+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
@@ -11,9 +16,15 @@
 Upstream-Status: Inappropriate
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
+---
+ 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
-@@ -350,7 +350,7 @@ AC_ARG_ENABLE(multi-os-directory,
+@@ -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...
@@ -21,4 +32,4 @@
 +if false; then
    if test -n "$with_cross_host" &&
       test x"$with_cross_host" != x"no"; then
-     toolexecdir="${exec_prefix}"/'$(target_alias)'
+     toolexecdir='${exec_prefix}'/'$(target_alias)'
diff --git a/poky/meta/recipes-support/libffi/libffi_3.3~rc0.bb b/poky/meta/recipes-support/libffi/libffi_3.3.bb
similarity index 69%
rename from poky/meta/recipes-support/libffi/libffi_3.3~rc0.bb
rename to poky/meta/recipes-support/libffi/libffi_3.3.bb
index 8acb699..e5beb98 100644
--- a/poky/meta/recipes-support/libffi/libffi_3.3~rc0.bb
+++ b/poky/meta/recipes-support/libffi/libffi_3.3.bb
@@ -8,24 +8,25 @@
 A layer must exist above `libffi' that handles type conversions for values passed between the two languages."
 
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=492385fe22195952f5b9b197868ba268"
 
-SRC_URI = "https://github.com/libffi/libffi/releases/download/v3.3-rc0/libffi-3.3-rc0.tar.gz \
+SRC_URI = "https://github.com/libffi/libffi/releases/download/v${PV}/${BPN}-${PV}.tar.gz \
            file://not-win32.patch \
            file://0001-Fixed-missed-ifndef-for-__mips_soft_float.patch \
+           file://0001-powerpc-fix-build-failure-on-power7-and-older-532.patch \
+           file://0001-Address-platforms-with-no-__int128.patch \
+           file://0001-Address-platforms-with-no-__int128-part2.patch \
+           file://0001-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch \
            "
-SRC_URI[md5sum] = "8d2a82a78faf10a5e53c27d986e8f04e"
-SRC_URI[sha256sum] = "403d67aabf1c05157855ea2b1d9950263fb6316536c8c333f5b9ab1eb2f20ecf"
+SRC_URI[md5sum] = "6313289e32f1d38a9df4770b014a2ca7"
+SRC_URI[sha256sum] = "72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056"
 UPSTREAM_CHECK_URI = "https://github.com/libffi/libffi/releases/"
 UPSTREAM_CHECK_REGEX = "libffi-(?P<pver>\d+(\.\d+)+)\.tar"
-UPSTREAM_VERSION_UNKNOWN = "1"
 
 EXTRA_OECONF += "--disable-builddir"
 EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'"
 inherit autotools texinfo multilib_header
 
-S = "${WORKDIR}/${BPN}-3.3-rc0"
-
 do_install_append() {
 	oe_multilib_header ffi.h
 }