From dcdeb63ad71ade190f3cebc7eb2a33686fbbd299 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Mar 2023 12:42:41 +0000 Subject: [PATCH] import mingw-w64-tools-10.0.0-2.el9 --- .gitignore | 1 + .mingw-w64-tools.metadata | 1 + SOURCES/mingw-w64-tools-s390x-ppc66le.patch | 143 ++++++++++++ SPECS/mingw-w64-tools.spec | 247 ++++++++++++++++++++ 4 files changed, 392 insertions(+) create mode 100644 .gitignore create mode 100644 .mingw-w64-tools.metadata create mode 100644 SOURCES/mingw-w64-tools-s390x-ppc66le.patch create mode 100644 SPECS/mingw-w64-tools.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c8839a3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/mingw-w64-v10.0.0.tar.bz2 diff --git a/.mingw-w64-tools.metadata b/.mingw-w64-tools.metadata new file mode 100644 index 0000000..90d2c48 --- /dev/null +++ b/.mingw-w64-tools.metadata @@ -0,0 +1 @@ +56143558d81dae7628a232ca7582b947e65392b1 SOURCES/mingw-w64-v10.0.0.tar.bz2 diff --git a/SOURCES/mingw-w64-tools-s390x-ppc66le.patch b/SOURCES/mingw-w64-tools-s390x-ppc66le.patch new file mode 100644 index 0000000..c97c38f --- /dev/null +++ b/SOURCES/mingw-w64-tools-s390x-ppc66le.patch @@ -0,0 +1,143 @@ +diff -rupN mingw-w64-v10.0.0/mingw-w64-tools/widl/include/basetsd.h mingw-w64-v10.0.0-new/mingw-w64-tools/widl/include/basetsd.h +--- mingw-w64-v10.0.0/mingw-w64-tools/widl/include/basetsd.h 2022-04-03 17:08:58.000000000 +0200 ++++ mingw-w64-v10.0.0-new/mingw-w64-tools/widl/include/basetsd.h 2022-04-27 15:04:23.665492767 +0200 +@@ -36,7 +36,7 @@ extern "C" { + * 64-bit. + */ + +-#if (defined(__x86_64__) || defined(__powerpc64__) || defined(__aarch64__)) && !defined(_WIN64) ++#if (defined(__x86_64__) || defined(__powerpc64__) || defined(__aarch64__) || defined(__s390x__)) && !defined(_WIN64) + #define _WIN64 + #endif + +@@ -295,6 +295,8 @@ typedef ULONG_PTR KAFFINITY, *PKAFFINITY + # define WORDS_BIGENDIAN + #elif defined(__MIPSEL__) + # undef WORDS_BIGENDIAN ++#elif defined(__s390__) ++# define WORDS_BIGENDIAN + #elif !defined(RC_INVOKED) && !defined(__WIDL__) && !defined(__midl) + # error Unknown CPU architecture! + #endif +diff -rupN mingw-w64-v10.0.0/mingw-w64-tools/widl/include/winnt.h mingw-w64-v10.0.0-new/mingw-w64-tools/widl/include/winnt.h +--- mingw-w64-v10.0.0/mingw-w64-tools/widl/include/winnt.h 2022-04-03 17:08:58.000000000 +0200 ++++ mingw-w64-v10.0.0-new/mingw-w64-tools/widl/include/winnt.h 2022-04-27 17:04:51.719200013 +0200 +@@ -1651,6 +1651,66 @@ typedef struct _KNONVOLATILE_CONTEXT_POI + + #endif /* __aarch64__ */ + ++#ifdef __s390x__ ++ ++/* ++ * FIXME: ++ * ++ * There is no official CONTEXT structure defined for the S/390 ++ * architecture, so I just made one up. ++ * ++ * This structure is completely dummy, made just to build widl. ++ * ++ */ ++ ++#define CONTEXT_S390X 0x10000000 ++ ++#define CONTEXT_CONTROL (CONTEXT_S390X | 0x00000001) ++#define CONTEXT_FLOATING_POINT (CONTEXT_S390X | 0x00000002) ++#define CONTEXT_INTEGER (CONTEXT_S390X | 0x00000004) ++ ++#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER) ++ ++#define EXCEPTION_READ_FAULT 0 ++#define EXCEPTION_WRITE_FAULT 1 ++#define EXCEPTION_EXECUTE_FAULT 8 ++ ++typedef struct _CONTEXT ++{ ++} CONTEXT, *PCONTEXT; ++ ++#endif /* __s390x__ */ ++ ++#ifdef __PPC64__ ++ ++/* ++ * FIXME: ++ * ++ * There is no official CONTEXT structure defined for the PPC64 ++ * architecture, so I just made one up. ++ * ++ * This structure is completely dummy, made just to build widl. ++ * ++ */ ++ ++#define CONTEXT_PPC64 0x10000000 ++ ++#define CONTEXT_CONTROL (CONTEXT_PPC64 | 0x00000001) ++#define CONTEXT_FLOATING_POINT (CONTEXT_PPC64 | 0x00000002) ++#define CONTEXT_INTEGER (CONTEXT_PPC64 | 0x00000004) ++ ++#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER) ++ ++#define EXCEPTION_READ_FAULT 0 ++#define EXCEPTION_WRITE_FAULT 1 ++#define EXCEPTION_EXECUTE_FAULT 8 ++ ++typedef struct _CONTEXT ++{ ++} CONTEXT, *PCONTEXT; ++ ++#endif /* __PPC64__ */ ++ + #if !defined(CONTEXT_FULL) && !defined(RC_INVOKED) + #error You need to define a CONTEXT for your CPU + #endif +diff -rupN mingw-w64-v10.0.0/mingw-w64-tools/widl/tools.h mingw-w64-v10.0.0-new/mingw-w64-tools/widl/tools.h +--- mingw-w64-v10.0.0/mingw-w64-tools/widl/tools.h 2022-04-03 17:08:58.000000000 +0200 ++++ mingw-w64-v10.0.0-new/mingw-w64-tools/widl/tools.h 2022-04-27 16:55:48.675315988 +0200 +@@ -79,7 +79,7 @@ + + struct target + { +- enum { CPU_i386, CPU_x86_64, CPU_ARM, CPU_ARM64 } cpu; ++ enum { CPU_i386, CPU_x86_64, CPU_ARM, CPU_ARM64, CPU_S390X, CPU_PPC64 } cpu; + + enum + { +@@ -383,6 +383,10 @@ static inline struct target get_default_ + target.cpu = CPU_ARM; + #elif defined(__aarch64__) + target.cpu = CPU_ARM64; ++#elif defined(__s390x__) ++ target.cpu = CPU_S390X; ++#elif defined(__PPC64__) ++ target.cpu = CPU_PPC64; + #else + #error Unsupported CPU + #endif +@@ -417,6 +421,8 @@ static inline unsigned int get_target_pt + [CPU_x86_64] = 8, + [CPU_ARM] = 4, + [CPU_ARM64] = 8, ++ [CPU_S390X] = 8, ++ [CPU_PPC64] = 8, + }; + return sizes[target.cpu]; + } +@@ -460,6 +466,8 @@ static inline int get_cpu_from_name( con + { "aarch64", CPU_ARM64 }, + { "arm64", CPU_ARM64 }, + { "arm", CPU_ARM }, ++ { "s390x", CPU_S390X }, ++ { "ppc64", CPU_PPC64 } + }; + unsigned int i; + +@@ -505,7 +513,9 @@ static inline const char *get_arch_dir( + [CPU_i386] = "i386", + [CPU_x86_64] = "x86_64", + [CPU_ARM] = "arm", +- [CPU_ARM64] = "aarch64" ++ [CPU_ARM64] = "aarch64", ++ [CPU_S390X] = "s390x", ++ [CPU_PPC64] = "ppc64", + }; + + if (!cpu_names[target.cpu]) return ""; diff --git a/SPECS/mingw-w64-tools.spec b/SPECS/mingw-w64-tools.spec new file mode 100644 index 0000000..aadd681 --- /dev/null +++ b/SPECS/mingw-w64-tools.spec @@ -0,0 +1,247 @@ +#%%global snapshot_date 20140530 +#%%global snapshot_rev 430863ffea2f6101fbfc0ee35ee098ab2f96b53c +#%%global snapshot_rev_short %(echo %snapshot_rev | cut -c1-6) +#%%global branch trunk + +Name: mingw-w64-tools +Version: 10.0.0 +Release: 2%{?dist} +Summary: Supplementary tools which are part of the mingw-w64 toolchain +# Fix build on s390x and ppc64le +Patch0: mingw-w64-tools-s390x-ppc66le.patch + +# http://sourceforge.net/mailarchive/forum.php?thread_name=5157C0FC.1010309%40users.sourceforge.net&forum_name=mingw-w64-public +# The tools gendef and genidl are GPLv3+, widl is LGPLv2+ +License: GPLv3+ and LGPLv2+ + +URL: http://mingw-w64.sourceforge.net/ +%if 0%{?snapshot_date} +# To regenerate a snapshot: +# Use your regular webbrowser to open https://sourceforge.net/p/mingw-w64/mingw-w64/ci/%{snapshot_rev}/tarball +# This triggers the SourceForge instructure to generate a snapshot +# After that you can pull in the archive with: +# spectool -g mingw-w64-tools.spec +Source0: http://sourceforge.net/code-snapshots/git/m/mi/mingw-w64/mingw-w64.git/mingw-w64-mingw-w64-%{snapshot_rev}.zip +%else +Source0: http://downloads.sourceforge.net/mingw-w64/mingw-w64-v%{version}.tar.bz2 +%endif + +BuildRequires: make +BuildRequires: gcc +BuildRequires: mingw32-filesystem >= 133 +BuildRequires: mingw64-filesystem >= 133 +BuildRequires: ucrt64-filesystem >= 133 + + +%description +Supplementary tools which are part of the mingw-w64 toolchain +It contains gendef, genidl and mingw-w64-widl + + +%prep +%if 0%{?snapshot_date} +rm -rf mingw-w64-v%{version} +mkdir mingw-w64-v%{version} +cd mingw-w64-v%{version} +unzip %{S:0} +%autosetup -p1 -D -T -n mingw-w64-v%{version}/mingw-w64-mingw-w64-%{snapshot_rev} +%else +%autosetup -p1 -n mingw-w64-v%{version} +%endif + + +%build +pushd mingw-w64-tools + pushd gendef + %configure + make %{?_smp_mflags} + popd + + pushd genidl + %configure + make %{?_smp_mflags} + popd + + pushd widl + # widl needs to be aware of the location of the IDL files belonging + # to the toolchain. Therefore it needs to be built for both the win32 + # and win64 targets + %global _configure ../configure + mkdir win32 + pushd win32 + %configure --target=%{mingw32_target} --program-prefix=%{mingw32_target}- --with-widl-includedir=%{mingw32_includedir} + %make_build + popd + mkdir win64 + pushd win64 + %configure --target=%{mingw64_target} --program-prefix=%{mingw64_target}- --with-widl-includedir=%{mingw64_includedir} + %make_build + popd + mkdir ucrt64 + pushd ucrt64 + %configure --target=%{ucrt64_target} --program-prefix=%{ucrt64_target}- --with-widl-includedir=%{ucrt64_includedir} + %make_build + popd + popd +popd + + +%install +pushd mingw-w64-tools + %make_install -C gendef + %make_install -C genidl + %make_install -C widl/win32 + %make_install -C widl/win64 + %make_install -C widl/ucrt64 +popd + + +%files +%license COPYING +%{_bindir}/gendef +%{_bindir}/genidl +%{_bindir}/%{mingw32_target}-widl +%{_bindir}/%{mingw64_target}-widl +%{_bindir}/%{ucrt64_target}-widl + + +%changelog +* Thu Jul 21 2022 Fedora Release Engineering - 10.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Apr 26 2022 Sandro Mani - 10.0.0-1 +- Update to 10.0.0 + +* Wed Feb 23 2022 Marc-André Lureau - 9.0.0-4 +- Add ucrt64 target. + +* Thu Jan 20 2022 Fedora Release Engineering - 9.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 9.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jul 08 2021 Sandro Mani - 9.0.0-1 +- Update to 9.0.0 + +* Mon May 17 2021 Sandro Mani - 8.0.2-1 +- Update to 8.0.2 + +* Tue Jan 26 2021 Fedora Release Engineering - 8.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 15 2021 Sandro Mani - 8.0.0-1 +- Update to 8.0.0 + +* Tue Jul 28 2020 Fedora Release Engineering - 7.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat Jun 20 2020 Sandro Mani - 7.0.0-1 +- Update to 7.0.0 + +* Wed Jan 29 2020 Fedora Release Engineering - 6.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 6.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue May 07 2019 Sandro Mani - 6.0.0-1 +- Update to 6.0.0 + +* Fri Feb 01 2019 Fedora Release Engineering - 5.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 5.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jul 09 2018 Kalev Lember - 5.0.4-1 +- Update to 5.0.4 + +* Thu Jun 14 2018 Sandro Mani - 5.0.3-1 +- Update to 5.0.3 + +* Thu Feb 08 2018 Fedora Release Engineering - 5.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 5.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 5.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jun 19 2017 Kalev Lember - 5.0.2-1 +- Update to 5.0.2 +- Use license macro for COPYING + +* Fri Feb 10 2017 Fedora Release Engineering - 3.1.999-0.9.trunk.git430863.20140530 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 3.1.999-0.8.trunk.git430863.20140530 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 3.1.999-0.7.trunk.git430863.20140530 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 3.1.999-0.6.trunk.git430863.20140530 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 3.1.999-0.5.trunk.git430863.20140530 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 30 2014 Erik van Pienbroek - 3.1.999-0.4.trunk.git430863.20140530 +- Update to 20140530 snapshot (git rev 430863f) +- Fixes compilation on aarch64 + +* Wed May 28 2014 Erik van Pienbroek - 3.1.999-0.3.trunk.git502c72.20140524 +- Update to 20140524 snapshot (git rev 502c72) +- Upstream has switched from SVN to Git + +* Sun Mar 30 2014 Erik van Pienbroek - 3.1.999-0.2.trunk.r6559.20140330 +- Update to r6559 (20140330 snapshot) + +* Thu Jan 9 2014 Erik van Pienbroek - 3.1.999-0.1.trunk.r6432.20140104 +- Bump version to keep working upgrade path + +* Sat Jan 4 2014 Erik van Pienbroek - 3.0.999-0.1.trunk.r6432.20140104 +- Update to r6432 (20140104 snapshot) + +* Sat Jan 4 2014 Erik van Pienbroek - 3.0.0-1 +- Update to 3.0.0 + +* Wed Jan 1 2014 Yaakov Selkowitz - 2.0.999-0.10.trunk.r6228.20130907 +- Fix widl default includedir (RHBZ #1047727) + +* Sat Sep 7 2013 Erik van Pienbroek - 2.0.999-0.9.trunk.r6228.20130907 +- Update to r6228 (20130907 snapshot) +- Updated instructions to regenerate snapshots + (SourceForge has changed their SVN infrastructure) + +* Sat Aug 03 2013 Fedora Release Engineering - 2.0.999-0.8.trunk.20130403 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Apr 3 2013 Erik van Pienbroek - 2.0.999-0.7.trunk.20130403 +- Update to 20130403 snapshot +- Use a different source tarball which doesn't contain unrelevant code (like libiberty) +- Removed Provides: bundled(libiberty) +- Make sure the widl tool is built for both win32 and win64 toolchains +- Upstream has changed the license of the gendef and genidl tools to GPLv3+ + The license of the widl tool is LGPLv2+ + +* Thu Feb 14 2013 Fedora Release Engineering - 2.0.999-0.6.trunk.20120124 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Oct 15 2012 Jon Ciesla - 2.0.999-0.5.trunk.20120124 +- Provides: bundled(libiberty) + +* Fri Jul 20 2012 Fedora Release Engineering - 2.0.999-0.4.trunk.20120124 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Mar 28 2012 Dan Horák - 2.0.999-0.3.trunk.20120124 +- fix build on s390(x) + +* Sun Mar 11 2012 Erik van Pienbroek - 2.0.999-0.2.trunk.20120124 +- Eliminated several conditionals + +* Mon Jan 30 2012 Erik van Pienbroek - 2.0.999-0.1.trunk.20120124 +- Initial package +