From 9dcdca1563f95ff6e8ce5a7da9c697e8e661606d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 25 Aug 2017 23:25:08 +0300 Subject: [PATCH] Update to the latest version of mingw-w64 with the local patches merged --- Dockerfile | 5 +---- patches/mingw-0001.patch | 42 ---------------------------------------- patches/mingw-0002.patch | 27 -------------------------- 3 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 patches/mingw-0001.patch delete mode 100644 patches/mingw-0002.patch diff --git a/Dockerfile b/Dockerfile index 4908392..a319838 100644 --- a/Dockerfile +++ b/Dockerfile @@ -70,10 +70,7 @@ RUN cd llvm && mkdir build && cd build && cmake \ RUN git clone --depth=1 git://git.code.sf.net/p/mingw-w64/mingw-w64 && \ cd mingw-w64 && \ - git checkout 1e81200e88f19e440bbe646bfb410159ff8b0d51 -COPY patches/mingw-*.patch /build/patches/ -RUN cd mingw-w64 && \ - git am /build/patches/mingw-*.patch + git checkout 5a9fa9ea1e662fc73db514328049555e4bf68ac4 #FIXME: Move this UP! diff --git a/patches/mingw-0001.patch b/patches/mingw-0001.patch deleted file mode 100644 index b15a3cd..0000000 --- a/patches/mingw-0001.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 8dedb3528699061cab1fde4c80847ee492226d42 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Storsj=C3=B6?= -Date: Fri, 25 Aug 2017 10:55:45 +0300 -Subject: [PATCH 1/2] headers: Add casts in ua_wcs*chr in stralign.h -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When building libcxx, a version of wcschr that returns const -is provided, breaking compilation here since the return from -wcschr is returned directly as if it were a const pointer. -By adding these casts, compilation succeeds. - -This matches the calls to uaw_wcschr and uaw_wcsrchr directly -below, having similar casts. - -Signed-off-by: Martin Storsjö ---- - mingw-w64-headers/include/stralign.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/mingw-w64-headers/include/stralign.h b/mingw-w64-headers/include/stralign.h -index 9b5637d..f4d9d6d 100644 ---- a/mingw-w64-headers/include/stralign.h -+++ b/mingw-w64-headers/include/stralign.h -@@ -118,11 +118,11 @@ extern "C" { - - #ifndef __CRT__NO_INLINE - __CRT_INLINE PUWSTR_C ua_wcschr(PCUWSTR String,WCHAR Character) { -- if(WSTR_ALIGNED(String)) return wcschr((PCWSTR)String,Character); -+ if(WSTR_ALIGNED(String)) return (PUWSTR_C)wcschr((PCWSTR)String,Character); - return (PUWSTR_C)uaw_wcschr(String,Character); - } - __CRT_INLINE PUWSTR_C ua_wcsrchr(PCUWSTR String,WCHAR Character) { -- if(WSTR_ALIGNED(String)) return wcsrchr((PCWSTR)String,Character); -+ if(WSTR_ALIGNED(String)) return (PUWSTR_C)wcsrchr((PCWSTR)String,Character); - return (PUWSTR_C)uaw_wcsrchr(String,Character); - } - #if defined(__cplusplus) && defined(_WConst_Return) --- -2.7.4 - diff --git a/patches/mingw-0002.patch b/patches/mingw-0002.patch deleted file mode 100644 index 2a5b658..0000000 --- a/patches/mingw-0002.patch +++ /dev/null @@ -1,27 +0,0 @@ -From ac615730861d430aa38435ecb55031316062d6f6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Storsj=C3=B6?= -Date: Fri, 25 Aug 2017 12:02:02 +0300 -Subject: [PATCH 2/2] crt: Include _strftime_l in msvcrt.def.in - -This fixes linking of libc++, which uses this function. libc++ -needs a msvcrt new enough to provide this function (present -since msvcr90 in the numbered msvcrt DLLs). ---- - mingw-w64-crt/lib-common/msvcrt.def.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in b/mingw-w64-crt/lib-common/msvcrt.def.in -index c63edd2..35c685d 100644 ---- a/mingw-w64-crt/lib-common/msvcrt.def.in -+++ b/mingw-w64-crt/lib-common/msvcrt.def.in -@@ -1481,6 +1481,7 @@ strcspn - strerror - ; strerror_s replaced by emu - strftime -+_strftime_l - strlen - strncat - strncat_s --- -2.7.4 -