summaryrefslogtreecommitdiffstats
path: root/PATCHES/0006-Windows-New-feature-to-allow-overriding.patch
blob: 432fa18f0713b4e4cc978533364f0ca7b3f6ce85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff -ruNb gcc-11.1.0.orig/gcc/config/i386/cygming.opt gcc-11.1.0/gcc/config/i386/cygming.opt
--- gcc-11.1.0.orig/gcc/config/i386/cygming.opt	2021-04-27 12:00:13.000000000 +0200
+++ gcc-11.1.0/gcc/config/i386/cygming.opt	2021-04-28 14:37:45.671358493 +0200
@@ -22,6 +22,9 @@
 Target RejectNegative
 Create console application.
 
+mcrtdll=
+Target RejectNegative Joined
+
 mdll
 Target RejectNegative
 Generate code for a DLL.
diff -ruNb gcc-11.1.0.orig/gcc/config/i386/mingw32.h gcc-11.1.0/gcc/config/i386/mingw32.h
--- gcc-11.1.0.orig/gcc/config/i386/mingw32.h	2021-04-27 12:00:13.000000000 +0200
+++ gcc-11.1.0/gcc/config/i386/mingw32.h	2021-04-28 14:38:47.999199541 +0200
@@ -177,7 +177,7 @@
 #define REAL_LIBGCC_SPEC \
   "%{mthreads:-lmingwthrd} -lmingw32 \
    " SHARED_LIBGCC_SPEC " \
-   -lmoldname -lmingwex -lmsvcrt -lkernel32"
+   -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*} -lkernel32"
 
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \