Rebase to 10.0.0 matching Fedora Rawhide
resolves: rhbz#2080162
This commit is contained in:
parent
f1c7951ff9
commit
3a6c548851
3
.gitignore
vendored
3
.gitignore
vendored
@ -11,3 +11,6 @@
|
||||
/mingw-w64-v6.0.0.tar.bz2
|
||||
/mingw-w64-v7.0.0.tar.bz2
|
||||
/mingw-w64-v8.0.0.tar.bz2
|
||||
/mingw-w64-v8.0.2.tar.bz2
|
||||
/mingw-w64-v9.0.0.tar.bz2
|
||||
/mingw-w64-v10.0.0.tar.bz2
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -rupN --no-dereference mingw-w64-v8.0.0/mingw-w64-tools/widl/include/windef.h mingw-w64-v8.0.0-new/mingw-w64-tools/widl/include/windef.h
|
||||
--- mingw-w64-v8.0.0/mingw-w64-tools/widl/include/windef.h 2020-09-17 04:20:15.000000000 +0200
|
||||
+++ mingw-w64-v8.0.0-new/mingw-w64-tools/widl/include/windef.h 2021-01-16 00:00:46.860772591 +0100
|
||||
@@ -107,7 +107,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __ms_va_list
|
||||
-# if (defined(__x86_64__) || defined(__aarch64__)) && defined (__GNUC__)
|
||||
+# if (defined(__x86_64__)) && defined (__GNUC__)
|
||||
# define __ms_va_list __builtin_ms_va_list
|
||||
# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
|
||||
# define __ms_va_end(list) __builtin_ms_va_end(list)
|
@ -1,101 +0,0 @@
|
||||
diff -rupN --no-dereference mingw-w64-v8.0.0/mingw-w64-tools/widl/include/basetsd.h mingw-w64-v8.0.0-new/mingw-w64-tools/widl/include/basetsd.h
|
||||
--- mingw-w64-v8.0.0/mingw-w64-tools/widl/include/basetsd.h 2020-09-17 04:20:15.000000000 +0200
|
||||
+++ mingw-w64-v8.0.0-new/mingw-w64-tools/widl/include/basetsd.h 2021-01-16 00:00:46.594772874 +0100
|
||||
@@ -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
|
||||
|
||||
@@ -289,6 +289,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 --no-dereference mingw-w64-v8.0.0/mingw-w64-tools/widl/include/winnt.h mingw-w64-v8.0.0-new/mingw-w64-tools/widl/include/winnt.h
|
||||
--- mingw-w64-v8.0.0/mingw-w64-tools/widl/include/winnt.h 2020-09-17 04:20:15.000000000 +0200
|
||||
+++ mingw-w64-v8.0.0-new/mingw-w64-tools/widl/include/winnt.h 2021-01-16 00:00:46.595772873 +0100
|
||||
@@ -2335,6 +2335,36 @@ typedef struct _STACK_FRAME_HEADER
|
||||
|
||||
#endif /* __powerpc__ */
|
||||
|
||||
+#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__ */
|
||||
+
|
||||
#if !defined(CONTEXT_FULL) && !defined(RC_INVOKED)
|
||||
#error You need to define a CONTEXT for your CPU
|
||||
#endif
|
||||
diff -rupN --no-dereference mingw-w64-v8.0.0/mingw-w64-tools/widl/src/widl.c mingw-w64-v8.0.0-new/mingw-w64-tools/widl/src/widl.c
|
||||
--- mingw-w64-v8.0.0/mingw-w64-tools/widl/src/widl.c 2020-09-17 04:20:15.000000000 +0200
|
||||
+++ mingw-w64-v8.0.0-new/mingw-w64-tools/widl/src/widl.c 2021-01-16 00:00:46.595772873 +0100
|
||||
@@ -104,6 +104,8 @@ enum target_cpu target_cpu = CPU_POWERPC
|
||||
enum target_cpu target_cpu = CPU_ARM;
|
||||
#elif defined(__aarch64__)
|
||||
enum target_cpu target_cpu = CPU_ARM64;
|
||||
+#elif defined(__s390x__)
|
||||
+enum target_cpu target_cpu = CPU_S390X;
|
||||
#else
|
||||
#error Unsupported CPU
|
||||
#endif
|
||||
@@ -302,6 +304,7 @@ static void set_target( const char *targ
|
||||
{ "armv7a", CPU_ARM },
|
||||
{ "arm64", CPU_ARM64 },
|
||||
{ "aarch64", CPU_ARM64 },
|
||||
+ { "s390x", CPU_S390X }
|
||||
};
|
||||
|
||||
unsigned int i;
|
||||
@@ -788,6 +791,7 @@ int main(int argc,char *argv[])
|
||||
else pointer_size = 4;
|
||||
break;
|
||||
case CPU_x86_64:
|
||||
+ case CPU_S390X:
|
||||
if (pointer_size == 4) target_cpu = CPU_x86;
|
||||
else pointer_size = 8;
|
||||
break;
|
||||
diff -rupN --no-dereference mingw-w64-v8.0.0/mingw-w64-tools/widl/src/widl.h mingw-w64-v8.0.0-new/mingw-w64-tools/widl/src/widl.h
|
||||
--- mingw-w64-v8.0.0/mingw-w64-tools/widl/src/widl.h 2020-09-17 04:20:15.000000000 +0200
|
||||
+++ mingw-w64-v8.0.0-new/mingw-w64-tools/widl/src/widl.h 2021-01-16 00:00:46.596772872 +0100
|
||||
@@ -76,7 +76,7 @@ extern int char_number;
|
||||
|
||||
enum target_cpu
|
||||
{
|
||||
- CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_LAST = CPU_ARM64
|
||||
+ CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_S390X, CPU_LAST = CPU_S390X
|
||||
};
|
||||
|
||||
extern enum target_cpu target_cpu;
|
143
mingw-w64-tools-s390x-ppc66le.patch
Normal file
143
mingw-w64-tools-s390x-ppc66le.patch
Normal file
@ -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 "";
|
@ -4,9 +4,11 @@
|
||||
#%%global branch trunk
|
||||
|
||||
Name: mingw-w64-tools
|
||||
Version: 8.0.0
|
||||
Release: 4%{?dist}
|
||||
Version: 10.0.0
|
||||
Release: 1%{?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+
|
||||
@ -23,16 +25,12 @@ Source0: http://sourceforge.net/code-snapshots/git/m/mi/mingw-w64/mingw-w
|
||||
%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-s390.patch
|
||||
|
||||
# aarch64 does not seem to know about __builtin_ms_va_list
|
||||
Patch1: mingw-w64-tools-aarch64.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
BuildRequires: mingw32-filesystem >= 95
|
||||
BuildRequires: mingw64-filesystem >= 95
|
||||
BuildRequires: mingw32-filesystem >= 133
|
||||
BuildRequires: mingw64-filesystem >= 133
|
||||
BuildRequires: ucrt64-filesystem >= 133
|
||||
|
||||
|
||||
%description
|
||||
@ -79,6 +77,11 @@ pushd mingw-w64-tools
|
||||
%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
|
||||
|
||||
@ -89,6 +92,7 @@ pushd mingw-w64-tools
|
||||
%make_install -C genidl
|
||||
%make_install -C widl/win32
|
||||
%make_install -C widl/win64
|
||||
%make_install -C widl/ucrt64
|
||||
popd
|
||||
|
||||
|
||||
@ -98,9 +102,14 @@ popd
|
||||
%{_bindir}/genidl
|
||||
%{_bindir}/%{mingw32_target}-widl
|
||||
%{_bindir}/%{mingw64_target}-widl
|
||||
%{_bindir}/%{ucrt64_target}-widl
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu May 12 2022 Richard W.M. Jones <rjones@redhat.com> - 10.0.0-1
|
||||
- Rebase to 10.0.0 matching Fedora Rawhide
|
||||
resolves: rhbz#2080162
|
||||
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 8.0.0-4
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (mingw-w64-v8.0.0.tar.bz2) = cefcc86ac3e6337c88ed224ab4692abbd5eb543ce78fb6c5462198a85f36c9274a0a1df0a0bebd182137fd527c15831f9237c782711a85f32e77d9104b28359e
|
||||
SHA512 (mingw-w64-v10.0.0.tar.bz2) = 3c0827af7c40809a867758f6cd9ef3ff0c988b43082345bf725e03949af95968d634ace99a7ffae323189549221dcb5d861de9e801f1fbc7904e446641b60516
|
||||
|
Loading…
Reference in New Issue
Block a user