-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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') | ||
|
@@ -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 | ||
} | ||
|
||
|
38 changes: 38 additions & 0 deletions
38
libffi/libffi-3.4.7-Revert-Fix-x86-ffi64-calls-with-6-gp-and-some-sse-re.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 (®_args->gpr[gprcount], a, sizeof(UINT64)); | ||
+ memcpy (®_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 | ||
|