# # spec file for package libffi # # Copyright (c) 2024 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.6 Release: 1.1 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 # Fix BTI for aarch64 with PR 830 Patch1: https://github.com/libffi/libffi/pull/830.patch # 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 * Tue Mar 19 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 2023 Guillaume GARDET - Add upstream patches to fix BTI on aarch64: * 808.patch * 810.patch * Mon Oct 24 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 2022 Dirk Müller - add riscv64-handle-big-structures.patch * Fri Sep 23 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 2021 Dirk Müller - disable static trampolines (bsc#1193272) * Fri Nov 26 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 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 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 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 2018 rguenther@suse.com - Add libffi-devel-32bit package. * Mon Mar 12 2018 schwab@suse.de - libffi-riscv.patch: add support for RISC-V * Thu Feb 22 2018 fvogt@suse.com - Use %%license (boo#1082318) * Tue Feb 20 2018 schwab@suse.de - Remove aarch64-struct-by-value.patch, needs to be fixed in python. * Mon Sep 18 2017 schwab@suse.de - aarch64-struct-by-value.patch: fix passing struct by value on aarch64 * Tue Mar 14 2017 dleuenberger@suse.com - Add baselibs.conf in order to build libffi7-32bit (boo#1029263). * Tue Feb 28 2017 rguenther@suse.com - Change License to MIT. * Tue Feb 7 2017 jengelh@inai.de - Provide a _service file (and run it) * Tue Feb 7 2017 rguenther@suse.com - Package libffi from https://github.com/libffi at 60e4250a77eb3