From 9f8ca6d3117e93e510b62c04d5f4aa8bad21f220 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 04 2021 09:14:27 +0000 Subject: import mingw-libffi-3.1-13.el9 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..203c8ad --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/libffi-3.1.tar.gz diff --git a/.mingw-libffi.metadata b/.mingw-libffi.metadata new file mode 100644 index 0000000..6d7e282 --- /dev/null +++ b/.mingw-libffi.metadata @@ -0,0 +1 @@ +cb373ef2115ec7c57913b84ca72eee14b10ccdc3 SOURCES/libffi-3.1.tar.gz diff --git a/SOURCES/libffi-3.1-aarch64-fix-exec-stack.patch b/SOURCES/libffi-3.1-aarch64-fix-exec-stack.patch new file mode 100644 index 0000000..e20c920 --- /dev/null +++ b/SOURCES/libffi-3.1-aarch64-fix-exec-stack.patch @@ -0,0 +1,11 @@ +--- 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 ++ diff --git a/SOURCES/libffi-3.1-fix-exec-stack.patch b/SOURCES/libffi-3.1-fix-exec-stack.patch new file mode 100644 index 0000000..4c2a59f --- /dev/null +++ b/SOURCES/libffi-3.1-fix-exec-stack.patch @@ -0,0 +1,31 @@ +From 978c9540154d320525488db1b7049277122f736d Mon Sep 17 00:00:00 2001 +From: Samuli Suominen +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 + diff --git a/SOURCES/libffi-aarch64-rhbz1174037.patch b/SOURCES/libffi-aarch64-rhbz1174037.patch new file mode 100644 index 0000000..dbf6308 --- /dev/null +++ b/SOURCES/libffi-aarch64-rhbz1174037.patch @@ -0,0 +1,11 @@ +--- 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; + diff --git a/SPECS/mingw-libffi.spec b/SPECS/mingw-libffi.spec new file mode 100644 index 0000000..ee6cd2a --- /dev/null +++ b/SPECS/mingw-libffi.spec @@ -0,0 +1,204 @@ +%?mingw_package_header + +Name: mingw-libffi +Version: 3.1 +Release: 13%{?dist} +Summary: A portable foreign function interface library for MinGW + +License: BSD +URL: http://sourceware.org/libffi +Source0: ftp://sourceware.org/pub/libffi/libffi-%{version}.tar.gz + +Patch0: libffi-3.1-fix-exec-stack.patch +Patch1: libffi-aarch64-rhbz1174037.patch +Patch2: libffi-3.1-aarch64-fix-exec-stack.patch + +BuildArch: noarch + +BuildRequires: make +BuildRequires: mingw32-filesystem >= 95 +BuildRequires: mingw32-binutils +BuildRequires: mingw32-gcc + +BuildRequires: mingw64-filesystem >= 95 +BuildRequires: mingw64-binutils +BuildRequires: mingw64-gcc + + +%description +Foreign function interface library for MinGW. + + +# Win32 +%package -n mingw32-libffi +Summary: A portable foreign function interface library for MinGW + +%description -n mingw32-libffi +Foreign function interface library for MinGW. + +# Win32 static +%package -n mingw32-libffi-static +Summary: A portable foreign function interface static library for MinGW + +%description -n mingw32-libffi-static +Foreign function interface static library for MinGW. + + +# Win64 +%package -n mingw64-libffi +Summary: A portable foreign function interface library for MinGW + +%description -n mingw64-libffi +Foreign function interface library for MinGW. + +# Win64 static +%package -n mingw64-libffi-static +Summary: A portable foreign function interface static library for MinGW + +%description -n mingw64-libffi-static +Foreign function interface static library for MinGW. + + +%?mingw_debug_package + + +%prep +%autosetup -p1 -n libffi-%{version} + +%build +%mingw_configure --enable-shared +%mingw_make %{?_smp_mflags} + + +%install +%mingw_make_install DESTDIR=$RPM_BUILD_ROOT + +rm -rf $RPM_BUILD_ROOT%{mingw32_infodir} +rm -rf $RPM_BUILD_ROOT%{mingw64_infodir} +rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} +rm -rf $RPM_BUILD_ROOT%{mingw64_mandir} + +# Drop all .la files +find $RPM_BUILD_ROOT -name "*.la" -delete + + +%files -n mingw32-libffi +%license LICENSE +%doc README +%{mingw32_bindir}/libffi-6.dll +%{mingw32_libdir}/libffi.dll.a +%{mingw32_libdir}/pkgconfig/*.pc +%{mingw32_libdir}/libffi-%{version} + +%files -n mingw32-libffi-static +%{mingw32_libdir}/libffi.a + +%files -n mingw64-libffi +%license LICENSE +%doc README +%{mingw64_bindir}/libffi-6.dll +%{mingw64_libdir}/libffi.dll.a +%{mingw64_libdir}/pkgconfig/*.pc +%{mingw64_libdir}/libffi-%{version} + +%files -n mingw64-libffi-static +%{mingw64_libdir}/libffi.a + + +%changelog +* Mon Aug 09 2021 Mohan Boddu - 3.1-13 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Fri Apr 16 2021 Mohan Boddu - 3.1-12 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 3.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 3.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Feb 12 2020 Sandro Mani - 3.1-9 +- Drop libffi-3.1-fix-include-path.patch, it just breaks the pkgconfig file + +* Wed Jan 29 2020 Fedora Release Engineering - 3.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Aug 14 2019 Fabiano FidĂȘncio - 3.1-7 +- Add the same patches from its native counter part, rhbz#1740764 + +* Thu Jul 25 2019 Fedora Release Engineering - 3.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 3.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Feb 08 2018 Fedora Release Engineering - 3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Jun 20 2017 Kalev Lember - 3.1-1 +- Update to 3.1 +- Use license macro + +* Fri Feb 10 2017 Fedora Release Engineering - 3.0.13-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 3.0.13-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 3.0.13-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 3.0.13-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 3.0.13-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sat Jun 15 2013 Erik van Pienbroek - 3.0.13-3 +- Rebuild to resolve InterlockedCompareExchange regression in mingw32 libraries + +* Fri May 31 2013 Erik van Pienbroek - 3.0.13-2 +- Rebuild against latest mingw-filesystem + +* Sun May 5 2013 Erik van Pienbroek - 3.0.13-1 +- Update to 3.0.13 + +* Thu Feb 14 2013 Fedora Release Engineering - 3.0.11-0.5.rc2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jul 20 2012 Fedora Release Engineering - 3.0.11-0.4.rc2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri May 11 2012 Eric Smith - 3.0.11-0.3.rc2 +- Added static subpackages + +* Sat Mar 10 2012 Erik van Pienbroek - 3.0.11-0.2.rc2 +- Added win64 support + +* Thu Mar 08 2012 Erik van Pienbroek - 3.0.11-0.1.rc2 +- Update to 3.0.11-rc2 +- Removed .la file + +* Tue Mar 06 2012 Kalev Lember - 3.0.9-5 +- Renamed the source package to mingw-libffi (#800427) +- Spec clean up + +* Mon Feb 27 2012 Erik van Pienbroek - 3.0.9-4 +- Rebuild against the mingw-w64 toolchain + +* Fri Jan 13 2012 Fedora Release Engineering - 3.0.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 3.0.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sat Oct 9 2010 Paolo Bonzini - 3.0.9-1 +- Created.