Compare commits

...

16 Commits
master ... f36

Author SHA1 Message Date
Dan Horák 53030a5c0c bump release 2022-01-31 14:26:32 +01:00
Dan Horák acfefabea4 Fix handling Float128 structs on ppc64le (#2045797) 2022-01-31 09:42:05 +00:00
Fedora Release Engineering 53606fd875 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 16:12:26 +00:00
Miro Hrončok 5df3302f45 Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34 2022-01-08 10:26:48 +01:00
Carlos O'Donell 87574daa5c Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34 2021-09-15 17:26:30 -04:00
Carlos O'Donell 69db68caf1 Harmonize spec file layout with downstream. 2021-09-15 09:01:45 -04:00
Carlos O'Donell 91a1b2a09e Enable building. 2021-08-11 00:55:38 -04:00
Carlos O'Donell ed0518c208 Rebuild package and bump NEVRA. 2021-08-11 00:32:55 -04:00
Carlos O'Donell 382d13fd9f Prevent libffi 3.4 rebuild until after mass rebuild. 2021-07-22 11:00:44 -04:00
Fedora Release Engineering b50252019d - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 11:22:06 +00:00
Carlos O'Donell 18f0dfb3dd Fix %changelog typo. 2021-07-14 11:52:33 -04:00
Carlos O'Donell 4bc39b5505 Update to libff-3.4.2. 2021-06-28 22:11:50 -04:00
Fedora Release Engineering 16342320c7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 17:03:33 +00:00
Tom Stellard 94a646ef38 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-06 19:04:38 +00:00
Carlos O'Donell 7b37dc1150 Use make macros 2020-12-02 13:53:37 -05:00
Fedora Release Engineering fdac85aeb0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 04:38:28 +00:00
9 changed files with 84 additions and 115 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ libffi-3.0.9.tar.gz
/libffi-3.0.11.tar.gz
/libffi-3.0.13.tar.gz
/libffi-3.1.tar.gz
/libffi-3.4.2.tar.gz

View File

@ -1,11 +0,0 @@
--- a/src/aarch64/sysv.S
+++ b/src/aarch64/sysv.S
@@ -396,3 +396,8 @@
#ifdef __ELF__
.size CNAME(ffi_closure_SYSV), .-CNAME(ffi_closure_SYSV)
#endif
+
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",%progbits
+#endif
+

View File

@ -1,31 +0,0 @@
From 978c9540154d320525488db1b7049277122f736d Mon Sep 17 00:00:00 2001
From: Samuli Suominen <ssuominen@gentoo.org>
Date: Sat, 31 May 2014 08:53:10 -0400
Subject: [PATCH] Add missing GNU stack markings in win32.S
---
src/x86/win32.S | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/x86/win32.S b/src/x86/win32.S
index daf0e79..e42baf2 100644
--- a/src/x86/win32.S
+++ b/src/x86/win32.S
@@ -1,5 +1,6 @@
/* -----------------------------------------------------------------------
- win32.S - Copyright (c) 1996, 1998, 2001, 2002, 2009 Red Hat, Inc.
+ win32.S - Copyright (c) 2014 Anthony Green
+ Copyright (c) 1996, 1998, 2001, 2002, 2009 Red Hat, Inc.
Copyright (c) 2001 John Beniton
Copyright (c) 2002 Ranjit Mathew
Copyright (c) 2009 Daniel Witte
@@ -1304,3 +1305,6 @@ L_ffi_closure_SYSV_inner$stub:
#endif /* !_MSC_VER */
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif
--
1.9.3

View File

@ -1,17 +0,0 @@
diff -up libffi-3.1/libffi.pc.in.fixpath libffi-3.1/libffi.pc.in
--- libffi-3.1/libffi.pc.in.fixpath 2014-04-25 19:45:13.000000000 +0200
+++ libffi-3.1/libffi.pc.in 2014-06-12 12:06:06.000000000 +0200
@@ -1,11 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-toolexeclibdir=@toolexeclibdir@
-includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+includedir=@includedir@
Name: @PACKAGE_NAME@
Description: Library supporting Foreign Function Interfaces
Version: @PACKAGE_VERSION@
-Libs: -L${toolexeclibdir} -lffi
+Libs: -L${libdir} -lffi
Cflags: -I${includedir}

View File

@ -1,17 +0,0 @@
Most temp file directories need to be hardened against execution, but
libffi needs execute privileges. Add a libffi-specific temp directory
that can be set up by sysadmins as needed with suitable permissions.
This both ensures that libffi will have a valid temp directory to use
as well as preventing attempts to access other directories.
diff -rup a/src/closures.c b/src/closures.c
--- a/src/closures.c 2014-05-11 09:54:19.000000000 -0400
+++ b/src/closures.c 2020-04-29 20:50:00.454853909 -0400
@@ -362,6 +362,7 @@ static struct
const char *arg;
int repeat;
} open_temp_exec_file_opts[] = {
+ { open_temp_exec_file_env, "LIBFFI_TMPDIR", 0 },
{ open_temp_exec_file_env, "TMPDIR", 0 },
{ open_temp_exec_file_dir, "/tmp", 0 },
{ open_temp_exec_file_dir, "/var/tmp", 0 },

26
libffi-3.4.2-ppc.patch Normal file
View File

@ -0,0 +1,26 @@
From 83ce80f3194bbf95c39764d075b070389c0f8522 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Mon, 31 Jan 2022 09:21:53 +0000
Subject: [PATCH] powerpc64: fix handling of homogeneous float128 structs
If there is a homogeneous struct with float128 members, they should be
copied to vector register save area. The current code incorrectly copies
only the value of the first member, not increasing the pointer with each
iteration. Fix this.
---
src/powerpc/ffi_linux64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c
index 4d50878e4..3454dacd3 100644
--- a/src/powerpc/ffi_linux64.c
+++ b/src/powerpc/ffi_linux64.c
@@ -680,7 +680,7 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
{
if (vecarg_count < NUM_VEC_ARG_REGISTERS64
&& i < nfixedargs)
- memcpy (vec_base.f128++, arg.f128, sizeof (float128));
+ memcpy (vec_base.f128++, arg.f128++, sizeof (float128));
else
memcpy (next_arg.f128, arg.f128++, sizeof (float128));
if (++next_arg.f128 == gpr_end.f128)

View File

@ -1,11 +0,0 @@
--- libffi-3.1/src/aarch64/ffi.c.orig 2014-04-25 18:45:13.000000000 +0100
+++ libffi-3.1/src/aarch64/ffi.c 2015-01-15 02:36:56.314906455 +0000
@@ -728,7 +728,7 @@
state.ngrn = N_X_ARG_REG;
memcpy (allocate_to_stack (&state, stack, ty->alignment,
- ty->size), ecif->avalue + i, ty->size);
+ ty->size), ecif->avalue[i], ty->size);
}
break;

