mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
libffi: fix v3.3 compile on ppc64le
The latest released version of libffi no longer compiles on ppc64le based machines. Some searching found a patch that fixed our issue but had not been submitted upstream to libffi. It has now been submitted upstream with this PR: https://github.com/libffi/libffi/pull/561 (From OE-Core rev: 76001bd4ae1e4f153f3d670b19e9ccd39c9fc4ef) Signed-off-by: Andrew Geissler <geissonator@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
2434bf3925
commit
11e7f09d60
@@ -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)
|
||||
|
||||
@@ -16,6 +16,7 @@ SRC_URI = "https://github.com/libffi/libffi/releases/download/v${PV}/${BPN}-${PV
|
||||
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] = "6313289e32f1d38a9df4770b014a2ca7"
|
||||
SRC_URI[sha256sum] = "72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056"
|
||||
|
||||
Reference in New Issue
Block a user