From: ljsebald <ljs...@us...> - 2023-03-04 02:19:48
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via c5eeaa3df206903fa155f43797343b02bdca35d6 (commit) via 497bbd2f2a77c6cd9e78532fc6f8ac8a2f90d3cc (commit) via b0b3f09c4a426e69c8184d4a8e1eec8630854cf3 (commit) via 4932ff938283c9e1d82d568abbb4e18cd6998260 (commit) via 9bc458822b22837ba2508db4bf58263b2b9c420e (commit) via 4fb2667b72b2193e73886bcb836e2e0bb0f391f9 (commit) via 76829941e738f1b5cf155da47bf963f48df3ac3f (commit) from 1da0eadf7025b79724e9dc54fdd7759ca13c93f6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c5eeaa3df206903fa155f43797343b02bdca35d6 Merge: 1da0ead 497bbd2 Author: Lawrence Sebald <ljs...@us...> Date: Fri Mar 3 21:14:00 2023 -0500 Merge pull request #112 from sizious/dc-chain-mingw-w64-patches `dc-chain`: adding support for GCC 12.2.0 for MinGW-w64 commit 497bbd2f2a77c6cd9e78532fc6f8ac8a2f90d3cc Author: SiZiOUS <si...@gm...> Date: Tue Feb 28 00:44:15 2023 +0100 `dc-chain`: Adding remark on `sh_force_libbfd_installation`. Indeed, `libbfd` isn't so easily portable, e.g., if you made it on GCC 12 and try to use it on GCC 9, it won't work. See: https://stackoverflow.com/a/13811513/3726096 commit b0b3f09c4a426e69c8184d4a8e1eec8630854cf3 Author: SiZiOUS <si...@gm...> Date: Mon Feb 27 23:26:56 2023 +0100 `dc-chain`: Removing `libdep.a` BFD plugin for MinGW-w64. When this plugin exists, it breaks the `ar` utility on Windows. See: https://github.com/msys2/MINGW-packages/issues/7890 commit 4932ff938283c9e1d82d568abbb4e18cd6998260 Author: SiZiOUS <si...@gm...> Date: Mon Feb 27 21:56:24 2023 +0100 `dc-chain`: adding `sh_force_libbfd_installation` flag. This flag could be used if you want to force the installation of `libbfd` for the SH toolchain. This is required for MinGW/MSYS and can't be disabled in this scenario. This option is here mainly if you want to force the installation of `libbfd` under other environments; but this won't be necessary in most cases, as `libelf` is used almost everywhere. This flag has been tested for building static binaries of GCC 12.2.0 using MinGW-w64 environment. commit 9bc458822b22837ba2508db4bf58263b2b9c420e Author: SiZiOUS <si...@gm...> Date: Sun Feb 26 23:50:36 2023 +0100 `dc-chain`: Adding MinGW-w64 GCC 8.4.0 specific patch Always define `WIN32_LEAN_AND_MEAN` before <windows.h> (thanks to LIU Hao). This patch is identical to the GCC 12.2.0 patch already submitted. See: https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609514.html commit 4fb2667b72b2193e73886bcb836e2e0bb0f391f9 Author: SiZiOUS <si...@gm...> Date: Fri Feb 24 22:46:13 2023 +0100 `dc-chain`: allow to apply several patches at once This change allow patch to apply different patches at once, mainly the standard KallistiOS patches (located in `patches` directory) and platform specific patches (located in `patches/<host_triplet>`). In that way, platform specific patches can be focused only on the platform itself and not to be an aggregation of standard KallistiOS patches with platform specific changes. commit 76829941e738f1b5cf155da47bf963f48df3ac3f Author: SiZiOUS <si...@gm...> Date: Fri Feb 24 22:41:32 2023 +0100 `dc-chain`: Adding MinGW-w64/MSYS2 GCC 12.2.0 specific patch Always define `WIN32_LEAN_AND_MEAN` before <windows.h> (thanks to LIU Hao). See: https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609514.html ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/config.mk.legacy.sample | 10 + utils/dc-chain/config.mk.stable.sample | 10 + utils/dc-chain/config.mk.testing.sample | 10 + .../patches/i686-w64-mingw32/binutils-2.40.diff | 22 ++ .../patches/i686-w64-mingw32/gcc-12.2.0.diff | 401 ++++++++++++++++++++ .../patches/i686-w64-mingw32/gcc-8.4.0.diff | 420 +++++++++++++++++++++ utils/dc-chain/scripts/binutils.mk | 2 +- utils/dc-chain/scripts/build.mk | 8 +- utils/dc-chain/scripts/patch.mk | 2 +- 9 files changed, 882 insertions(+), 3 deletions(-) create mode 100644 utils/dc-chain/patches/i686-w64-mingw32/binutils-2.40.diff create mode 100644 utils/dc-chain/patches/i686-w64-mingw32/gcc-12.2.0.diff create mode 100644 utils/dc-chain/patches/i686-w64-mingw32/gcc-8.4.0.diff diff --git a/utils/dc-chain/config.mk.legacy.sample b/utils/dc-chain/config.mk.legacy.sample index 0b34d65..f3f3e43 100644 --- a/utils/dc-chain/config.mk.legacy.sample +++ b/utils/dc-chain/config.mk.legacy.sample @@ -145,3 +145,13 @@ install_mode=install-strip # also disable the 'kos' thread model. Don't mess with that flag unless you know # exactly what you are doing. #auto_fixup_sh4_newlib=0 + +# Force installation of BFD for SH (1|0) +# Uncomment this if you want to force the installation of 'libbfd' for the SH +# toolchain. This is required for MinGW/MSYS and can't be disabled in this +# scenario. This option is here mainly if you want to force the installation of +# 'libbfd' under other environments; but this won't be necessary in most cases, +# as 'libelf' is used almost everywhere. Please note, 'libbfd' couldn't be +# portable if you built it on another environment. Don't mess with that flag +# unless you know exactly what you are doing. +#sh_force_libbfd_installation=1 diff --git a/utils/dc-chain/config.mk.stable.sample b/utils/dc-chain/config.mk.stable.sample index d79bbf5..c06b9b9 100644 --- a/utils/dc-chain/config.mk.stable.sample +++ b/utils/dc-chain/config.mk.stable.sample @@ -145,3 +145,13 @@ install_mode=install-strip # also disable the 'kos' thread model. Don't mess with that flag unless you know # exactly what you are doing. #auto_fixup_sh4_newlib=0 + +# Force installation of BFD for SH (1|0) +# Uncomment this if you want to force the installation of 'libbfd' for the SH +# toolchain. This is required for MinGW/MSYS and can't be disabled in this +# scenario. This option is here mainly if you want to force the installation of +# 'libbfd' under other environments; but this won't be necessary in most cases, +# as 'libelf' is used almost everywhere. Please note, 'libbfd' couldn't be +# portable if you built it on another environment. Don't mess with that flag +# unless you know exactly what you are doing. +#sh_force_libbfd_installation=1 diff --git a/utils/dc-chain/config.mk.testing.sample b/utils/dc-chain/config.mk.testing.sample index 5467456..1823548 100644 --- a/utils/dc-chain/config.mk.testing.sample +++ b/utils/dc-chain/config.mk.testing.sample @@ -145,3 +145,13 @@ install_mode=install-strip # also disable the 'kos' thread model. Don't mess with that flag unless you know # exactly what you are doing. #auto_fixup_sh4_newlib=0 + +# Force installation of BFD for SH (1|0) +# Uncomment this if you want to force the installation of 'libbfd' for the SH +# toolchain. This is required for MinGW/MSYS and can't be disabled in this +# scenario. This option is here mainly if you want to force the installation of +# 'libbfd' under other environments; but this won't be necessary in most cases, +# as 'libelf' is used almost everywhere. Please note, 'libbfd' couldn't be +# portable if you built it on another environment. Don't mess with that flag +# unless you know exactly what you are doing. +#sh_force_libbfd_installation=1 diff --git a/utils/dc-chain/patches/i686-w64-mingw32/binutils-2.40.diff b/utils/dc-chain/patches/i686-w64-mingw32/binutils-2.40.diff new file mode 100644 index 0000000..6578034 --- /dev/null +++ b/utils/dc-chain/patches/i686-w64-mingw32/binutils-2.40.diff @@ -0,0 +1,22 @@ +diff -ruN binutils-2.40/ld/Makefile.am binutils-2.40-mingw/ld/Makefile.am +--- binutils-2.40/ld/Makefile.am 2023-01-14 00:00:00 +0000 ++++ binutils-2.40-mingw/ld/Makefile.am 2023-02-27 22:00:48 +0000 +@@ -1096,6 +1096,7 @@ + done + rm -f $(DESTDIR)$(bfdplugindir)/libdep.la + rm -f $(DESTDIR)$(bfdplugindir)/libdep.dll.a ++ rm -f $(DESTDIR)$(bfdplugindir)/libdep.a + + # Stuff that should be included in a distribution. The diststuff + # target is run by the taz target in ../Makefile.in. +diff -ruN binutils-2.40/ld/Makefile.in binutils-2.40-mingw/ld/Makefile.in +--- binutils-2.40/ld/Makefile.in 2023-01-14 00:00:00 +0000 ++++ binutils-2.40-mingw/ld/Makefile.in 2023-02-27 22:00:21 +0000 +@@ -2709,6 +2709,7 @@ + done + rm -f $(DESTDIR)$(bfdplugindir)/libdep.la + rm -f $(DESTDIR)$(bfdplugindir)/libdep.dll.a ++ rm -f $(DESTDIR)$(bfdplugindir)/libdep.a + diststuff: info $(EXTRA_DIST) + + # Both info (ld.info) and ld.1 depend on configdoc.texi. diff --git a/utils/dc-chain/patches/i686-w64-mingw32/gcc-12.2.0.diff b/utils/dc-chain/patches/i686-w64-mingw32/gcc-12.2.0.diff new file mode 100644 index 0000000..3c16322 --- /dev/null +++ b/utils/dc-chain/patches/i686-w64-mingw32/gcc-12.2.0.diff @@ -0,0 +1,401 @@ +diff -ruN gcc-12.2.0/gcc/ada/adaint.c gcc-12.2.0-mingw/gcc/ada/adaint.c +--- gcc-12.2.0/gcc/ada/adaint.c 2022-08-19 10:09:52.300658800 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/adaint.c 2023-02-23 23:06:29.194818000 +0100 +@@ -231,6 +231,7 @@ + + #elif defined (_WIN32) + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <accctrl.h> + #include <aclapi.h> +diff -ruN gcc-12.2.0/gcc/ada/cio.c gcc-12.2.0-mingw/gcc/ada/cio.c +--- gcc-12.2.0/gcc/ada/cio.c 2022-08-19 10:09:52.312659000 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/cio.c 2023-02-23 23:06:29.194818000 +0100 +@@ -67,6 +67,7 @@ + #endif + + #ifdef RTX ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <Rtapi.h> + #endif +diff -ruN gcc-12.2.0/gcc/ada/ctrl_c.c gcc-12.2.0-mingw/gcc/ada/ctrl_c.c +--- gcc-12.2.0/gcc/ada/ctrl_c.c 2022-08-19 10:09:52.312659000 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/ctrl_c.c 2023-02-23 23:06:29.210445600 +0100 +@@ -126,6 +126,7 @@ + + #elif defined (__MINGW32__) + ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include <windows.h> + +diff -ruN gcc-12.2.0/gcc/ada/expect.c gcc-12.2.0-mingw/gcc/ada/expect.c +--- gcc-12.2.0/gcc/ada/expect.c 2022-08-19 10:09:52.348659500 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/expect.c 2023-02-23 23:06:29.210445600 +0100 +@@ -75,6 +75,7 @@ + + #ifdef _WIN32 + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <process.h> + #include <signal.h> +diff -ruN gcc-12.2.0/gcc/ada/gsocket.h gcc-12.2.0-mingw/gcc/ada/gsocket.h +--- gcc-12.2.0/gcc/ada/gsocket.h 2022-08-19 10:09:52.372659800 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/gsocket.h 2023-02-23 23:06:29.210445600 +0100 +@@ -173,6 +173,7 @@ + + #endif + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + #elif defined(VMS) +diff -ruN gcc-12.2.0/gcc/ada/mingw32.h gcc-12.2.0-mingw/gcc/ada/mingw32.h +--- gcc-12.2.0/gcc/ada/mingw32.h 2022-08-19 10:09:52.456660800 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/mingw32.h 2023-02-23 23:06:29.225961000 +0100 +@@ -58,6 +58,7 @@ + #define _X86INTRIN_H_INCLUDED + #define _EMMINTRIN_H_INCLUDED + #endif ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + /* After including this file it is possible to use the character t as prefix +diff -ruN gcc-12.2.0/gcc/ada/mkdir.c gcc-12.2.0-mingw/gcc/ada/mkdir.c +--- gcc-12.2.0/gcc/ada/mkdir.c 2022-08-19 10:09:52.456660800 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/mkdir.c 2023-02-23 23:06:29.225961000 +0100 +@@ -43,6 +43,7 @@ + #endif + + #ifdef __MINGW32__ ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include <windows.h> + #ifdef MAXPATHLEN +diff -ruN gcc-12.2.0/gcc/ada/rtfinal.c gcc-12.2.0-mingw/gcc/ada/rtfinal.c +--- gcc-12.2.0/gcc/ada/rtfinal.c 2022-08-19 10:09:52.464660900 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/rtfinal.c 2023-02-23 23:06:29.241603800 +0100 +@@ -46,6 +46,7 @@ + /* see initialize.c */ + + #if defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include <windows.h> + +diff -ruN gcc-12.2.0/gcc/ada/rtinit.c gcc-12.2.0-mingw/gcc/ada/rtinit.c +--- gcc-12.2.0/gcc/ada/rtinit.c 2022-08-19 10:09:52.464660900 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/rtinit.c 2023-02-23 23:06:29.241603800 +0100 +@@ -70,6 +70,7 @@ + and finalize properly the run-time. */ + + #if defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include "mingw32.h" + #include <windows.h> + +diff -ruN gcc-12.2.0/gcc/ada/seh_init.c gcc-12.2.0-mingw/gcc/ada/seh_init.c +--- gcc-12.2.0/gcc/ada/seh_init.c 2022-08-19 10:09:52.468661000 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/seh_init.c 2023-02-23 23:06:29.241603800 +0100 +@@ -34,6 +34,7 @@ + + #if defined (_WIN32) || (defined (__CYGWIN__) && defined (__SEH__)) + /* Include system headers, before system.h poisons malloc. */ ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <excpt.h> + #endif +diff -ruN gcc-12.2.0/gcc/ada/sysdep.c gcc-12.2.0-mingw/gcc/ada/sysdep.c +--- gcc-12.2.0/gcc/ada/sysdep.c 2022-08-19 10:09:52.512661600 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/sysdep.c 2023-02-23 23:06:29.257223200 +0100 +@@ -217,6 +217,7 @@ + #endif /* __CYGWIN__ */ + + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + int __gnat_is_windows_xp (void); +@@ -593,6 +594,7 @@ + Ada programs. */ + + #ifdef WINNT ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + /* Provide functions to echo the values passed to WinMain (windows bindings +diff -ruN gcc-12.2.0/gcc/ada/terminals.c gcc-12.2.0-mingw/gcc/ada/terminals.c +--- gcc-12.2.0/gcc/ada/terminals.c 2022-08-19 10:09:52.512661600 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/terminals.c 2023-02-23 23:06:29.257223200 +0100 +@@ -151,6 +151,7 @@ + #include <stdio.h> + #include <stdlib.h> + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <winternl.h> + #include <io.h> +diff -ruN gcc-12.2.0/gcc/ada/tracebak.c gcc-12.2.0-mingw/gcc/ada/tracebak.c +--- gcc-12.2.0/gcc/ada/tracebak.c 2022-08-19 10:09:52.512661600 +0200 ++++ gcc-12.2.0-mingw/gcc/ada/tracebak.c 2023-02-23 23:06:29.272847800 +0100 +@@ -93,6 +93,7 @@ + + #if defined (_WIN64) && defined (__SEH__) + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + #define IS_BAD_PTR(ptr) (IsBadCodePtr((FARPROC)ptr)) +@@ -455,6 +456,7 @@ + #elif defined (__i386__) || defined (__x86_64__) + + #if defined (__WIN32) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #define IS_BAD_PTR(ptr) (IsBadCodePtr((FARPROC)ptr)) + #elif defined (__sun__) +diff -ruN gcc-12.2.0/gcc/diagnostic-color.cc gcc-12.2.0-mingw/gcc/diagnostic-color.cc +--- gcc-12.2.0/gcc/diagnostic-color.cc 2022-08-19 10:09:52.812665400 +0200 ++++ gcc-12.2.0-mingw/gcc/diagnostic-color.cc 2023-02-23 23:07:35.335490100 +0100 +@@ -22,6 +22,7 @@ + #include "diagnostic-url.h" + + #ifdef __MINGW32__ ++# define WIN32_LEAN_AND_MEAN + # include <windows.h> + #endif + +diff -ruN gcc-12.2.0/gcc/jit/jit-w32.h gcc-12.2.0-mingw/gcc/jit/jit-w32.h +--- gcc-12.2.0/gcc/jit/jit-w32.h 2022-08-19 10:09:52.932666900 +0200 ++++ gcc-12.2.0-mingw/gcc/jit/jit-w32.h 2023-02-23 23:07:35.335490100 +0100 +@@ -20,6 +20,7 @@ + + #include "config.h" + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + namespace gcc { +diff -ruN gcc-12.2.0/gcc/plugin.cc gcc-12.2.0-mingw/gcc/plugin.cc +--- gcc-12.2.0/gcc/plugin.cc 2022-08-19 10:09:52.952667200 +0200 ++++ gcc-12.2.0-mingw/gcc/plugin.cc 2023-02-23 23:07:35.351355900 +0100 +@@ -41,6 +41,7 @@ + #ifndef NOMINMAX + #define NOMINMAX + #endif ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #endif + +diff -ruN gcc-12.2.0/gcc/prefix.cc gcc-12.2.0-mingw/gcc/prefix.cc +--- gcc-12.2.0/gcc/prefix.cc 2022-08-19 10:09:53.104669100 +0200 ++++ gcc-12.2.0-mingw/gcc/prefix.cc 2023-02-23 23:07:35.351355900 +0100 +@@ -67,6 +67,7 @@ + #include "system.h" + #include "coretypes.h" + #if defined(_WIN32) && defined(ENABLE_WIN32_REGISTRY) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #endif + #include "prefix.h" +diff -ruN gcc-12.2.0/libatomic/config/mingw/lock.c gcc-12.2.0-mingw/libatomic/config/mingw/lock.c +--- gcc-12.2.0/libatomic/config/mingw/lock.c 2022-08-19 10:09:54.604688300 +0200 ++++ gcc-12.2.0-mingw/libatomic/config/mingw/lock.c 2023-02-23 23:07:35.366983500 +0100 +@@ -23,6 +23,7 @@ + <http://www.gnu.org/licenses/>. */ + + #define UWORD __shadow_UWORD ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #undef UWORD + #include "libatomic_i.h" +diff -ruN gcc-12.2.0/libffi/src/aarch64/ffi.c gcc-12.2.0-mingw/libffi/src/aarch64/ffi.c +--- gcc-12.2.0/libffi/src/aarch64/ffi.c 2022-08-19 10:09:54.652688900 +0200 ++++ gcc-12.2.0-mingw/libffi/src/aarch64/ffi.c 2023-02-23 23:07:35.366983500 +0100 +@@ -28,6 +28,7 @@ + #include <ffi_common.h> + #include "internal.h" + #ifdef _WIN32 ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> /* FlushInstructionCache */ + #endif + #include <tramp.h> +diff -ruN gcc-12.2.0/libgcc/config/i386/enable-execute-stack-mingw32.c gcc-12.2.0-mingw/libgcc/config/i386/enable-execute-stack-mingw32.c +--- gcc-12.2.0/libgcc/config/i386/enable-execute-stack-mingw32.c 2022-08-19 10:09:54.676689300 +0200 ++++ gcc-12.2.0-mingw/libgcc/config/i386/enable-execute-stack-mingw32.c 2023-02-23 23:07:35.366983500 +0100 +@@ -22,6 +22,7 @@ + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + <http://www.gnu.org/licenses/>. */ + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + extern void __enable_execute_stack (void *); +diff -ruN gcc-12.2.0/libgcc/libgcc2.c gcc-12.2.0-mingw/libgcc/libgcc2.c +--- gcc-12.2.0/libgcc/libgcc2.c 2022-08-19 10:09:54.728689900 +0200 ++++ gcc-12.2.0-mingw/libgcc/libgcc2.c 2023-02-23 23:07:35.382499000 +0100 +@@ -2273,6 +2273,7 @@ + /* Jump to a trampoline, loading the static chain address. */ + + #if defined(WINNT) && ! defined(__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + int getpagesize (void); + int mprotect (char *,int, int); +diff -ruN gcc-12.2.0/libgcc/unwind-generic.h gcc-12.2.0-mingw/libgcc/unwind-generic.h +--- gcc-12.2.0/libgcc/unwind-generic.h 2022-08-19 10:09:54.732690000 +0200 ++++ gcc-12.2.0-mingw/libgcc/unwind-generic.h 2023-02-23 23:07:35.382499000 +0100 +@@ -30,6 +30,7 @@ + + #if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) + /* Only for _GCC_specific_handler. */ ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #endif + +diff -ruN gcc-12.2.0/libgfortran/intrinsics/sleep.c gcc-12.2.0-mingw/libgfortran/intrinsics/sleep.c +--- gcc-12.2.0/libgfortran/intrinsics/sleep.c 2022-08-19 10:09:54.764690400 +0200 ++++ gcc-12.2.0-mingw/libgfortran/intrinsics/sleep.c 2023-02-23 23:07:35.398137200 +0100 +@@ -30,6 +30,7 @@ + #endif + + #ifdef __MINGW32__ ++# define WIN32_LEAN_AND_MEAN + # include <windows.h> + # undef sleep + # define sleep(x) Sleep(1000*(x)) +diff -ruN gcc-12.2.0/libgo/misc/cgo/test/callback_c.c gcc-12.2.0-mingw/libgo/misc/cgo/test/callback_c.c +--- gcc-12.2.0/libgo/misc/cgo/test/callback_c.c 2022-08-19 10:09:55.088694500 +0200 ++++ gcc-12.2.0-mingw/libgo/misc/cgo/test/callback_c.c 2023-02-23 23:07:35.398137200 +0100 +@@ -32,6 +32,7 @@ + } + + #ifdef WIN32 ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + long long + mysleep(int seconds) { +diff -ruN gcc-12.2.0/libgomp/config/mingw32/proc.c gcc-12.2.0-mingw/libgomp/config/mingw32/proc.c +--- gcc-12.2.0/libgomp/config/mingw32/proc.c 2022-08-19 10:09:55.124695000 +0200 ++++ gcc-12.2.0-mingw/libgomp/config/mingw32/proc.c 2023-02-23 23:07:35.398137200 +0100 +@@ -30,6 +30,7 @@ + The following implementation uses win32 API routines. */ + + #include "libgomp.h" ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + /* Count the CPU's currently available to this process. */ +diff -ruN gcc-12.2.0/libiberty/make-temp-file.c gcc-12.2.0-mingw/libiberty/make-temp-file.c +--- gcc-12.2.0/libiberty/make-temp-file.c 2022-08-19 10:09:55.184695800 +0200 ++++ gcc-12.2.0-mingw/libiberty/make-temp-file.c 2023-02-23 23:07:35.398137200 +0100 +@@ -37,6 +37,7 @@ + #include <sys/file.h> /* May get R_OK, etc. on some systems. */ + #endif + #if defined(_WIN32) && !defined(__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #endif + #if HAVE_SYS_STAT_H +diff -ruN gcc-12.2.0/libiberty/pex-win32.c gcc-12.2.0-mingw/libiberty/pex-win32.c +--- gcc-12.2.0/libiberty/pex-win32.c 2022-08-19 10:09:55.184695800 +0200 ++++ gcc-12.2.0-mingw/libiberty/pex-win32.c 2023-02-23 23:07:35.413641800 +0100 +@@ -20,6 +20,7 @@ + + #include "pex-common.h" + ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + + #ifdef HAVE_STDLIB_H +diff -ruN gcc-12.2.0/libssp/ssp.c gcc-12.2.0-mingw/libssp/ssp.c +--- gcc-12.2.0/libssp/ssp.c 2022-08-19 10:09:55.364698100 +0200 ++++ gcc-12.2.0-mingw/libssp/ssp.c 2023-02-23 23:07:35.413641800 +0100 +@@ -55,6 +55,7 @@ + /* Native win32 apps don't know about /dev/tty but can print directly + to the console using "CONOUT$" */ + #if defined (_WIN32) && !defined (__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <wincrypt.h> + # define _PATH_TTY "CONOUT$" +diff -ruN gcc-12.2.0/libstdc++-v3/src/c++11/system_error.cc gcc-12.2.0-mingw/libstdc++-v3/src/c++11/system_error.cc +--- gcc-12.2.0/libstdc++-v3/src/c++11/system_error.cc 2022-08-19 10:09:55.528700200 +0200 ++++ gcc-12.2.0-mingw/libstdc++-v3/src/c++11/system_error.cc 2023-02-23 23:07:35.429269900 +0100 +@@ -33,6 +33,7 @@ + #undef __sso_string + + #if defined(_WIN32) && !defined(__CYGWIN__) ++#define WIN32_LEAN_AND_MEAN + #include <memory> + #include <windows.h> + #endif +diff -ruN gcc-12.2.0/libstdc++-v3/src/c++11/thread.cc gcc-12.2.0-mingw/libstdc++-v3/src/c++11/thread.cc +--- gcc-12.2.0/libstdc++-v3/src/c++11/thread.cc 2022-08-19 10:09:55.528700200 +0200 ++++ gcc-12.2.0-mingw/libstdc++-v3/src/c++11/thread.cc 2023-02-23 23:10:51.367102500 +0100 +@@ -34,6 +34,7 @@ + # ifdef _GLIBCXX_HAVE_SLEEP + # include <unistd.h> + # elif defined(_GLIBCXX_HAVE_WIN32_SLEEP) ++# define WIN32_LEAN_AND_MEAN + # include <windows.h> + # elif defined _GLIBCXX_NO_SLEEP && defined _GLIBCXX_HAS_GTHREADS + // We expect to be able to sleep for targets that support multiple threads: +diff -ruN gcc-12.2.0/libstdc++-v3/src/c++17/fs_ops.cc gcc-12.2.0-mingw/libstdc++-v3/src/c++17/fs_ops.cc +--- gcc-12.2.0/libstdc++-v3/src/c++17/fs_ops.cc 2022-08-19 10:09:55.532700200 +0200 ++++ gcc-12.2.0-mingw/libstdc++-v3/src/c++17/fs_ops.cc 2023-02-23 23:07:35.429269900 +0100 +@@ -54,6 +54,7 @@ + # include <utime.h> // utime + #endif + #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++# define WIN32_LEAN_AND_MEAN + # include <windows.h> + #endif + +diff -ruN gcc-12.2.0/libstdc++-v3/src/filesystem/ops.cc gcc-12.2.0-mingw/libstdc++-v3/src/filesystem/ops.cc +--- gcc-12.2.0/libstdc++-v3/src/filesystem/ops.cc 2022-08-19 10:09:55.540700300 +0200 ++++ gcc-12.2.0-mingw/libstdc++-v3/src/filesystem/ops.cc 2023-02-23 23:07:35.444904400 +0100 +@@ -55,6 +55,7 @@ + # include <utime.h> // utime + #endif + #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS ++# define WIN32_LEAN_AND_MEAN + # include <windows.h> + #endif + +diff -ruN gcc-12.2.0/libvtv/vtv_malloc.cc gcc-12.2.0-mingw/libvtv/vtv_malloc.cc +--- gcc-12.2.0/libvtv/vtv_malloc.cc 2022-08-19 10:09:55.760703100 +0200 ++++ gcc-12.2.0-mingw/libvtv/vtv_malloc.cc 2023-02-23 23:07:35.444904400 +0100 +@@ -33,6 +33,7 @@ + #include <stdlib.h> + #include <unistd.h> + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #else + #include <sys/mman.h> +diff -ruN gcc-12.2.0/libvtv/vtv_rts.cc gcc-12.2.0-mingw/libvtv/vtv_rts.cc +--- gcc-12.2.0/libvtv/vtv_rts.cc 2022-08-19 10:09:55.760703100 +0200 ++++ gcc-12.2.0-mingw/libvtv/vtv_rts.cc 2023-02-23 23:07:35.460517900 +0100 +@@ -121,6 +121,7 @@ + #include <stdio.h> + #include <string.h> + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <winternl.h> + #include <psapi.h> +diff -ruN gcc-12.2.0/libvtv/vtv_utils.cc gcc-12.2.0-mingw/libvtv/vtv_utils.cc +--- gcc-12.2.0/libvtv/vtv_utils.cc 2022-08-19 10:09:55.760703100 +0200 ++++ gcc-12.2.0-mingw/libvtv/vtv_utils.cc 2023-02-23 23:07:35.460517900 +0100 +@@ -33,6 +33,7 @@ + #include <stdlib.h> + #include <string.h> + #if defined (__CYGWIN__) || defined (__MINGW32__) ++#define WIN32_LEAN_AND_MEAN + #include <windows.h> + #else + #include <execinfo.h> diff --git a/utils/dc-chain/patches/i686-w64-mingw32/gcc-8.4.0.diff b/utils/dc-chain/patches/i686-w64-mingw32/gcc-8.4.0.diff new file mode 100644 index 0000000..4ad838e --- /dev/null +++ b/utils/dc-chain/patches/i686-w64-mingw32/gcc-8.4.0.diff @@ -0,0 +1,420 @@ +diff -ruN gcc-8.4.0/gcc/ada/adaint.c gcc-8.4.0-mingw/gcc/ada/adaint.c +--- gcc-8.4.0/gcc/ada/adaint.c 2020-03-04 09:30:00.000000000 +0100 ++++ gcc-8.4.0-mingw/gcc/ada/adaint.c 2023-02-26 23:17:52.514264800 +0100 ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |