Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libffi for openSUSE:Factory checked in at 2022-09-28 17:51:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libffi (Old) and /work/SRC/openSUSE:Factory/.libffi.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libffi" Wed Sep 28 17:51:07 2022 rev:11 rq:1006099 version:3.4.2 Changes: -------- --- /work/SRC/openSUSE:Factory/libffi/libffi.changes 2021-12-09 19:44:52.453112024 +0100 +++ /work/SRC/openSUSE:Factory/.libffi.new.2275/libffi.changes 2022-09-28 17:51:08.331158131 +0200 @@ -1,0 +2,5 @@ +Fri Sep 23 12:48:15 UTC 2022 - Dirk M??ller <[email protected]> + +- add riscv-rvalue-ext.patch to fix libffi for RISCV64 + +------------------------------------------------------------------- New: ---- riscv-rvalue-ext.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libffi.spec ++++++ --- /var/tmp/diff_new_pack.HKPZWJ/_old 2022-09-28 17:51:09.551160585 +0200 +++ /var/tmp/diff_new_pack.HKPZWJ/_new 2022-09-28 17:51:09.555160593 +0200 @@ -1,7 +1,7 @@ # # spec file for package libffi # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,7 @@ URL: https://sourceware.org/libffi/ Source: https://github.com/libffi/libffi/releases/download/v%{version}/libffi-%{version}.tar.gz Source99: baselibs.conf +Patch24301: riscv-rvalue-ext.patch # for make check BuildRequires: dejagnu BuildRequires: expect @@ -64,7 +65,7 @@ %postun -n libffi%{libffi_sover} -p /sbin/ldconfig %prep -%setup -q +%autosetup -p1 %build # https://github.com/libffi/libffi/pull/647 ++++++ riscv-rvalue-ext.patch ++++++ >From 1bb79549b68e223c18bbc979d56879c82f0eba53 Mon Sep 17 00:00:00 2001 From: Andreas Schwab <[email protected]> Date: Thu, 9 Dec 2021 23:03:30 +0100 Subject: [PATCH] riscv: extend return types smaller than ffi_arg --- src/riscv/ffi.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/riscv/ffi.c b/src/riscv/ffi.c index c910858..ebd05ba 100644 --- a/src/riscv/ffi.c +++ b/src/riscv/ffi.c @@ -373,7 +373,32 @@ ffi_call_int (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue, cb.used_float = cb.used_integer = 0; if (!return_by_ref && rvalue) - unmarshal(&cb, cif->rtype, 0, rvalue); + { + if (IS_INT(cif->rtype->type) + && cif->rtype->size < sizeof (ffi_arg)) + { + /* Integer types smaller than ffi_arg need to be extended. */ + switch (cif->rtype->type) + { + case FFI_TYPE_SINT8: + case FFI_TYPE_SINT16: + case FFI_TYPE_SINT32: + unmarshal_atom (&cb, (sizeof (ffi_arg) > 4 + ? FFI_TYPE_SINT64 : FFI_TYPE_SINT32), + rvalue); + break; + case FFI_TYPE_UINT8: + case FFI_TYPE_UINT16: + case FFI_TYPE_UINT32: + unmarshal_atom (&cb, (sizeof (ffi_arg) > 4 + ? FFI_TYPE_UINT64 : FFI_TYPE_UINT32), + rvalue); + break; + } + } + else + unmarshal(&cb, cif->rtype, 0, rvalue); + } } void -- 2.34.0
