diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-12-02 18:54:52 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-04 12:30:58 +0000 |
commit | 991e2b5879c43ffb384530fe01639004df872206 (patch) | |
tree | 2afcdd1f79e5bf722c196c96b76316a3d7805977 /meta/recipes-support | |
parent | c96f31006da285fa016cfdb05390cb50b09fe077 (diff) | |
download | poky-991e2b5879c43ffb384530fe01639004df872206.tar.gz |
libffi: update to 3.3 final
Add a couple patches to address ppc(64) build failures.
License-Update: copyright years
(From OE-Core rev: 9aab37ac40c8da5121a931f5979fcc88489021d2)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r-- | meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128.patch | 27 | ||||
-rw-r--r-- | meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch | 8 | ||||
-rw-r--r-- | meta/recipes-support/libffi/libffi/0001-powerpc-fix-build-failure-on-power7-and-older-532.patch | 38 | ||||
-rw-r--r-- | meta/recipes-support/libffi/libffi/not-win32.patch | 15 | ||||
-rw-r--r-- | meta/recipes-support/libffi/libffi_3.3.bb (renamed from meta/recipes-support/libffi/libffi_3.3~rc0.bb) | 13 |
5 files changed, 86 insertions, 15 deletions
diff --git a/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128.patch b/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128.patch new file mode 100644 index 0000000000..2e32a50296 --- /dev/null +++ b/meta/recipes-support/libffi/libffi/0001-Address-platforms-with-no-__int128.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 68f45b9049dffb54f5a29a3a495ab3dfcf010634 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anthony Green <green@moxielogic.com> | ||
3 | Date: Fri, 29 Nov 2019 07:00:35 -0500 | ||
4 | Subject: [PATCH] Address platforms with no __int128. | ||
5 | |||
6 | Upstream-Status: Backport [https://github.com/libffi/libffi/commit/6663047f56c2932a6b10a790f4ac6666dd181326] | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | --- | ||
9 | src/powerpc/ffi_linux64.c | 4 ++-- | ||
10 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c | ||
13 | index de0d033..7364770 100644 | ||
14 | --- a/src/powerpc/ffi_linux64.c | ||
15 | +++ b/src/powerpc/ffi_linux64.c | ||
16 | @@ -547,9 +547,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack) | ||
17 | if (next_arg.ul == gpr_end.ul) | ||
18 | next_arg.ul = rest.ul; | ||
19 | if (vecarg_count < NUM_VEC_ARG_REGISTERS64 && i < nfixedargs) | ||
20 | - *vec_base.f128++ = **p_argv.f128; | ||
21 | + memcpy (vec_base.f128++, *p_argv.f128, sizeof (float128)); | ||
22 | else | ||
23 | - *next_arg.f128 = **p_argv.f128; | ||
24 | + memcpy (next_arg.f128, *p_argv.f128, sizeof (float128)); | ||
25 | if (++next_arg.f128 == gpr_end.f128) | ||
26 | next_arg.f128 = rest.f128; | ||
27 | vecarg_count++; | ||
diff --git a/meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch b/meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch index 00a30a3554..397194bc93 100644 --- a/meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch +++ b/meta/recipes-support/libffi/libffi/0001-Fixed-missed-ifndef-for-__mips_soft_float.patch | |||
@@ -1,12 +1,11 @@ | |||
1 | From 4149a7627a998731cc246d3f58a36808745d04c8 Mon Sep 17 00:00:00 2001 | 1 | From 14e2e74682db3bfcf057688f738fdd842a02ff2d Mon Sep 17 00:00:00 2001 |
2 | From: Carl Hurd <carl@Carls-MacBook-Pro.local> | 2 | From: Carl Hurd <carl@Carls-MacBook-Pro.local> |
3 | Date: Wed, 18 Jul 2018 09:04:32 -0400 | 3 | Date: Wed, 18 Jul 2018 09:04:32 -0400 |
4 | Subject: [PATCH] Fixed missed #ifndef for __mips_soft_float | 4 | Subject: [PATCH] Fixed missed #ifndef for __mips_soft_float |
5 | 5 | ||
6 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 6 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> |
7 | --- | ||
8 | Upstream-Status: Submitted [https://github.com/libffi/libffi/pull/442] | 7 | Upstream-Status: Submitted [https://github.com/libffi/libffi/pull/442] |
9 | 8 | --- | |
10 | src/mips/o32.S | 2 ++ | 9 | src/mips/o32.S | 2 ++ |
11 | 1 file changed, 2 insertions(+) | 10 | 1 file changed, 2 insertions(+) |
12 | 11 | ||
@@ -26,6 +25,3 @@ index 44e74cb..799139b 100644 | |||
26 | 1: | 25 | 1: |
27 | # prepare arguments for ffi_closure_mips_inner_O32 | 26 | # prepare arguments for ffi_closure_mips_inner_O32 |
28 | REG_L a0, 4($15) # cif | 27 | REG_L a0, 4($15) # cif |
29 | -- | ||
30 | 2.21.0 | ||
31 | |||
diff --git a/meta/recipes-support/libffi/libffi/0001-powerpc-fix-build-failure-on-power7-and-older-532.patch b/meta/recipes-support/libffi/libffi/0001-powerpc-fix-build-failure-on-power7-and-older-532.patch new file mode 100644 index 0000000000..8a7aea4311 --- /dev/null +++ b/meta/recipes-support/libffi/libffi/0001-powerpc-fix-build-failure-on-power7-and-older-532.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 4dc6cc961300b9deffb648b1237390a5bea1c6d6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sergei Trofimovich <slyfox@gentoo.org> | ||
3 | Date: Thu, 28 Nov 2019 12:42:41 +0000 | ||
4 | Subject: [PATCH] powerpc: fix build failure on power7 and older (#532) | ||
5 | |||
6 | Build failure looks as: | ||
7 | ``` | ||
8 | libtool: compile: powerpc-unknown-linux-gnu-gcc \ | ||
9 | -O2 -mcpu=powerpc -mtune=powerpc -pipe ... -c src/powerpc/ffi.c ... | ||
10 | In file included from src/powerpc/ffi.c:33: | ||
11 | src/powerpc/ffi_powerpc.h:65:9: error: '__int128' is not supported on this target | ||
12 | 65 | typedef __int128 float128; | ||
13 | | ^~~~~~~~ | ||
14 | ``` | ||
15 | |||
16 | The fix avoids using __int128 in favour of aligned char[16]. | ||
17 | |||
18 | Closes: https://github.com/libffi/libffi/issues/531 | ||
19 | Upstream-Status: Backport [https://github.com/libffi/libffi/commit/01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd] | ||
20 | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> | ||
21 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
22 | --- | ||
23 | src/powerpc/ffi_powerpc.h | 2 +- | ||
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
25 | |||
26 | diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h | ||
27 | index 5ee2a70..8e2f2f0 100644 | ||
28 | --- a/src/powerpc/ffi_powerpc.h | ||
29 | +++ b/src/powerpc/ffi_powerpc.h | ||
30 | @@ -62,7 +62,7 @@ typedef _Float128 float128; | ||
31 | #elif defined(__FLOAT128__) | ||
32 | typedef __float128 float128; | ||
33 | #else | ||
34 | -typedef __int128 float128; | ||
35 | +typedef char float128[16] __attribute__((aligned(16))); | ||
36 | #endif | ||
37 | |||
38 | void FFI_HIDDEN ffi_closure_SYSV (void); | ||
diff --git a/meta/recipes-support/libffi/libffi/not-win32.patch b/meta/recipes-support/libffi/libffi/not-win32.patch index 86a7fc9e40..62daaf4b38 100644 --- a/meta/recipes-support/libffi/libffi/not-win32.patch +++ b/meta/recipes-support/libffi/libffi/not-win32.patch | |||
@@ -1,3 +1,8 @@ | |||
1 | From 306719369a0d3608b4ff2737de74ae284788a14b Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@intel.com> | ||
3 | Date: Thu, 4 Feb 2016 16:22:50 +0000 | ||
4 | Subject: [PATCH] libffi: ensure sysroot paths are not in libffi.pc | ||
5 | |||
1 | libffi's configure assumes that cross-compiled builds are complicated and | 6 | libffi's configure assumes that cross-compiled builds are complicated and |
2 | introduces convoluted path manipulation involving gcc search paths to the | 7 | introduces convoluted path manipulation involving gcc search paths to the |
3 | install paths, resulting in paths like -L/usr/lib/../lib/ appearing in | 8 | install paths, resulting in paths like -L/usr/lib/../lib/ appearing in |
@@ -11,9 +16,15 @@ As this block is generally pointless, disable it. | |||
11 | Upstream-Status: Inappropriate | 16 | Upstream-Status: Inappropriate |
12 | Signed-off-by: Ross Burton <ross.burton@intel.com> | 17 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
13 | 18 | ||
19 | --- | ||
20 | configure.ac | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/configure.ac b/configure.ac | ||
24 | index b764368..d51ce91 100644 | ||
14 | --- a/configure.ac | 25 | --- a/configure.ac |
15 | +++ b/configure.ac | 26 | +++ b/configure.ac |
16 | @@ -350,7 +350,7 @@ AC_ARG_ENABLE(multi-os-directory, | 27 | @@ -354,7 +354,7 @@ AC_ARG_ENABLE(multi-os-directory, |
17 | 28 | ||
18 | # These variables are only ever used when we cross-build to X86_WIN32. | 29 | # These variables are only ever used when we cross-build to X86_WIN32. |
19 | # And we only support this with GCC, so... | 30 | # And we only support this with GCC, so... |
@@ -21,4 +32,4 @@ Signed-off-by: Ross Burton <ross.burton@intel.com> | |||
21 | +if false; then | 32 | +if false; then |
22 | if test -n "$with_cross_host" && | 33 | if test -n "$with_cross_host" && |
23 | test x"$with_cross_host" != x"no"; then | 34 | test x"$with_cross_host" != x"no"; then |
24 | toolexecdir="${exec_prefix}"/'$(target_alias)' | 35 | toolexecdir='${exec_prefix}'/'$(target_alias)' |
diff --git a/meta/recipes-support/libffi/libffi_3.3~rc0.bb b/meta/recipes-support/libffi/libffi_3.3.bb index 8acb699d4a..f57d03d2f5 100644 --- a/meta/recipes-support/libffi/libffi_3.3~rc0.bb +++ b/meta/recipes-support/libffi/libffi_3.3.bb | |||
@@ -8,24 +8,23 @@ library really only provides the lowest, machine dependent layer of a fully feat | |||
8 | A layer must exist above `libffi' that handles type conversions for values passed between the two languages." | 8 | A layer must exist above `libffi' that handles type conversions for values passed between the two languages." |
9 | 9 | ||
10 | LICENSE = "MIT" | 10 | LICENSE = "MIT" |
11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b" | 11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=492385fe22195952f5b9b197868ba268" |
12 | 12 | ||
13 | SRC_URI = "https://github.com/libffi/libffi/releases/download/v3.3-rc0/libffi-3.3-rc0.tar.gz \ | 13 | SRC_URI = "https://github.com/libffi/libffi/releases/download/v${PV}/${BPN}-${PV}.tar.gz \ |
14 | file://not-win32.patch \ | 14 | file://not-win32.patch \ |
15 | file://0001-Fixed-missed-ifndef-for-__mips_soft_float.patch \ | 15 | file://0001-Fixed-missed-ifndef-for-__mips_soft_float.patch \ |
16 | file://0001-powerpc-fix-build-failure-on-power7-and-older-532.patch \ | ||
17 | file://0001-Address-platforms-with-no-__int128.patch \ | ||
16 | " | 18 | " |
17 | SRC_URI[md5sum] = "8d2a82a78faf10a5e53c27d986e8f04e" | 19 | SRC_URI[md5sum] = "6313289e32f1d38a9df4770b014a2ca7" |
18 | SRC_URI[sha256sum] = "403d67aabf1c05157855ea2b1d9950263fb6316536c8c333f5b9ab1eb2f20ecf" | 20 | SRC_URI[sha256sum] = "72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056" |
19 | UPSTREAM_CHECK_URI = "https://github.com/libffi/libffi/releases/" | 21 | UPSTREAM_CHECK_URI = "https://github.com/libffi/libffi/releases/" |
20 | UPSTREAM_CHECK_REGEX = "libffi-(?P<pver>\d+(\.\d+)+)\.tar" | 22 | UPSTREAM_CHECK_REGEX = "libffi-(?P<pver>\d+(\.\d+)+)\.tar" |
21 | UPSTREAM_VERSION_UNKNOWN = "1" | ||
22 | 23 | ||
23 | EXTRA_OECONF += "--disable-builddir" | 24 | EXTRA_OECONF += "--disable-builddir" |
24 | EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'" | 25 | EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'" |
25 | inherit autotools texinfo multilib_header | 26 | inherit autotools texinfo multilib_header |
26 | 27 | ||
27 | S = "${WORKDIR}/${BPN}-3.3-rc0" | ||
28 | |||
29 | do_install_append() { | 28 | do_install_append() { |
30 | oe_multilib_header ffi.h | 29 | oe_multilib_header ffi.h |
31 | } | 30 | } |