Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libffi: Update to 3.4.7 #5210

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions libffi/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pkgbase=libffi
pkgname=('libffi' 'libffi-devel')
pkgver=3.4.6
pkgver=3.4.7
pkgrel=1
pkgdesc="Portable, high level programming interface to various calling conventions"
arch=('i686' 'x86_64')
Expand All @@ -16,12 +16,18 @@ license=('MIT')
depends=()
checkdepends=('dejagnu')
makedepends=('autotools' 'gcc')
source=(https://github.com/libffi/libffi/releases/download/v$pkgver/libffi-$pkgver.tar.gz)
sha256sums=('b0dea9df23c863a7a50e825440f3ebffabd65df1497108e5d437747843895a4e')
source=(https://github.com/libffi/libffi/releases/download/v$pkgver/libffi-$pkgver.tar.gz
libffi-3.4.7-Revert-Fix-x86-ffi64-calls-with-6-gp-and-some-sse-re.patch)
sha256sums=('138607dee268bdecf374adf9144c00e839e38541f75f24a1fcf18b78fda48b2d'
'4bdd412d13639c52993eb8e81a65764631d7cf2204d5e44201d232f760e61621')

prepare() {
cd ${pkgname}-${pkgver}

# https://lore.kernel.org/distributions/[email protected]/T/#u
# https://github.com/libffi/libffi/issues/879
patch -Np1 -i ../libffi-3.4.7-Revert-Fix-x86-ffi64-calls-with-6-gp-and-some-sse-re.patch

autoreconf -vfi
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 4354fe1434a37b781ff19f5a6be51ec4e982ad5a Mon Sep 17 00:00:00 2001
Message-ID: <4354fe1434a37b781ff19f5a6be51ec4e982ad5a.1739062746.git.sam@gentoo.org>
From: Sam James <[email protected]>
Date: Sun, 9 Feb 2025 00:54:28 +0000
Subject: [PATCH] Revert "Fix x86/ffi64 calls with 6 gp and some sse registers
(#848)"

This reverts commit d21881f55ed4a44d464c9091871e69b0bb47611a.

Bug: https://github.com/libffi/libffi/issues/879
Bug: https://bugs.gentoo.org/949051
Signed-off-by: Sam James <[email protected]>
--- a/src/x86/ffi64.c
+++ b/src/x86/ffi64.c
@@ -654,7 +654,7 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
break;
default:
reg_args->gpr[gprcount] = 0;
- memcpy (&reg_args->gpr[gprcount], a, sizeof(UINT64));
+ memcpy (&reg_args->gpr[gprcount], a, size);
}
gprcount++;
break;
--- a/testsuite/libffi.call/struct_int_float.c
+++ b/testsuite/libffi.call/struct_int_float.c
@@ -5,6 +5,7 @@
Originator: kellda */

/* { dg-do run } */
+/* { dg-skip-if "libffi bug #879" { *-*-* } { "*" } } */
#include "ffitest.h"

typedef struct

base-commit: 1716f81e9a115d340429504563bc8e7fb2eeef2b
--
2.48.1