View File

@ -1,23 +1,22 @@
%bcond_with bootstrap
%global multilib_arches %{ix86} ppc ppc64 ppc64p7 s390 s390x x86_64
%global multilib_arches %{ix86} x86_64
Name: libffi
Version: 3.1
Release: 25%{?dist}
Version: 3.4.2
Release: 8%{?dist}
Summary: A portable foreign function interface library
License: MIT
URL: http://sourceware.org/libffi
Source0: ftp://sourceware.org/pub/libffi/libffi-%{version}.tar.gz
Source0: https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz
Source1: ffi-multilib.h
Source2: ffitarget-multilib.h
Patch0: libffi-3.1-fix-include-path.patch
Patch1: libffi-3.1-fix-exec-stack.patch
Patch2: libffi-aarch64-rhbz1174037.patch
Patch3: libffi-3.1-aarch64-fix-exec-stack.patch
Patch4: libffi-3.1-libffi_tmpdir.patch
# https://github.com/libffi/libffi/pull/689
Patch0: libffi-3.4.2-ppc.patch
BuildRequires: make
BuildRequires: gcc
%if %{without bootstrap}
BuildRequires: gcc-c++
@ -51,7 +50,6 @@ layer of a fully featured foreign function interface. A layer must
exist above `libffi' that handles type conversions for values passed
between the two languages.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
@ -61,18 +59,17 @@ Requires: pkgconfig
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1 -b .fixpath
%patch1 -p1 -b .execstack
%patch2 -p1 -b .aarch64
%patch3 -p1 -b .aarch64execstack
%patch4 -p1 -b .libffitmpdir
%autosetup -p1
%build
%configure --disable-static
make %{?_smp_mflags}
# For now we disable the static templates to avoid ghc and
# gobject-introspection failures:
# https://gitlab.haskell.org/ghc/ghc/-/issues/20051
# https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/283
# We need to get these fixes into Fedora before we can reeanble them.
%configure --disable-static --disable-exec-static-tramp
%make_build
%check
%if %{without bootstrap}
@ -80,7 +77,8 @@ make %{?_smp_mflags}
%endif
%install
make install DESTDIR=$RPM_BUILD_ROOT
%make_install
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
@ -96,22 +94,19 @@ mkdir -p $RPM_BUILD_ROOT%{_includedir}
# can have both a 32- and 64-bit version of the library, and they each need
# their own correct-but-different versions of the headers to be usable.
for i in ffi ffitarget; do
mv $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}/include/$i.h $RPM_BUILD_ROOT%{_includedir}/$i-${basearch}.h
mv $RPM_BUILD_ROOT%{_includedir}/$i.h $RPM_BUILD_ROOT%{_includedir}/$i-${basearch}.h
done
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/ffi.h
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/ffitarget.h
%else
mv $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}/include/{ffi,ffitarget}.h $RPM_BUILD_ROOT%{_includedir}
%endif
rm -rf $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}
%ldconfig_scriptlets
%files
%license LICENSE
%doc README
%{_libdir}/*.so.*
%doc README.md
%{_libdir}/libffi.so.8
%{_libdir}/libffi.so.8.1.0
%files devel
%{_libdir}/pkgconfig/*.pc
@ -121,6 +116,40 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/libffi-%{version}
%{_infodir}/libffi.info.*
%changelog
* Mon Jan 31 2022 Dan Horák <dan[at]danny.cz> - 3.4.2-8
- Fix handling Float128 structs on ppc64le (#2045797)
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 3.4.2-6
- Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34
* Wed Sep 15 2021 Carlos O'Donell <codonell@redhat.com> - 3.4.2-5
- Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34
* Wed Sep 15 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-4
- Harmonize spec file layout with downstream.
* Wed Aug 11 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-3
- Rebuild package and bump NEVRA.
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jun 28 2021 Carlos O'Donell <carlos@redhat.com> - 3.4.2-1
- Rebase to libffi 3.4.2.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Dec 02 2020 Carlos O'Donell <carlos@redhat.com> - 3.1-27
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Apr 30 2020 DJ Delorie <idj@redhat.com> - 3.1-25
- Add $LIBFFI_TMPDIR environment variable support (#1667620)

View File

@ -1 +1 @@
f5898b29bbfd70502831a212d9249d10 libffi-3.1.tar.gz
SHA512 (libffi-3.4.2.tar.gz) = 31bad35251bf5c0adb998c88ff065085ca6105cf22071b9bd4b5d5d69db4fadf16cadeec9baca944c4bb97b619b035bb8279de8794b922531fddeb0779eb7fb1