aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/invoke.texi
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2023-06-14 18:09:17 +0200
committerJonathan Yong <10walls@gmail.com>2023-06-16 10:16:33 +0000
commit453cb585f0f8673a5d69d1b420ffd4b3f53aca00 (patch)
treeb7583958ee2fb44ebe1141541530dc27b6c11d72 /gcc/doc/invoke.texi
parent6586422105eeda80f9129f97024ae46fd9da4bc5 (diff)
downloadgcc-453cb585f0f8673a5d69d1b420ffd4b3f53aca00.zip
gcc-453cb585f0f8673a5d69d1b420ffd4b3f53aca00.tar.gz
gcc-453cb585f0f8673a5d69d1b420ffd4b3f53aca00.tar.bz2
Add MinGW option -mcrtdll= for choosing C RunTime DLL library
It adjust preprocess, compile and link flags, which allows to change default -lmsvcrt library by another provided by MinGW runtime. gcc/ChangeLog: * config/i386/mingw-w64.h (CPP_SPEC): Adjust for -mcrtdll=. (REAL_LIBGCC_SPEC): New define. * config/i386/mingw.opt: Add mcrtdll= * config/i386/mingw32.h (CPP_SPEC): Adjust for -mcrtdll=. (REAL_LIBGCC_SPEC): Adjust for -mcrtdll=. (STARTFILE_SPEC): Adjust for -mcrtdll=. * doc/invoke.texi: Add mcrtdll= documentation. Signed-off-by: Jonathan Yong <10walls@gmail.com>
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r--gcc/doc/invoke.texi24
1 files changed, 23 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 9ecbd32..19d8c1c 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1458,7 +1458,7 @@ See RS/6000 and PowerPC Options.
-munroll-only-small-loops -mlam=@var{choice}}
@emph{x86 Windows Options}
-@gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll
+@gccoptlist{-mconsole -mcrtdll=@var{library} -mcygwin -mno-cygwin -mdll
-mnop-fun-dllimport -mthread
-municode -mwin32 -mwindows -fno-set-stack-executable}
@@ -34292,6 +34292,28 @@ required for console applications.
This option is available for Cygwin and MinGW targets and is
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}.
+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}.
+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
+symlink to (or a copy of) another MinGW CRT import library
+chosen during MinGW compilation. MinGW import library @code{msvcrt-os}
+is for Windows system CRT DLL library @code{msvcrt.dll} and
+in most cases is the default MinGW import library.
+Generally speaking, changing the CRT DLL requires recompiling
+the entire MinGW CRT. This option is for experimental and testing
+purposes only.
+This option is available for MinGW targets.
+
@opindex mdll
@item -mdll
This option is available for Cygwin and MinGW targets. It