import sources
This commit is contained in:
commit
2301a4eaef
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/mingw-w64-v5.0.2.tar.bz2
|
@ -0,0 +1,35 @@
|
||||
From 8243669e8dba9220d7a30b5eb3617b2ecedae4d8 Mon Sep 17 00:00:00 2001
|
||||
From: sezero <sezero@users.sourceforge.net>
|
||||
Date: Thu, 15 Jun 2017 09:45:52 +0300
|
||||
Subject: [PATCH 1/2] genpeimg.c (pass_args): add a /* fallthru */ comment in
|
||||
the switch after show_usage() to avoid -Wimplicit-fallthrough (show_usage):
|
||||
mark the function with noreturn attribute.
|
||||
|
||||
---
|
||||
mingw-w64-tools/genpeimg/src/genpeimg.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mingw-w64-tools/genpeimg/src/genpeimg.c b/mingw-w64-tools/genpeimg/src/genpeimg.c
|
||||
index f8ac44e1..19bc5e2c 100644
|
||||
--- a/mingw-w64-tools/genpeimg/src/genpeimg.c
|
||||
+++ b/mingw-w64-tools/genpeimg/src/genpeimg.c
|
||||
@@ -28,7 +28,7 @@ unsigned short mask_pe_opt_hdr_dll_chara = 0xffff;
|
||||
int dump_information = 0;
|
||||
static char *file_name = NULL;
|
||||
|
||||
-static void
|
||||
+static void __attribute__((noreturn))
|
||||
show_usage (void)
|
||||
{
|
||||
fprintf (stderr, "genpeimg [options] files...\n");
|
||||
@@ -204,6 +204,7 @@ pass_args (int argc, char **argv)
|
||||
case 'h':
|
||||
if (h[2] == 0)
|
||||
show_usage ();
|
||||
+ /* fallthru */
|
||||
default:
|
||||
error_point:
|
||||
fprintf (stderr, "Unknown option ,%s'\n", h);
|
||||
--
|
||||
2.13.0
|
||||
|
@ -0,0 +1,49 @@
|
||||
From b5d311c8e573a17a7b9b38d303fa7db6dc45e98f Mon Sep 17 00:00:00 2001
|
||||
From: sezero <sezero@users.sourceforge.net>
|
||||
Date: Thu, 15 Jun 2017 09:50:00 +0300
|
||||
Subject: [PATCH 2/2] gendef.c (getMemonic): add /* fallthru */ comments in the
|
||||
switch to avoid -Wimplicit-fallthrough
|
||||
|
||||
---
|
||||
mingw-w64-tools/gendef/src/gendef.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/mingw-w64-tools/gendef/src/gendef.c b/mingw-w64-tools/gendef/src/gendef.c
|
||||
index 9d3c7954..12fd1e73 100644
|
||||
--- a/mingw-w64-tools/gendef/src/gendef.c
|
||||
+++ b/mingw-w64-tools/gendef/src/gendef.c
|
||||
@@ -836,7 +836,7 @@ disassembleRetIntern (uint32_t pc, uint32_t *retpop, sAddresses *seen, sAddresse
|
||||
if (!sz || code == c_ill)
|
||||
{
|
||||
PRDEBUG(" %s = 0x08%x ILL (%u) at least one==%d\n",name,
|
||||
- (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
|
||||
+ (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
|
||||
#if ENABLE_DEBUG == 1
|
||||
{
|
||||
unsigned char *ppc = (unsigned char *) map_va (pc);
|
||||
@@ -1031,10 +1031,10 @@ redo_switch:
|
||||
PRDEBUG(" 0x%x illegal ", (unsigned int) b);
|
||||
#endif
|
||||
*aCode=c_ill; return 0;
|
||||
- case c_4: sz++;
|
||||
- case c_3: sz++;
|
||||
+ case c_4: sz++;/* fallthru */
|
||||
+ case c_3: sz++;/* fallthru */
|
||||
case c_lb:
|
||||
- case c_2: sz++;
|
||||
+ case c_2: sz++;/* fallthru */
|
||||
case c_retn: case c_retf:
|
||||
case c_iret: case c_int3:
|
||||
case c_ad: case c_op:
|
||||
@@ -1061,7 +1061,7 @@ redo_switch:
|
||||
p = (unsigned char *) map_va (pc + sz);
|
||||
if (!p) { *aCode=c_ill; return 0; }
|
||||
#if ENABLE_DEBUG == 1
|
||||
- enter_save_insn(lw,p[0]);
|
||||
+ enter_save_insn(lw,p[0]);
|
||||
#endif
|
||||
b&=~0x7; b|=(p[0]&7);
|
||||
sz+=1;
|
||||
--
|
||||
2.13.0
|
||||
|
63
mingw-w64-tools-2.0.999-s390.patch
Normal file
63
mingw-w64-tools-2.0.999-s390.patch
Normal file
@ -0,0 +1,63 @@
|
||||
diff -up mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/basetsd.h.s390 mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/basetsd.h
|
||||
--- mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/basetsd.h.s390 2012-01-24 11:11:33.000000000 +0100
|
||||
+++ mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/basetsd.h 2012-03-28 14:18:17.000000000 +0200
|
||||
@@ -36,7 +36,7 @@
|
||||
* 64-bit.
|
||||
*/
|
||||
|
||||
-#if (defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc64__) || defined(__aarch64__)) && !defined(_WIN64)
|
||||
+#if (defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc64__) || defined(__aarch64__) || defined(__s390x__)) && !defined(_WIN64)
|
||||
#define _WIN64
|
||||
#endif
|
||||
|
||||
@@ -305,6 +305,10 @@ typedef ULONG_PTR KAFFINITY, *PKAFFINITY
|
||||
# undef WORDS_BIGENDIAN
|
||||
# undef BITFIELDS_BIGENDIAN
|
||||
# undef ALLOW_UNALIGNED_ACCESS
|
||||
+#elif defined(__s390__)
|
||||
+# define WORDS_BIGENDIAN
|
||||
+# define BITFIELDS_BIGENDIAN
|
||||
+# define ALLOW_UNALIGNED_ACCESS
|
||||
#elif !defined(RC_INVOKED) && !defined(__WIDL__) && !defined(__midl)
|
||||
# error Unknown CPU architecture!
|
||||
#endif
|
||||
diff -up mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/winnt.h.s390 mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/winnt.h
|
||||
--- mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/winnt.h.s390 2012-01-24 11:11:33.000000000 +0100
|
||||
+++ mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/winnt.h 2012-03-28 14:20:07.000000000 +0200
|
||||
@@ -1910,6 +1910,36 @@ typedef struct _CONTEXT
|
||||
|
||||
#endif /* __powerpc__ */
|
||||
|
||||
+#ifdef __s390__
|
||||
+
|
||||
+/*
|
||||
+ * 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_S390 0x10000000
|
||||
+
|
||||
+#define CONTEXT_CONTROL (CONTEXT_S390 | 0x00000001)
|
||||
+#define CONTEXT_FLOATING_POINT (CONTEXT_S390 | 0x00000002)
|
||||
+#define CONTEXT_INTEGER (CONTEXT_S390 | 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;
|
||||
+
|
||||
+#endif /* __s390__ */
|
||||
+
|
||||
#if !defined(CONTEXT_FULL) && !defined(RC_INVOKED)
|
||||
#error You need to define a CONTEXT for your CPU
|
||||
#endif
|
22
mingw-w64-tools-widl-includedir.patch
Normal file
22
mingw-w64-tools-widl-includedir.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- mingw-w64-v5.0.2/mingw-w64-tools/widl/Makefile.am.orig 2017-06-19 12:09:10.579443494 +0200
|
||||
+++ mingw-w64-v5.0.2/mingw-w64-tools/widl/Makefile.am 2017-06-19 12:09:44.896439319 +0200
|
||||
@@ -58,7 +58,7 @@
|
||||
include/pathtools.h \
|
||||
include/winnt.rh
|
||||
|
||||
-widl_CPPFLAGS = -I$(top_srcdir)/include -DDEFAULT_INCLUDE_DIR=\"$(includedir)/../$(target)/include\" -DDEFAULT_BINDIR=\"$(bindir)\"
|
||||
+widl_CPPFLAGS = -I$(top_srcdir)/include -DDEFAULT_INCLUDE_DIR=\"$(prefix)/$(target)/sys-root/mingw/include\" -DDEFAULT_BINDIR=\"$(bindir)\"
|
||||
widl_CFLAGS = -Wall -Wformat -Wpacked -Wmissing-declarations -Wimplicit-function-declaration -Wmissing-prototypes -Wstrict-aliasing=2
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --host=$(host) --target=$(target)
|
||||
--- mingw-w64-v5.0.2/mingw-w64-tools/widl/Makefile.in.orig 2017-06-19 12:09:18.051442585 +0200
|
||||
+++ mingw-w64-v5.0.2/mingw-w64-tools/widl/Makefile.in 2017-06-19 12:10:12.177436000 +0200
|
||||
@@ -285,7 +285,7 @@
|
||||
include/pathtools.h \
|
||||
include/winnt.rh
|
||||
|
||||
-widl_CPPFLAGS = -I$(top_srcdir)/include -DDEFAULT_INCLUDE_DIR=\"$(includedir)/../$(target)/include\" -DDEFAULT_BINDIR=\"$(bindir)\"
|
||||
+widl_CPPFLAGS = -I$(top_srcdir)/include -DDEFAULT_INCLUDE_DIR=\"$(prefix)/$(target)/sys-root/mingw/include\" -DDEFAULT_BINDIR=\"$(bindir)\"
|
||||
widl_CFLAGS = -Wall -Wformat -Wpacked -Wmissing-declarations -Wimplicit-function-declaration -Wmissing-prototypes -Wstrict-aliasing=2
|
||||
DISTCHECK_CONFIGURE_FLAGS = --host=$(host) --target=$(target)
|
||||
all: all-am
|
199
mingw-w64-tools.spec
Normal file
199
mingw-w64-tools.spec
Normal file
@ -0,0 +1,199 @@
|
||||
#%%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: 5.0.2
|
||||
Release: 5%{?dist}
|
||||
Summary: Supplementary tools which are part of the mingw-w64 toolchain
|
||||
|
||||
# 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
|
||||
# just to make widl to build on s390
|
||||
Patch0: mingw-w64-tools-2.0.999-s390.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1047727
|
||||
Patch1: mingw-w64-tools-widl-includedir.patch
|
||||
|
||||
# Backported from upstream
|
||||
Patch2: 0001-genpeimg.c-pass_args-add-a-fallthru-comment-in-the-s.patch
|
||||
Patch3: 0002-gendef.c-getMemonic-add-fallthru-comments-in-the-swi.patch
|
||||
|
||||
BuildRequires: mingw32-filesystem >= 95
|
||||
BuildRequires: mingw64-filesystem >= 95
|
||||
ExclusiveArch: %{ix86} x86_64
|
||||
|
||||
|
||||
%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}
|
||||
%setup -q -D -T -n mingw-w64-v%{version}/mingw-w64-mingw-w64-%{snapshot_rev}
|
||||
%else
|
||||
%setup -q -n mingw-w64-v%{version}
|
||||
%endif
|
||||
%patch0 -p2 -b .s390
|
||||
%patch1 -p1 -b .widl-includedir
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
|
||||
%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}-
|
||||
make %{?_smp_mflags}
|
||||
popd
|
||||
mkdir win64
|
||||
pushd win64
|
||||
%configure --target=%{mingw64_target} --program-prefix=%{mingw64_target}-
|
||||
make %{?_smp_mflags}
|
||||
popd
|
||||
popd
|
||||
popd
|
||||
|
||||
|
||||
%install
|
||||
pushd mingw-w64-tools
|
||||
make -C gendef DESTDIR=$RPM_BUILD_ROOT install
|
||||
make -C genidl DESTDIR=$RPM_BUILD_ROOT install
|
||||
make -C widl/win32 DESTDIR=$RPM_BUILD_ROOT install
|
||||
make -C widl/win64 DESTDIR=$RPM_BUILD_ROOT install
|
||||
popd
|
||||
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%{_bindir}/gendef
|
||||
%{_bindir}/genidl
|
||||
%{_bindir}/%{mingw32_target}-widl
|
||||
%{_bindir}/%{mingw64_target}-widl
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Aug 14 2018 Victor Toso <victortoso@redhat.com> - 5.0.2-5
|
||||
- ExclusiveArch: i686, x86_64
|
||||
- Related: rhbz#1615874
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.2-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Mon Jun 19 2017 Kalev Lember <klember@redhat.com> - 5.0.2-1
|
||||
- Update to 5.0.2
|
||||
- Use license macro for COPYING
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 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 <releng@fedoraproject.org> - 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 <rel-eng@lists.fedoraproject.org> - 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 <rel-eng@lists.fedoraproject.org> - 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 <rel-eng@lists.fedoraproject.org> - 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 <epienbro@fedoraproject.org> - 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 <epienbro@fedoraproject.org> - 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 <epienbro@fedoraproject.org> - 3.1.999-0.2.trunk.r6559.20140330
|
||||
- Update to r6559 (20140330 snapshot)
|
||||
|
||||
* Thu Jan 9 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.1.999-0.1.trunk.r6432.20140104
|
||||
- Bump version to keep working upgrade path
|
||||
|
||||
* Sat Jan 4 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.0.999-0.1.trunk.r6432.20140104
|
||||
- Update to r6432 (20140104 snapshot)
|
||||
|
||||
* Sat Jan 4 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.0.0-1
|
||||
- Update to 3.0.0
|
||||
|
||||
* Wed Jan 1 2014 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 2.0.999-0.10.trunk.r6228.20130907
|
||||
- Fix widl default includedir (RHBZ #1047727)
|
||||
|
||||
* Sat Sep 7 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 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 <rel-eng@lists.fedoraproject.org> - 2.0.999-0.8.trunk.20130403
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Wed Apr 3 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 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 <rel-eng@lists.fedoraproject.org> - 2.0.999-0.6.trunk.20120124
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Mon Oct 15 2012 Jon Ciesla <limburgher@gmail.com> - 2.0.999-0.5.trunk.20120124
|
||||
- Provides: bundled(libiberty)
|
||||
|
||||
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.999-0.4.trunk.20120124
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Wed Mar 28 2012 Dan Horák <dan[at]danny.cz> - 2.0.999-0.3.trunk.20120124
|
||||
- fix build on s390(x)
|
||||
|
||||
* Sun Mar 11 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.0.999-0.2.trunk.20120124
|
||||
- Eliminated several conditionals
|
||||
|
||||
* Mon Jan 30 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 2.0.999-0.1.trunk.20120124
|
||||
- Initial package
|
||||
|
Loading…
Reference in New Issue
Block a user