From 7e7a4a74271498df7bac00cf09231d66771e4608a6838f9a86e7dfa7f406c345 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 19 Mar 2025 17:46:48 +0000 Subject: [PATCH 1/2] - Update to 3.4.7: - Drop upstreamed patch: * 830.patch OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libffi?expand=0&rev=36 --- .gitattributes | 23 ++++++ .gitignore | 1 + 830.patch | 89 +++++++++++++++++++++++ baselibs.conf | 3 + libffi-3.4.6.tar.gz | 3 + libffi-3.4.7.tar.gz | 3 + libffi.changes | 172 ++++++++++++++++++++++++++++++++++++++++++++ libffi.spec | 99 +++++++++++++++++++++++++ 8 files changed, 393 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 830.patch create mode 100644 baselibs.conf create mode 100644 libffi-3.4.6.tar.gz create mode 100644 libffi-3.4.7.tar.gz create mode 100644 libffi.changes create mode 100644 libffi.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/830.patch b/830.patch new file mode 100644 index 0000000..62f1d22 --- /dev/null +++ b/830.patch @@ -0,0 +1,89 @@ +From 38d1c9d783b2c3b2b271e66a712962ffbbf7b9a5 Mon Sep 17 00:00:00 2001 +From: Bill Roberts +Date: Thu, 7 Mar 2024 13:07:29 -0600 +Subject: [PATCH 1/3] bti: add identifier to ffi_closure_SYSV_V_alt + +This was missing BTI_C identifier. + +Old Code: +ffi_closure_SYSV_V_alt: +0000fffff7f70500: ldr x17, [sp, #8] + +Signed-off-by: Bill Roberts +--- + src/aarch64/sysv.S | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/aarch64/sysv.S b/src/aarch64/sysv.S +index fdd0e8b7..ba49aa13 100644 +--- a/src/aarch64/sysv.S ++++ b/src/aarch64/sysv.S +@@ -527,6 +527,7 @@ L(do_closure): + #if defined(FFI_EXEC_STATIC_TRAMP) + .align 4 + CNAME(ffi_closure_SYSV_V_alt): ++ BTI_C + /* See the comments above trampoline_code_table. */ + ldr x17, [sp, #8] /* Load closure in x17 */ + add sp, sp, #16 /* Restore the stack */ +@@ -541,6 +542,7 @@ CNAME(ffi_closure_SYSV_V_alt): + + .align 4 + CNAME(ffi_closure_SYSV_alt): ++ BTI_C + /* See the comments above trampoline_code_table. */ + ldr x17, [sp, #8] /* Load closure in x17 */ + add sp, sp, #16 /* Restore the stack */ + +From da2376df7618356e9ab792a8a3cc17ba02a3108a Mon Sep 17 00:00:00 2001 +From: Bill Roberts +Date: Thu, 7 Mar 2024 13:07:34 -0600 +Subject: [PATCH 2/3] testsuite: fix whitespace in Makefile.am + +Signed-off-by: Bill Roberts +--- + testsuite/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am +index d286cf7f..6ba98e12 100644 +--- a/testsuite/Makefile.am ++++ b/testsuite/Makefile.am +@@ -8,7 +8,7 @@ CLEANFILES = *.exe core* *.log *.sum + + EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \ + emscripten/node-tests.sh emscripten/test.html emscripten/test_libffi.py \ +- emscripten/build-tests.sh lib/libffi.exp lib/target-libpath.exp \ ++ emscripten/build-tests.sh lib/libffi.exp lib/target-libpath.exp \ + lib/wrapper.exp libffi.bhaible/Makefile libffi.bhaible/README \ + libffi.bhaible/alignof.h libffi.bhaible/bhaible.exp libffi.bhaible/test-call.c \ + libffi.bhaible/test-callback.c libffi.bhaible/testcases.c libffi.call/align_mixed.c \ + +From 243fc9e2a1ebcf60a90652ac1e0bc82a945760a5 Mon Sep 17 00:00:00 2001 +From: Bill Roberts +Date: Thu, 7 Mar 2024 13:03:13 -0600 +Subject: [PATCH 3/3] aarch64: correct comment describing BTI + +The comment is incorrect, BTI is enabled per mapping via mprotect with +PROT_BTI flag set, not per-process. When the loader loads the library, +if the GNU Notes section is missing this, PROT_BTI will not be enabled +for that mapping, but is independent of other mappings. + +Signed-off-by: Bill Roberts +--- + src/aarch64/sysv.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/aarch64/sysv.S b/src/aarch64/sysv.S +index ba49aa13..60cfa505 100644 +--- a/src/aarch64/sysv.S ++++ b/src/aarch64/sysv.S +@@ -68,7 +68,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + #define BTI_J hint #36 + /* + * The ELF Notes section needs to indicate if BTI is supported, as the first ELF loaded that doesn't +- * declare this support disables it for the whole process. ++ * declare this support disables it for memory region containing the loaded library. + */ + # define GNU_PROPERTY_AARCH64_BTI (1 << 0) /* Has Branch Target Identification */ + .text diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..9dcc2e1 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,3 @@ +libffi8 +libffi-devel + requires "libffi8- = " diff --git a/libffi-3.4.6.tar.gz b/libffi-3.4.6.tar.gz new file mode 100644 index 0000000..86221d1 --- /dev/null +++ b/libffi-3.4.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0dea9df23c863a7a50e825440f3ebffabd65df1497108e5d437747843895a4e +size 1391684 diff --git a/libffi-3.4.7.tar.gz b/libffi-3.4.7.tar.gz new file mode 100644 index 0000000..c76faa5 --- /dev/null +++ b/libffi-3.4.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:138607dee268bdecf374adf9144c00e839e38541f75f24a1fcf18b78fda48b2d +size 1393979 diff --git a/libffi.changes b/libffi.changes new file mode 100644 index 0000000..ccc1425 --- /dev/null +++ b/libffi.changes @@ -0,0 +1,172 @@ +------------------------------------------------------------------- +Wed Mar 19 17:40:33 UTC 2025 - Richard Biener + +- Update to 3.4.7: +- Drop upstreamed patch: + * 830.patch + +------------------------------------------------------------------- +Tue Mar 19 15:22:24 UTC 2024 - Guillaume GARDET + +- Add patches to fix BTI on aarch64: + * 830.patch +- Update to 3.4.6: + * Fix long double regression on mips64 and alpha. +- Update to 3.4.5: + * Add support for wasm32. + * Add support for aarch64 branch target identification (bti). + * Add support for ARCv3: ARC32 & ARC64. + * Add support for HPPA64, and many HPPA fixes. + * Add support for Haikuos on PowerPC. + * Fixes for AIX, loongson, MIPS, power, sparc64, and x86 Darwin. +- Drop upstreamed patches: + * 808.patch + * 810.patch + +------------------------------------------------------------------- +Wed Dec 6 09:11:47 UTC 2023 - Guillaume GARDET + +- Add upstream patches to fix BTI on aarch64: + * 808.patch + * 810.patch + +------------------------------------------------------------------- +Mon Oct 24 13:07:19 UTC 2022 - Andreas Schwab + +- Update to libffi 3.4.4 + * Important aarch64 fixes, including support for linux builds + with Link Time Optimization (-flto). + * Fix x86 stdcall stack alignment. + * Fix x86 Windows msvc assembler compatibility. + * Fix moxie and or1k small structure args. +- drop riscv64-handle-big-structures.patch +- reenable LTO + +------------------------------------------------------------------- +Mon Oct 10 09:46:39 UTC 2022 - Dirk Müller + +- add riscv64-handle-big-structures.patch + +------------------------------------------------------------------- +Fri Sep 23 13:17:48 UTC 2022 - Richard Biener + +- update to 3.4.3: + * All struct args are passed by value, regardless of size, as per ABIs. + * Enable static trampolines for Cygwin. + * Add support for Loongson's LoongArch64 architecture. + * Fix x32 static trampolines. + * Fix 32-bit x86 stdcall stack corruption. + * Fix ILP32 aarch64 support. +- includes fix for RISCV64 +- disable LTO due to (ffi#733) + +------------------------------------------------------------------- +Wed Dec 1 15:44:46 UTC 2021 - Dirk Müller + +- disable static trampolines (bsc#1193272) + +------------------------------------------------------------------- +Fri Nov 26 21:41:22 UTC 2021 - Dirk Müller + +- update to 3.4.2: + * Add static trampoline support for Linux on x86_64 and ARM64. + * Add support for Alibaba's CSKY architecture. + * Add support for Kalray's KVX architecture. + * Add support for Intel Control-flow Enforcement Technology (CET). + * Add support for ARM Pointer Authentication (PA). + * Fix 32-bit PPC regression. + * Fix MIPS soft-float problem. + * Enable tmpdir override with the $LIBFFI_TMPDIR environment variable. + * Enable compatibility with MSVC runtime stack checking. + * Reject float and small integer argument in ffi_prep_cif_var(). + * Callers must promote these types themselves. +- drop aarch64.patch: fixed upstream differently +- drop info dependency, uses file triggers now + +------------------------------------------------------------------- +Tue Mar 10 09:57:24 UTC 2020 - Richard Biener + +- Update to commit b844a9c7f1ca based on libffi 3.3 with the + following changes: + + Add RISC-V support. + New API in support of GO closures. + Add IEEE754 binary128 long double support for 64-bit Power + Default to Microsoft's 64 bit long double ABI with Visual C++. + GNU compiler uses 80 bits (128 in memory) FFI_GNUW64 ABI. + Add Windows on ARM64 (WOA) support. + Add Windows 32-bit ARM support. + Raw java (gcj) API deprecated. + Add pre-built PDF documentation to source distribution. + Many new test cases and bug fixes. + +- SONAME change to libffi.so.8 +- stdcall.patch is now upstream +- Adjust baselibs.conf for SONAME change +- Adjust aarch64.patch for upstream changes +- Drop gccbug.patch XFAILing testcases that now PASS with fixed + GCC 9.3 + +------------------------------------------------------------------- +Fri Oct 11 07:27:45 UTC 2019 - Guillaume GARDET + +- Workaround aarch64 bug (boo#1153573) with upstream patch + https://github.com/libffi/libffi/pull/499 updated to apply + on current sources (upstream will probably rework this patch + so we need to monitor the issue for the proper fix): + * aarch64.patch + +------------------------------------------------------------------- +Wed Sep 18 09:39:07 UTC 2019 - Andreas Schwab + +- Update to commit c2a6859 +- gccbug.patch: Update check for gccbug target flag +- stdcall.patch: Fix FFI_STDCALL ABI +- libffi-riscv.patch: Removed +- libffi-include-location.patch: Removed + +------------------------------------------------------------------- +Tue Oct 16 09:52:39 UTC 2018 - rguenther@suse.com + +- Add libffi-devel-32bit package. + +------------------------------------------------------------------- +Mon Mar 12 10:57:40 UTC 2018 - schwab@suse.de + +- libffi-riscv.patch: add support for RISC-V + +------------------------------------------------------------------- +Thu Feb 22 15:10:35 UTC 2018 - fvogt@suse.com + +- Use %license (boo#1082318) + +------------------------------------------------------------------- +Tue Feb 20 09:55:15 UTC 2018 - schwab@suse.de + +- Remove aarch64-struct-by-value.patch, needs to be fixed in python. + +------------------------------------------------------------------- +Mon Sep 18 10:46:22 UTC 2017 - schwab@suse.de + +- aarch64-struct-by-value.patch: fix passing struct by value on aarch64 + +------------------------------------------------------------------- +Tue Mar 14 08:14:20 UTC 2017 - dleuenberger@suse.com + +- Add baselibs.conf in order to build libffi7-32bit (boo#1029263). + +------------------------------------------------------------------- +Tue Feb 28 14:51:07 UTC 2017 - rguenther@suse.com + +- Change License to MIT. + +------------------------------------------------------------------- +Tue Feb 7 23:21:39 UTC 2017 - jengelh@inai.de + +- Provide a _service file (and run it) + +------------------------------------------------------------------- +Tue Feb 7 09:10:05 UTC 2017 - rguenther@suse.com + +- Package libffi from https://github.com/libffi at 60e4250a77eb3 + diff --git a/libffi.spec b/libffi.spec new file mode 100644 index 0000000..071c948 --- /dev/null +++ b/libffi.spec @@ -0,0 +1,99 @@ +# +# spec file for package libffi +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define libffi_sover 8 +Name: libffi +Version: 3.4.7 +Release: 0 +Summary: Foreign Function Interface Library +License: MIT +Group: Development/Languages/C and C++ +URL: https://sourceware.org/libffi/ +Source: https://github.com/libffi/libffi/releases/download/v%{version}/libffi-%{version}.tar.gz +Source99: baselibs.conf +# for make check +BuildRequires: dejagnu +BuildRequires: expect +BuildRequires: gcc-c++ +BuildRequires: makeinfo +BuildRequires: pkgconfig + +%description +The libffi library provides a portable, high level programming +interface to various calling conventions. This allows a programmer to +call any function specified by a call interface description at run +time. + +%package devel +Summary: Include files for development with libffi +Group: Development/Languages/C and C++ +Requires: libffi%{libffi_sover} = %{version} + +%description devel +The libffi library provides a portable, high level programming +interface to various calling conventions. This allows a programmer to +call any function specified by a call interface description at run +time. + +%package -n libffi%{libffi_sover} +Summary: Foreign Function Interface Library +Group: System/Libraries + +%description -n libffi%{libffi_sover} +The libffi library provides a portable, high level programming +interface to various calling conventions. This allows a programmer to +call any function specified by a call interface description at run +time. + +%post -n libffi%{libffi_sover} -p /sbin/ldconfig +%postun -n libffi%{libffi_sover} -p /sbin/ldconfig + +%prep +%autosetup -p1 + +%build +# https://github.com/libffi/libffi/pull/647 +%configure --disable-exec-static-tramp +%make_build + +%check +# do not disable "make check", FIX THE BUGS! +%make_build check + +%install +%make_install +# do not package the static library +rm %{buildroot}%{_libdir}/libffi.a +rm %{buildroot}%{_libdir}/libffi.la + +%files devel +%{_libdir}/libffi.so +%{_includedir}/ffi.h +%{_includedir}/ffitarget.h +%{_libdir}/pkgconfig/libffi.pc +%{_mandir}/man3/ffi.3%{?ext_man} +%{_mandir}/man3/ffi_call.3%{?ext_man} +%{_mandir}/man3/ffi_prep_cif.3%{?ext_man} +%{_mandir}/man3/ffi_prep_cif_var.3%{?ext_man} +%{_infodir}/libffi.info%{?ext_info} + +%files -n libffi%{libffi_sover} +%license LICENSE +%{_libdir}/libffi.so.%{libffi_sover}* + +%changelog -- 2.51.1 From d6df70594832a23ef5a6e77baf4c420d2bda70ba1fa7d68c37b68778adc17e08 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 4 Sep 2025 07:49:46 +0000 Subject: [PATCH 2/2] Accepting request 1302677 from Java:bootstrap 3.5.2 OBS-URL: https://build.opensuse.org/request/show/1302677 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libffi?expand=0&rev=38 --- .gitattributes | 23 +++++ .gitignore | 1 + baselibs.conf | 3 + libffi-3.5.2.tar.gz | 3 + libffi.changes | 213 ++++++++++++++++++++++++++++++++++++++++++++ libffi.spec | 102 +++++++++++++++++++++ 6 files changed, 345 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 baselibs.conf create mode 100644 libffi-3.5.2.tar.gz create mode 100644 libffi.changes create mode 100644 libffi.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..9dcc2e1 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,3 @@ +libffi8 +libffi-devel + requires "libffi8- = " diff --git a/libffi-3.5.2.tar.gz b/libffi-3.5.2.tar.gz new file mode 100644 index 0000000..759c57f --- /dev/null +++ b/libffi-3.5.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc +size 1423124 diff --git a/libffi.changes b/libffi.changes new file mode 100644 index 0000000..53b6099 --- /dev/null +++ b/libffi.changes @@ -0,0 +1,213 @@ +------------------------------------------------------------------- +Thu Sep 4 07:14:03 UTC 2025 - Fridrich Strba + +- Update to 3.5.2 + * Changes + + fix: enable FFI_MMAP_EXEC_WRIT for DragonFly BSD + + Emscripten: Add wasm64 target + + fix: Ensure trampoline file descriptors are closed on exec. + +------------------------------------------------------------------- +Thu Sep 4 07:12:20 UTC 2025 - Fridrich Strba + +- Update to 3.5.1 + * Changes + + Downgrade Autoconf requirement to version 2.68 + + Fix symbol versioning error. + +------------------------------------------------------------------- +Thu Sep 4 07:10:42 UTC 2025 - Fridrich Strba + +- Update to 3.5.0 + * Changes + + Add FFI_VERSION_STRING and FFI_VERSION_NUMBER macros, as well + as ffi_get_version() and ffi_get_version_number() functions. + + Add ffi_get_default_abi() and ffi_get_closure_size() functions. + + Fix closures on powerpc64-linux when statically linking. + + Mark the PA stack as non-executable. + +------------------------------------------------------------------- +Wed Sep 3 11:40:13 UTC 2025 - Fridrich Strba + +- Update to 3.4.8 + * Changes + + aarch64: add PAC to GNU Notes + + MIPS: Dont import asm/sgidefs.h on linux + + Update the Simple Example from the Docs to fix a compile error + + Fix bugs in the x86-64 and x32 target (#887) + + Add the "ABI_ATTR" attribute to called functions (#891) + + powerpc: Add static trampoline support (#894) + + testsuite: add two tests to Makefile.am + +------------------------------------------------------------------- +Wed Mar 19 17:40:33 UTC 2025 - Richard Biener + +- Update to 3.4.7: +- Drop upstreamed patch: + * 830.patch + +------------------------------------------------------------------- +Tue Mar 19 15:22:24 UTC 2024 - Guillaume GARDET + +- Add patches to fix BTI on aarch64: + * 830.patch +- Update to 3.4.6: + * Fix long double regression on mips64 and alpha. +- Update to 3.4.5: + * Add support for wasm32. + * Add support for aarch64 branch target identification (bti). + * Add support for ARCv3: ARC32 & ARC64. + * Add support for HPPA64, and many HPPA fixes. + * Add support for Haikuos on PowerPC. + * Fixes for AIX, loongson, MIPS, power, sparc64, and x86 Darwin. +- Drop upstreamed patches: + * 808.patch + * 810.patch + +------------------------------------------------------------------- +Wed Dec 6 09:11:47 UTC 2023 - Guillaume GARDET + +- Add upstream patches to fix BTI on aarch64: + * 808.patch + * 810.patch + +------------------------------------------------------------------- +Mon Oct 24 13:07:19 UTC 2022 - Andreas Schwab + +- Update to libffi 3.4.4 + * Important aarch64 fixes, including support for linux builds + with Link Time Optimization (-flto). + * Fix x86 stdcall stack alignment. + * Fix x86 Windows msvc assembler compatibility. + * Fix moxie and or1k small structure args. +- drop riscv64-handle-big-structures.patch +- reenable LTO + +------------------------------------------------------------------- +Mon Oct 10 09:46:39 UTC 2022 - Dirk Müller + +- add riscv64-handle-big-structures.patch + +------------------------------------------------------------------- +Fri Sep 23 13:17:48 UTC 2022 - Richard Biener + +- update to 3.4.3: + * All struct args are passed by value, regardless of size, as per ABIs. + * Enable static trampolines for Cygwin. + * Add support for Loongson's LoongArch64 architecture. + * Fix x32 static trampolines. + * Fix 32-bit x86 stdcall stack corruption. + * Fix ILP32 aarch64 support. +- includes fix for RISCV64 +- disable LTO due to (ffi#733) + +------------------------------------------------------------------- +Wed Dec 1 15:44:46 UTC 2021 - Dirk Müller + +- disable static trampolines (bsc#1193272) + +------------------------------------------------------------------- +Fri Nov 26 21:41:22 UTC 2021 - Dirk Müller + +- update to 3.4.2: + * Add static trampoline support for Linux on x86_64 and ARM64. + * Add support for Alibaba's CSKY architecture. + * Add support for Kalray's KVX architecture. + * Add support for Intel Control-flow Enforcement Technology (CET). + * Add support for ARM Pointer Authentication (PA). + * Fix 32-bit PPC regression. + * Fix MIPS soft-float problem. + * Enable tmpdir override with the $LIBFFI_TMPDIR environment variable. + * Enable compatibility with MSVC runtime stack checking. + * Reject float and small integer argument in ffi_prep_cif_var(). + * Callers must promote these types themselves. +- drop aarch64.patch: fixed upstream differently +- drop info dependency, uses file triggers now + +------------------------------------------------------------------- +Tue Mar 10 09:57:24 UTC 2020 - Richard Biener + +- Update to commit b844a9c7f1ca based on libffi 3.3 with the + following changes: + + Add RISC-V support. + New API in support of GO closures. + Add IEEE754 binary128 long double support for 64-bit Power + Default to Microsoft's 64 bit long double ABI with Visual C++. + GNU compiler uses 80 bits (128 in memory) FFI_GNUW64 ABI. + Add Windows on ARM64 (WOA) support. + Add Windows 32-bit ARM support. + Raw java (gcj) API deprecated. + Add pre-built PDF documentation to source distribution. + Many new test cases and bug fixes. + +- SONAME change to libffi.so.8 +- stdcall.patch is now upstream +- Adjust baselibs.conf for SONAME change +- Adjust aarch64.patch for upstream changes +- Drop gccbug.patch XFAILing testcases that now PASS with fixed + GCC 9.3 + +------------------------------------------------------------------- +Fri Oct 11 07:27:45 UTC 2019 - Guillaume GARDET + +- Workaround aarch64 bug (boo#1153573) with upstream patch + https://github.com/libffi/libffi/pull/499 updated to apply + on current sources (upstream will probably rework this patch + so we need to monitor the issue for the proper fix): + * aarch64.patch + +------------------------------------------------------------------- +Wed Sep 18 09:39:07 UTC 2019 - Andreas Schwab + +- Update to commit c2a6859 +- gccbug.patch: Update check for gccbug target flag +- stdcall.patch: Fix FFI_STDCALL ABI +- libffi-riscv.patch: Removed +- libffi-include-location.patch: Removed + +------------------------------------------------------------------- +Tue Oct 16 09:52:39 UTC 2018 - rguenther@suse.com + +- Add libffi-devel-32bit package. + +------------------------------------------------------------------- +Mon Mar 12 10:57:40 UTC 2018 - schwab@suse.de + +- libffi-riscv.patch: add support for RISC-V + +------------------------------------------------------------------- +Thu Feb 22 15:10:35 UTC 2018 - fvogt@suse.com + +- Use %license (boo#1082318) + +------------------------------------------------------------------- +Tue Feb 20 09:55:15 UTC 2018 - schwab@suse.de + +- Remove aarch64-struct-by-value.patch, needs to be fixed in python. + +------------------------------------------------------------------- +Mon Sep 18 10:46:22 UTC 2017 - schwab@suse.de + +- aarch64-struct-by-value.patch: fix passing struct by value on aarch64 + +------------------------------------------------------------------- +Tue Mar 14 08:14:20 UTC 2017 - dleuenberger@suse.com + +- Add baselibs.conf in order to build libffi7-32bit (boo#1029263). + +------------------------------------------------------------------- +Tue Feb 28 14:51:07 UTC 2017 - rguenther@suse.com + +- Change License to MIT. + +------------------------------------------------------------------- +Tue Feb 7 23:21:39 UTC 2017 - jengelh@inai.de + +- Provide a _service file (and run it) + +------------------------------------------------------------------- +Tue Feb 7 09:10:05 UTC 2017 - rguenther@suse.com + +- Package libffi from https://github.com/libffi at 60e4250a77eb3 + diff --git a/libffi.spec b/libffi.spec new file mode 100644 index 0000000..a8c7f79 --- /dev/null +++ b/libffi.spec @@ -0,0 +1,102 @@ +# +# spec file for package libffi +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%ifarch %ix86 +%define _lto_cflags %{nil} +%endif +%define libffi_sover 8 +Name: libffi +Version: 3.5.2 +Release: 0 +Summary: Foreign Function Interface Library +License: MIT +Group: Development/Languages/C and C++ +URL: https://sourceware.org/libffi/ +Source: https://github.com/libffi/libffi/releases/download/v%{version}/libffi-%{version}.tar.gz +Source99: baselibs.conf +# for make check +BuildRequires: dejagnu +BuildRequires: expect +BuildRequires: gcc-c++ +BuildRequires: makeinfo +BuildRequires: pkgconfig + +%description +The libffi library provides a portable, high level programming +interface to various calling conventions. This allows a programmer to +call any function specified by a call interface description at run +time. + +%package devel +Summary: Include files for development with libffi +Group: Development/Languages/C and C++ +Requires: libffi%{libffi_sover} = %{version} + +%description devel +The libffi library provides a portable, high level programming +interface to various calling conventions. This allows a programmer to +call any function specified by a call interface description at run +time. + +%package -n libffi%{libffi_sover} +Summary: Foreign Function Interface Library +Group: System/Libraries + +%description -n libffi%{libffi_sover} +The libffi library provides a portable, high level programming +interface to various calling conventions. This allows a programmer to +call any function specified by a call interface description at run +time. + +%post -n libffi%{libffi_sover} -p /sbin/ldconfig +%postun -n libffi%{libffi_sover} -p /sbin/ldconfig + +%prep +%autosetup -p1 + +%build +# https://github.com/libffi/libffi/pull/647 +%configure --disable-exec-static-tramp +%make_build + +%check +# do not disable "make check", FIX THE BUGS! +%make_build check + +%install +%make_install +# do not package the static library +rm %{buildroot}%{_libdir}/libffi.a +rm %{buildroot}%{_libdir}/libffi.la + +%files devel +%{_libdir}/libffi.so +%{_includedir}/ffi.h +%{_includedir}/ffitarget.h +%{_libdir}/pkgconfig/libffi.pc +%{_mandir}/man3/ffi.3%{?ext_man} +%{_mandir}/man3/ffi_call.3%{?ext_man} +%{_mandir}/man3/ffi_prep_cif.3%{?ext_man} +%{_mandir}/man3/ffi_prep_cif_var.3%{?ext_man} +%{_infodir}/libffi.info%{?ext_info} + +%files -n libffi%{libffi_sover} +%license LICENSE +%{_libdir}/libffi.so.%{libffi_sover}* + +%changelog -- 2.51.1