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

winrt: x86_64: Remove Rtl* func usage

parent 422a28ba
......@@ -12,6 +12,8 @@ ENV TOOLCHAIN_PREFIX=/opt/gcc-$TARGET_TUPLE
ENV MINGW_PREFIX=$TOOLCHAIN_PREFIX/$TARGET_TUPLE
ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
COPY no-rtl-func.patch .
RUN mkdir /build && cd /build && \
mkdir $TOOLCHAIN_PREFIX && \
mkdir $MINGW_PREFIX && \
......@@ -21,6 +23,7 @@ RUN mkdir /build && cd /build && \
git config --global user.name "VideoLAN Buildbot" && \
git config --global user.email buildbot@videolan.org && \
git clone --depth=1 git://git.code.sf.net/p/mingw-w64/mingw-w64 && \
cd mingw-w64 && git am ../../no-rtl-func.patch && cd .. && \
tar xf gcc-5.3.0.tar.bz2 && \
tar xf binutils-2.26.tar.bz2 && \
cd binutils-2.26 && mkdir build && cd build && \
......
From 65b26e230dff7c58c38cb9a42f6f963fbc252ee9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Thu, 21 Apr 2016 16:07:59 +0200
Subject: [PATCH] UGLY HACK: Don't use Rtl* function on win64 when building for
winrt
---
mingw-w64-crt/crt/crt_handler.c | 2 +-
mingw-w64-crt/crt/crtdll.c | 2 +-
mingw-w64-crt/crt/crtexe.c | 2 +-
mingw-w64-crt/crt/gs_support.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-crt/crt/crt_handler.c b/mingw-w64-crt/crt/crt_handler.c
index a1b51ce..8a7983b 100644
--- a/mingw-w64-crt/crt/crt_handler.c
+++ b/mingw-w64-crt/crt/crt_handler.c
@@ -40,7 +40,7 @@ PBYTE _GetPEImageBase (void);
int __mingw_init_ehandler (void);
extern void _fpreset (void);
-#if defined(_WIN64) && !defined(_MSC_VER)
+#if defined(_WIN64_NOPE_NOPE_NOPE) && !defined(_MSC_VER)
EXCEPTION_DISPOSITION __mingw_SEH_error_handler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *);
#define MAX_PDATA_ENTRIES 32
diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c
index 07a1840..026da7a 100644
--- a/mingw-w64-crt/crt/crtdll.c
+++ b/mingw-w64-crt/crt/crtdll.c
@@ -164,7 +164,7 @@ DllMainCRTStartup (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
if (dwReason == DLL_PROCESS_ATTACH)
{
__security_init_cookie ();
-#ifdef _WIN64
+#ifdef _WIN64_NOPE_NOPE_NOPE
__mingw_init_ehandler ();
#endif
}
diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c
index ae37e0f..3be64bb 100644
--- a/mingw-w64-crt/crt/crtexe.c
+++ b/mingw-w64-crt/crt/crtexe.c
@@ -279,7 +279,7 @@ __tmainCRTStartup (void)
_pei386_runtime_relocator ();
__mingw_oldexcpt_handler = SetUnhandledExceptionFilter (_gnu_exception_handler);
-#ifdef _WIN64
+#ifdef _WIN64_NOPE_NOPE_NOPE
__mingw_init_ehandler ();
#endif
_set_invalid_parameter_handler (__mingw_invalidParameterHandler);
diff --git a/mingw-w64-crt/crt/gs_support.c b/mingw-w64-crt/crt/gs_support.c
index dbd95d5..4207fff 100644
--- a/mingw-w64-crt/crt/gs_support.c
+++ b/mingw-w64-crt/crt/gs_support.c
@@ -103,7 +103,7 @@ __declspec(noreturn) void __cdecl
__report_gsfailure (ULONG_PTR StackCookie)
{
volatile UINT_PTR cookie[2] __MINGW_ATTRIB_UNUSED;
-#ifdef _WIN64
+#ifdef _WIN64_NOPE_NOPE_NOPE
ULONG64 controlPC, imgBase, establisherFrame;
PRUNTIME_FUNCTION fctEntry;
PVOID hndData;
--
2.8.0.rc3
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