public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix MinGW option -mcrtdll=
@ 2024-06-23 16:40 Pali Rohár
  2024-06-24 10:03 ` Jonathan Yong
  0 siblings, 1 reply; 2+ messages in thread
From: Pali Rohár @ 2024-06-23 16:40 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jonathan Yong

Add missing msvcr40* and msvcrtd* cases to CPP_SPEC and
document missing _UCRT macro and msvcr71* case.

Fixes commit 453cb585f0f8673a5d69d1b420ffd4b3f53aca00.

gcc/
     * config/i386/mingw-w64.h (CPP_SPEC): Add missing -mcrtdll=
     cases: msvcr40*, msvcrtd*.
     * config/mingw/mingw32.h (CPP_SPEC): Add missing -mcrtdll=
     cases: msvcr40*, msvcrtd*.
     * doc/invoke.texi: Add missing -mcrtdll= cases: msvcr40*,
     msvcrtd*, msvcr71*. Express wildcards with *. Document _UCRT.
---
 gcc/config/i386/mingw-w64.h |  2 ++
 gcc/config/mingw/mingw32.h  |  2 ++
 gcc/doc/invoke.texi         | 13 +++++++------
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h
index dde26413e221..0a9986c44d40 100644
--- a/gcc/config/i386/mingw-w64.h
+++ b/gcc/config/i386/mingw-w64.h
@@ -30,6 +30,8 @@ along with GCC; see the file COPYING3.  If not see
 		 "%{mcrtdll=msvcrt10*:-D__MSVCRT_VERSION__=0x100} " \
 		 "%{mcrtdll=msvcrt20*:-D__MSVCRT_VERSION__=0x200} " \
 		 "%{mcrtdll=msvcrt40*:-D__MSVCRT_VERSION__=0x400} " \
+		 "%{mcrtdll=msvcr40*:-D__MSVCRT_VERSION__=0x400} " \
+		 "%{mcrtdll=msvcrtd*:-D__MSVCRT_VERSION__=0x600} " \
 		 "%{mcrtdll=msvcrt-os*:-D__MSVCRT_VERSION__=0x700} " \
 		 "%{mcrtdll=msvcr70*:-D__MSVCRT_VERSION__=0x700} " \
 		 "%{mcrtdll=msvcr71*:-D__MSVCRT_VERSION__=0x701} " \
diff --git a/gcc/config/mingw/mingw32.h b/gcc/config/mingw/mingw32.h
index fa6e307476ca..da8e1e8949e7 100644
--- a/gcc/config/mingw/mingw32.h
+++ b/gcc/config/mingw/mingw32.h
@@ -99,6 +99,8 @@ along with GCC; see the file COPYING3.  If not see
 		 "%{mcrtdll=msvcrt10*:-D__MSVCRT_VERSION__=0x100} " \
 		 "%{mcrtdll=msvcrt20*:-D__MSVCRT_VERSION__=0x200} " \
 		 "%{mcrtdll=msvcrt40*:-D__MSVCRT_VERSION__=0x400} " \
+		 "%{mcrtdll=msvcr40*:-D__MSVCRT_VERSION__=0x400} " \
+		 "%{mcrtdll=msvcrtd*:-D__MSVCRT_VERSION__=0x600} " \
 		 "%{mcrtdll=msvcrt-os*:-D__MSVCRT_VERSION__=0x700} " \
 		 "%{mcrtdll=msvcr70*:-D__MSVCRT_VERSION__=0x700} " \
 		 "%{mcrtdll=msvcr71*:-D__MSVCRT_VERSION__=0x701} " \
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index c790e2f35184..d715430dc54f 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -36453,13 +36453,14 @@ enabled by default on those targets.
 @opindex mcrtdll
 @item -mcrtdll=@var{library}
 Preprocess, compile or link with specified C RunTime DLL @var{library}.
-This option adjust predefined macros @code{__CRTDLL__}, @code{__MSVCRT__}
-and @code{__MSVCRT_VERSION__} for specified CRT @var{library}, choose
-start file for CRT @var{library} and link with CRT @var{library}.
+This option adjust predefined macros @code{__CRTDLL__}, @code{__MSVCRT__},
+@code{_UCRT} and @code{__MSVCRT_VERSION__} for specified CRT @var{library},
+choose start file for CRT @var{library} and link with CRT @var{library}.
 Recognized CRT library names for proprocessor are:
-@code{crtdll}, @code{msvcrt10}, @code{msvcrt20}, @code{msvcrt40},
-@code{msvcrt-os}, @code{msvcr70}, @code{msvcr80}, @code{msvcr90},
-@code{msvcr100}, @code{msvcr110}, @code{msvcr120} and @code{ucrt}.
+@code{crtdll*}, @code{msvcrt10*}, @code{msvcrt20*}, @code{msvcrt40*},
+@code{msvcr40*}, @code{msvcrtd*}, @code{msvcrt-os*},
+@code{msvcr70*}, @code{msvcr71*}, @code{msvcr80*}, @code{msvcr90*},
+@code{msvcr100*}, @code{msvcr110*}, @code{msvcr120*} and @code{ucrt*}.
 If this options is not specified then the default MinGW import library
 @code{msvcrt} is used for linking and no other adjustment for
 preprocessor is done. MinGW import library @code{msvcrt} is just a
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix MinGW option -mcrtdll=
  2024-06-23 16:40 [PATCH] Fix MinGW option -mcrtdll= Pali Rohár
@ 2024-06-24 10:03 ` Jonathan Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Yong @ 2024-06-24 10:03 UTC (permalink / raw)
  To: Pali Rohár, gcc-patches

On 6/23/24 16:40, Pali Rohár wrote:
> Add missing msvcr40* and msvcrtd* cases to CPP_SPEC and
> document missing _UCRT macro and msvcr71* case.
> 
> Fixes commit 453cb585f0f8673a5d69d1b420ffd4b3f53aca00.
Thanks, pushed to master branch.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-24 10:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-23 16:40 [PATCH] Fix MinGW option -mcrtdll= Pali Rohár
2024-06-24 10:03 ` Jonathan Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).