]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix MinGW option -mcrtdll=
authorPali Rohár <pali@kernel.org>
Sun, 23 Jun 2024 16:40:59 +0000 (18:40 +0200)
committerJonathan Yong <10walls@gmail.com>
Mon, 24 Jun 2024 09:04:31 +0000 (09:04 +0000)
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
gcc/config/mingw/mingw32.h
gcc/doc/invoke.texi

index dde26413e22136aa7e61eaf4cad3d55f503387e7..0a9986c44d40cf1607f41d61f7c9ce16e3074f0e 100644 (file)
@@ -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} " \
index fa6e307476ca410a100d24f9457649828971331b..da8e1e8949e79e6965655d99e64a54a3f03c57a7 100644 (file)
@@ -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} " \
index 580232a76a629d3e524efcf9154a394306a0671a..23d90db292590872f9d472877f5b2a2c0be69d5c 100644 (file)
@@ -36462,13 +36462,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