Commit d80ecd77 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

winrt: Add windowsapp.lib mingw patches

parent 1e71e909
......@@ -13,7 +13,9 @@ ENV MINGW_PREFIX=$TOOLCHAIN_PREFIX/$TARGET_TUPLE
ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
COPY missing-snprintf.patch .
COPY winstorecompat.patch .
#COPY winstorecompat.patch .
COPY windowsapp.a.patch .
COPY getstartupinfo.patch .
RUN mkdir /build && cd /build && \
mkdir $TOOLCHAIN_PREFIX && \
......@@ -52,7 +54,8 @@ RUN mkdir /build && cd /build && \
make install-gcc && \
cd /build/mingw-w64/mingw-w64-crt && \
git am ../../../missing-snprintf.patch && \
git am ../../../winstorecompat.patch && \
git am ../../../windowsapp.a.patch && \
git am ../../../getstartupinfo.patch && \
mkdir build && cd build && \
../configure --prefix=$MINGW_PREFIX \
--host=$TARGET_TUPLE && \
......
From 6ab38488dcaf853b616ee636a4714cedff33e1c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 2 Aug 2016 10:47:13 +0200
Subject: [PATCH 2/2] winstorecompat: Add a GetStartupInfo stub
This is required for configure test executables to link when building
with windowsapp.lib
---
mingw-w64-libraries/winstorecompat/Makefile.am | 1 +
.../winstorecompat/src/GetStartupInfo.c | 40 ++++++++++++++++++++++
2 files changed, 41 insertions(+)
create mode 100644 mingw-w64-libraries/winstorecompat/src/GetStartupInfo.c
diff --git a/mingw-w64-libraries/winstorecompat/Makefile.am b/mingw-w64-libraries/winstorecompat/Makefile.am
index 332cae5..81512ce 100644
--- a/mingw-w64-libraries/winstorecompat/Makefile.am
+++ b/mingw-w64-libraries/winstorecompat/Makefile.am
@@ -36,4 +36,5 @@ libwinstorecompat_a_SOURCES = \
src/SHGetFolderPathW.c \
src/QueueTimer.c \
src/Crypto.c \
+ src/GetStartupInfo.c \
$(NULL)
diff --git a/mingw-w64-libraries/winstorecompat/src/GetStartupInfo.c b/mingw-w64-libraries/winstorecompat/src/GetStartupInfo.c
new file mode 100644
index 0000000..110099d
--- /dev/null
+++ b/mingw-w64-libraries/winstorecompat/src/GetStartupInfo.c
@@ -0,0 +1,40 @@
+/*
+ Copyright (c) 2016 mingw-w64 project
+
+ Contributing authors: Hugo Beauzée-Luyssen
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+*/
+
+#define GetStartupInfo __GetStartupInfo
+#include <windows.h>
+#undef GetStartupInfo
+
+VOID WINAPI GetStartupInfo( LPSTARTUPINFO lpStartupInfo )
+{
+ (void)lpStartupInfo;
+}
+
+#ifndef _WIN64
+VOID (WINAPI *__MINGW_IMP_SYMBOL(GetStartupInfoA))(LPSTARTUPINFO) asm("__imp__GetStartupInfoA@4") = GetStartupInfo;
+VOID (WINAPI *__MINGW_IMP_SYMBOL(GetStartupInfoW))(LPSTARTUPINFO) asm("__imp__GetStartupInfoW@4") = GetStartupInfo;
+#else
+VOID (WINAPI *__MINGW_IMP_SYMBOL(GetStartupInfoA))(LPSTARTUPINFO) asm("__imp_GetStartupInfoA") = GetStartupInfo;
+VOID (WINAPI *__MINGW_IMP_SYMBOL(GetStartupInfoW))(LPSTARTUPINFO) asm("__imp_GetStartupInfoW") = GetStartupInfo;
+#endif
--
2.8.1
This diff is collapsed.
......@@ -14,7 +14,9 @@ ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
COPY no-rtl-func.patch .
COPY missing-snprintf.patch .
COPY winstorecompat.patch .
#COPY winstorecompat.patch .
COPY windowsapp.a.patch .
COPY getstartupinfo.patch .
RUN mkdir /build && cd /build && \
mkdir $TOOLCHAIN_PREFIX && \
......@@ -27,7 +29,8 @@ RUN mkdir /build && cd /build && \
git clone --depth=1 git://git.code.sf.net/p/mingw-w64/mingw-w64 && \
cd mingw-w64 && git am ../../no-rtl-func.patch && \
git am ../../missing-snprintf.patch && \
git am ../../winstorecompat.patch && \
git am ../../windowsapp.a.patch && \
git am ../../getstartupinfo.patch && \
cd .. && \
tar xf gcc-5.3.0.tar.bz2 && \
tar xf binutils-2.26.tar.bz2 && \
......
From 6ab38488dcaf853b616ee636a4714cedff33e1c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 2 Aug 2016 10:47:13 +0200
Subject: [PATCH 2/2] winstorecompat: Add a GetStartupInfo stub
This is required for configure test executables to link when building
with windowsapp.lib
---
mingw-w64-libraries/winstorecompat/Makefile.am | 1 +
.../winstorecompat/src/GetStartupInfo.c | 40 ++++++++++++++++++++++
2 files changed, 41 insertions(+)
create mode 100644 mingw-w64-libraries/winstorecompat/src/GetStartupInfo.c
diff --git a/mingw-w64-libraries/winstorecompat/Makefile.am b/mingw-w64-libraries/winstorecompat/Makefile.am
index 332cae5..81512ce 100644
--- a/mingw-w64-libraries/winstorecompat/Makefile.am
+++ b/mingw-w64-libraries/winstorecompat/Makefile.am
@@ -36,4 +36,5 @@ libwinstorecompat_a_SOURCES = \
src/SHGetFolderPathW.c \
src/QueueTimer.c \
src/Crypto.c \
+ src/GetStartupInfo.c \
$(NULL)
diff --git a/mingw-w64-libraries/winstorecompat/src/GetStartupInfo.c b/mingw-w64-libraries/winstorecompat/src/GetStartupInfo.c
new file mode 100644
index 0000000..110099d
--- /dev/null
+++ b/mingw-w64-libraries/winstorecompat/src/GetStartupInfo.c
@@ -0,0 +1,40 @@
+/*
+ Copyright (c) 2016 mingw-w64 project
+
+ Contributing authors: Hugo Beauzée-Luyssen
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+*/
+
+#define GetStartupInfo __GetStartupInfo
+#include <windows.h>
+#undef GetStartupInfo
+
+VOID WINAPI GetStartupInfo( LPSTARTUPINFO lpStartupInfo )
+{
+ (void)lpStartupInfo;
+}
+
+#ifndef _WIN64
+VOID (WINAPI *__MINGW_IMP_SYMBOL(GetStartupInfoA))(LPSTARTUPINFO) asm("__imp__GetStartupInfoA@4") = GetStartupInfo;
+VOID (WINAPI *__MINGW_IMP_SYMBOL(GetStartupInfoW))(LPSTARTUPINFO) asm("__imp__GetStartupInfoW@4") = GetStartupInfo;
+#else
+VOID (WINAPI *__MINGW_IMP_SYMBOL(GetStartupInfoA))(LPSTARTUPINFO) asm("__imp_GetStartupInfoA") = GetStartupInfo;
+VOID (WINAPI *__MINGW_IMP_SYMBOL(GetStartupInfoW))(LPSTARTUPINFO) asm("__imp_GetStartupInfoW") = GetStartupInfo;
+#endif
--
2.8.1
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment