mingw-w64-cross-gcc: Fix patches

This commit is contained in:
Alexey Pavlov
2020-10-26 22:42:57 +03:00
parent d103a1db1c
commit 6b6e88cbb2
3 changed files with 49 additions and 3 deletions

View File

@@ -0,0 +1,44 @@
From d8cd8d0211dcd606a3753a6b3c36c19a7b1672dc Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 5 Aug 2015 23:36:13 +0100
Subject: [PATCH 05/19] master Windows: New feature to allow overriding
-lmsvcrt
Added in support of the MinGW-w64 WIP feature "agile mscvrt dll" where
a process' loaded msvc runtime is used by a newly loaded DLL rather than
always using msvcrt.dll
---
gcc/config/i386/cygming.opt | 3 +++
gcc/config/i386/mingw32.h | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/config/i386/cygming.opt b/gcc/config/i386/cygming.opt
index a9074bf..e1d89e2 100644
--- a/gcc/config/i386/cygming.opt
+++ b/gcc/config/i386/cygming.opt
@@ -22,6 +22,9 @@ mconsole
Target RejectNegative
Create console application.
+mcrtdll=
+Target RejectNegative Joined
+
mdll
Target RejectNegative
Generate code for a DLL.
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index 4ac5f68..f875e7b 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -165,7 +165,7 @@ along with GCC; see the file COPYING3. If not see
#define REAL_LIBGCC_SPEC \
"%{mthreads:-lmingwthrd} -lmingw32 \
" SHARED_LIBGCC_SPEC " \
- -lmoldname -lmingwex -lmsvcrt"
+ -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
--
2.7.1

View File

@@ -44,7 +44,8 @@ source=(https://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/gcc-${pkgver}.tar.gz
0151-makedeps-properly-handle-win-paths.patch
0152-gcc-9-branch-clone_function_name_1-Retain-any-stdcall-suffix.patch
0153-libgomp-Don-t-hard-code-MS-printf-attributes.patch
0154-gcc-config-i386-mingw32.h-Ensure-lmsvcrt-precede-lke.patch
0154-Windows-New-feature-to-allow-overriding.patch
0155-gcc-config-i386-mingw32.h-Ensure-lmsvcrt-precede-lke.patch
0950-10.2.0-configure-msys2.patch
0951-10.2.0-msys2-spec.patch
0953-10.2.0-testsuite-msys2.patch)
@@ -73,6 +74,7 @@ sha256sums=('27e879dccc639cd7b0cc08ed575c1669492579529b53c9ff27b0b96265fa867d'
'4233a8d893787413b316de3ac320fd65c46844d463b98c0a98fdc17100cca505'
'21e31addcf13bc6fa6650b02ed0f2e195a1226260ae48c536840cc9230de2cfc'
'276ecc392c777d4b17d771a987e80dca50ff25d8f65671d5de139be73997064b'
'7f5fc74961ec0face6c4c56d3fc3613c38c5133bb68648191065bbf597f3e906'
'c7359f4c7015bc1fb02bc13449fa9826669273bd1f0663ba898decb67e8487fc'
'8b8bfa768c4e21ab45aa6b5815aeea795e05140d690e44e2294ffbb1dcb6e3a2'
'941d9d1d12ab3549a15fe8c26eab35c236a28443a1e32dca23a39d4451b86ae2'
@@ -148,14 +150,14 @@ prepare() {
# MINGW patches
apply_patch_with_msg \
0120-Handle-spaces-in-path-for-default-manifest.patch \
0130-libstdc++-in-out.patch \
0140-gcc-8.2.0-diagnostic-color.patch \
0150-Handle-spaces-in-path-for-default-manifest.patch \
0151-makedeps-properly-handle-win-paths.patch \
0152-gcc-9-branch-clone_function_name_1-Retain-any-stdcall-suffix.patch \
0153-libgomp-Don-t-hard-code-MS-printf-attributes.patch \
0154-gcc-config-i386-mingw32.h-Ensure-lmsvcrt-precede-lke.patch
0154-Windows-New-feature-to-allow-overriding.patch \
0155-gcc-config-i386-mingw32.h-Ensure-lmsvcrt-precede-lke.patch
# MSYS2 Patches