mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-06 19:09:27 +01:00
gnu: libffi: Update to 3.4.2.
* gnu/packages/libffi.scm (libffi): Update to 3.4.2. [source](patches): Remove. * gnu/packages/patches/libffi-3.3-powerpc-fixes.patch, gnu/packages/patches/libffi-float128-powerpc64le.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
This commit is contained in:
parent
c9e78e9023
commit
ca88640a45
4 changed files with 4 additions and 203 deletions
|
@ -1334,8 +1334,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/julia-tracker-16-compat.patch \
|
%D%/packages/patches/julia-tracker-16-compat.patch \
|
||||||
%D%/packages/patches/julia-allow-parallel-build.patch \
|
%D%/packages/patches/julia-allow-parallel-build.patch \
|
||||||
%D%/packages/patches/kdbusaddons-kinit-file-name.patch \
|
%D%/packages/patches/kdbusaddons-kinit-file-name.patch \
|
||||||
%D%/packages/patches/libffi-3.3-powerpc-fixes.patch \
|
|
||||||
%D%/packages/patches/libffi-float128-powerpc64le.patch \
|
|
||||||
%D%/packages/patches/libobjc2-unbundle-robin-map.patch \
|
%D%/packages/patches/libobjc2-unbundle-robin-map.patch \
|
||||||
%D%/packages/patches/librime-fix-build-with-gcc10.patch \
|
%D%/packages/patches/librime-fix-build-with-gcc10.patch \
|
||||||
%D%/packages/patches/libvirt-add-install-prefix.patch \
|
%D%/packages/patches/libvirt-add-install-prefix.patch \
|
||||||
|
|
|
@ -43,17 +43,16 @@
|
||||||
(define-public libffi
|
(define-public libffi
|
||||||
(package
|
(package
|
||||||
(name "libffi")
|
(name "libffi")
|
||||||
(version "3.3")
|
(version "3.4.2")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri
|
(uri
|
||||||
(string-append "ftp://sourceware.org/pub/libffi/"
|
(string-append "https://github.com/libffi/libffi/releases"
|
||||||
|
"/download/v" version "/"
|
||||||
name "-" version ".tar.gz"))
|
name "-" version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj"))
|
"081nx7wpzds168jbr59m34n6s3lyiq6r8zggvqxvlslsc4hvf3sl"))))
|
||||||
(patches (search-patches "libffi-3.3-powerpc-fixes.patch"
|
|
||||||
"libffi-float128-powerpc64le.patch"))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(;; Prevent the build system from passing -march and -mtune to the
|
`(;; Prevent the build system from passing -march and -mtune to the
|
||||||
|
|
|
@ -1,138 +0,0 @@
|
||||||
This is a combination of the following 4 commits:
|
|
||||||
https://github.com/libffi/libffi/commit/01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd.patch
|
|
||||||
https://github.com/libffi/libffi/commit/6663047f56c2932a6b10a790f4ac6666dd181326.patch
|
|
||||||
https://github.com/libffi/libffi/commit/e50b9ef8b910fa642ef158f6642e60d54d7ad740.patch
|
|
||||||
https://github.com/libffi/libffi/commit/4d6d2866ae43e55325e8ee96561221804602cd7a.patch
|
|
||||||
|
|
||||||
From 2dbfa92a95e3bacabca431b89d2a5925e48a0e40 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sergei Trofimovich <slyfox@gentoo.org>
|
|
||||||
Date: Thu, 28 Nov 2019 12:42:41 +0000
|
|
||||||
|
|
||||||
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 <slyfox@gentoo.org>
|
|
||||||
|
|
||||||
Address platforms with no __int128.
|
|
||||||
|
|
||||||
powerpc64: Use memcpy to help platforms with no __int128. (#534)
|
|
||||||
|
|
||||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
||||||
|
|
||||||
Update powerpc sysv assembly for ffi_powerpc.h changes (#541)
|
|
||||||
|
|
||||||
Some of the flag bits were moved when adding powerpc64 vector support.
|
|
||||||
|
|
||||||
Fixes #536
|
|
||||||
---
|
|
||||||
src/powerpc/ffi_linux64.c | 12 ++++++------
|
|
||||||
src/powerpc/ffi_powerpc.h | 2 +-
|
|
||||||
src/powerpc/sysv.S | 12 +++++-------
|
|
||||||
3 files changed, 12 insertions(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c
|
|
||||||
index de0d033..4d50878 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++;
|
|
||||||
@@ -680,9 +680,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|
||||||
{
|
|
||||||
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/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/src/powerpc/sysv.S b/src/powerpc/sysv.S
|
|
||||||
index 1474ce7..df97734 100644
|
|
||||||
--- a/src/powerpc/sysv.S
|
|
||||||
+++ b/src/powerpc/sysv.S
|
|
||||||
@@ -104,17 +104,16 @@ ENTRY(ffi_call_SYSV)
|
|
||||||
bctrl
|
|
||||||
|
|
||||||
/* Now, deal with the return value. */
|
|
||||||
- mtcrf 0x01,%r31 /* cr7 */
|
|
||||||
+ mtcrf 0x03,%r31 /* cr6-cr7 */
|
|
||||||
bt- 31,L(small_struct_return_value)
|
|
||||||
bt- 30,L(done_return_value)
|
|
||||||
#ifndef __NO_FPRS__
|
|
||||||
bt- 29,L(fp_return_value)
|
|
||||||
#endif
|
|
||||||
stw %r3,0(%r30)
|
|
||||||
- bf+ 28,L(done_return_value)
|
|
||||||
+ bf+ 27,L(done_return_value)
|
|
||||||
stw %r4,4(%r30)
|
|
||||||
- mtcrf 0x02,%r31 /* cr6 */
|
|
||||||
- bf 27,L(done_return_value)
|
|
||||||
+ bf 26,L(done_return_value)
|
|
||||||
stw %r5,8(%r30)
|
|
||||||
stw %r6,12(%r30)
|
|
||||||
/* Fall through... */
|
|
||||||
@@ -145,10 +144,9 @@ L(done_return_value):
|
|
||||||
#ifndef __NO_FPRS__
|
|
||||||
L(fp_return_value):
|
|
||||||
.cfi_restore_state
|
|
||||||
- bf 28,L(float_return_value)
|
|
||||||
+ bf 27,L(float_return_value)
|
|
||||||
stfd %f1,0(%r30)
|
|
||||||
- mtcrf 0x02,%r31 /* cr6 */
|
|
||||||
- bf 27,L(done_return_value)
|
|
||||||
+ bf 26,L(done_return_value)
|
|
||||||
stfd %f2,8(%r30)
|
|
||||||
b L(done_return_value)
|
|
||||||
L(float_return_value):
|
|
||||||
--
|
|
||||||
2.26.0
|
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
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
|
|
||||||
|
|
||||||
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 8e2f2f0e..960a5c42 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;
|
|
Loading…
Add table
Reference in a new issue