Jacek Caban : winegcc: Use msvcrt by default for PE targets.
Alexandre Julliard
julliard at winehq.org
Fri May 14 15:47:04 CDT 2021
Module: wine
Branch: master
Commit: 87e1e435069b640c6f3e4355c9cbbe8f3b62a8fc
URL: https://source.winehq.org/git/wine.git/?a=commit;h=87e1e435069b640c6f3e4355c9cbbe8f3b62a8fc
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri May 14 16:53:40 2021 +0200
winegcc: Use msvcrt by default for PE targets.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winegcc/winegcc.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 969daa0f96b..404c7b773ae 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -324,6 +324,19 @@ static char* get_temp_file(const char* prefix, const char* suffix)
return tmp;
}
+static int is_pe_target( const struct options *opts )
+{
+ switch(opts->target_platform)
+ {
+ case PLATFORM_MINGW:
+ case PLATFORM_CYGWIN:
+ case PLATFORM_WINDOWS:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
enum tool
{
TOOL_CC,
@@ -1103,7 +1116,7 @@ static void build(struct options* opts)
int generate_app_loader = 1;
const char *crt_lib = NULL, *entry_point = NULL;
int fake_module = 0;
- int is_pe = (opts->target_platform == PLATFORM_WINDOWS || opts->target_platform == PLATFORM_CYGWIN || opts->target_platform == PLATFORM_MINGW);
+ int is_pe = is_pe_target( opts );
unsigned int j;
/* NOTE: for the files array we'll use the following convention:
@@ -2090,6 +2103,8 @@ int main(int argc, char **argv)
if (opts.processor == proc_cpp) linking = 0;
if (linking == -1) error("Static linking is not supported\n");
+ if (!opts.wine_objdir && is_pe_target( &opts )) opts.use_msvcrt = 1;
+
if (opts.files->size == 0) forward(&opts);
else if (linking) build(&opts);
else compile(&opts, lang);
More information about the wine-cvs
mailing list