diff options
-rw-r--r-- | meta/recipes-support/libffi/libffi/0001-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch | 62 | ||||
-rw-r--r-- | meta/recipes-support/libffi/libffi_3.3.bb | 1 |
2 files changed, 63 insertions, 0 deletions
diff --git a/meta/recipes-support/libffi/libffi/0001-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch b/meta/recipes-support/libffi/libffi/0001-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch new file mode 100644 index 0000000000..52e6e4536b --- /dev/null +++ b/meta/recipes-support/libffi/libffi/0001-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From de93adfb6f48100946bba2c3abad2a77a0cfde0b Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
3 | Date: Sun, 24 Nov 2019 09:52:01 +0100 | ||
4 | Subject: [PATCH] ffi_powerpc.h: fix build failure with powerpc7 | ||
5 | |||
6 | This is a patch pulled down from the following: | ||
7 | https://github.com/buildroot/buildroot/blob/78926f610b1411b03464152472fd430012deb9ac/package/libffi/0004-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch | ||
8 | |||
9 | This issue is being hit on OpenBMC code when pulling the latest | ||
10 | libffi tag and building on a P8 ppc64le machine. I verified this | ||
11 | patch fixes the issue we are seeing. | ||
12 | |||
13 | Below is the original commit message: | ||
14 | |||
15 | Sicne commit 73dd43afc8a447ba98ea02e9aad4c6898dc77fb0, build on powerpc7 | ||
16 | fails on: | ||
17 | |||
18 | In file included from ../src/powerpc/ffi.c:33:0: | ||
19 | ../src/powerpc/ffi_powerpc.h:61:9: error: '_Float128' is not supported on this target | ||
20 | typedef _Float128 float128; | ||
21 | ^~~~~~~~~ | ||
22 | |||
23 | Fix this build failure by checking for __HAVE_FLOAT128 before using | ||
24 | _Float128, as _Float128 is enabled only on specific conditions, see | ||
25 | output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/floatn.h: | ||
26 | |||
27 | /* Defined to 1 if the current compiler invocation provides a | ||
28 | floating-point type with the IEEE 754 binary128 format, and this glibc | ||
29 | includes corresponding *f128 interfaces for it. */ | ||
30 | #if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \ | ||
31 | && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH | ||
32 | # define __HAVE_FLOAT128 1 | ||
33 | #else | ||
34 | # define __HAVE_FLOAT128 0 | ||
35 | #endif | ||
36 | |||
37 | Fixes: | ||
38 | - http://autobuild.buildroot.org/results/5c9dd8fb3b6a128882b6250f197c80232d8a3b53 | ||
39 | |||
40 | Upstream-Status: Submitted [https://github.com/libffi/libffi/pull/561] | ||
41 | Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
42 | Signed-off-by: Andrew Geissler <geissonator@yahoo.com> | ||
43 | --- | ||
44 | src/powerpc/ffi_powerpc.h | 2 +- | ||
45 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
46 | |||
47 | diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h | ||
48 | index 8e2f2f0..960a5c4 100644 | ||
49 | --- a/src/powerpc/ffi_powerpc.h | ||
50 | +++ b/src/powerpc/ffi_powerpc.h | ||
51 | @@ -57,7 +57,7 @@ typedef union | ||
52 | double d; | ||
53 | } ffi_dblfl; | ||
54 | |||
55 | -#if defined(__FLOAT128_TYPE__) | ||
56 | +#if defined(__FLOAT128_TYPE__) && defined(__HAVE_FLOAT128) | ||
57 | typedef _Float128 float128; | ||
58 | #elif defined(__FLOAT128__) | ||
59 | typedef __float128 float128; | ||
60 | -- | ||
61 | 2.21.0 (Apple Git-122) | ||
62 | |||
diff --git a/meta/recipes-support/libffi/libffi_3.3.bb b/meta/recipes-support/libffi/libffi_3.3.bb index 803a25fa35..e5beb985c6 100644 --- a/meta/recipes-support/libffi/libffi_3.3.bb +++ b/meta/recipes-support/libffi/libffi_3.3.bb | |||
@@ -16,6 +16,7 @@ SRC_URI = "https://github.com/libffi/libffi/releases/download/v${PV}/${BPN}-${PV | |||
16 | file://0001-powerpc-fix-build-failure-on-power7-and-older-532.patch \ | 16 | file://0001-powerpc-fix-build-failure-on-power7-and-older-532.patch \ |
17 | file://0001-Address-platforms-with-no-__int128.patch \ | 17 | file://0001-Address-platforms-with-no-__int128.patch \ |
18 | file://0001-Address-platforms-with-no-__int128-part2.patch \ | 18 | file://0001-Address-platforms-with-no-__int128-part2.patch \ |
19 | file://0001-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch \ | ||
19 | " | 20 | " |
20 | SRC_URI[md5sum] = "6313289e32f1d38a9df4770b014a2ca7" | 21 | SRC_URI[md5sum] = "6313289e32f1d38a9df4770b014a2ca7" |
21 | SRC_URI[sha256sum] = "72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056" | 22 | SRC_URI[sha256sum] = "72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056" |