diff --git a/Dockerfile b/Dockerfile index bfae148..e0ffc1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -254,7 +254,6 @@ RUN cat $PREFIX/src/gcc-*.patch | patch -d/dl/gcc -p1 \ --prefix=/bootstrap \ --with-sysroot=/bootstrap \ --with-arch-32=pentium4 \ - "--with-specs=%{m32:%{!D_WIN32_WINNT*:-D_WIN32_WINNT=0x0501}}" \ --target=$ARCH \ --enable-static \ --disable-shared \ @@ -470,7 +469,6 @@ RUN cat $PREFIX/src/crossgcc-*.patch | patch -d/dl/gcc -p1 \ --with-sysroot=$PREFIX \ --with-native-system-header-dir=/include \ --with-arch-32=pentium4 \ - "--with-specs=%{m32:%{!D_WIN32_WINNT*:-D_WIN32_WINNT=0x0501}}" \ --target=$ARCH \ --host=$ARCH \ --enable-static \ diff --git a/src/mingw-default-win32-winnt.patch b/src/mingw-default-win32-winnt.patch new file mode 100644 index 0000000..eb75943 --- /dev/null +++ b/src/mingw-default-win32-winnt.patch @@ -0,0 +1,19 @@ +headers: default 32-bit x86 to Windows XP + +The x86_64 multilib toolchain shares one header tree between its 64-bit +and 32-bit targets. Keep the configured mingw-w64 default for x86_64 and +other architectures, but preserve w64devkit's Windows XP default when +the compiler targets i686. An explicit user definition still takes +precedence through the existing outer guard. + +--- a/mingw-w64-headers/crt/_mingw.h.in ++++ b/mingw-w64-headers/crt/_mingw.h.in +@@ -255,3 +255,7 @@ + #ifndef _WIN32_WINNT +-#define _WIN32_WINNT @DEFAULT_WIN32_WINNT@ ++# if defined(__i386__) ++# define _WIN32_WINNT 0x0501 ++# else ++# define _WIN32_WINNT @DEFAULT_WIN32_WINNT@ ++# endif + #endif