Alexandre Julliard : winegcc: Pass -mno-cygwin and -munix flags directly to winebuild.
Alexandre Julliard
julliard at winehq.org
Wed Jul 1 15:22:48 CDT 2020
Module: wine
Branch: master
Commit: cbc35152c4c4b053d6ff48601c3eead71f083b21
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cbc35152c4c4b053d6ff48601c3eead71f083b21
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jul 1 10:36:42 2020 +0200
winegcc: Pass -mno-cygwin and -munix flags directly to winebuild.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winegcc/winegcc.c | 10 +++++++++-
tools/winegcc/winegcc.man.in | 3 +++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 776d2b6473..29c1b0549d 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -207,6 +207,7 @@ struct options
int nostartfiles;
int nodefaultlibs;
int noshortwchar;
+ int unix_lib;
int gui_app;
int unicode_app;
int win16_app;
@@ -964,7 +965,8 @@ static strarray *get_winebuild_args(struct options *opts)
for (i = 0; i < opts->prefix->size; i++)
strarray_add( spec_args, strmake( "-B%s", opts->prefix->base[i] ));
}
- if (!opts->use_msvcrt) strarray_add( spec_args, "-munix" );
+ if (opts->use_msvcrt) strarray_add( spec_args, "-mno-cygwin" );
+ if (opts->unix_lib) strarray_add( spec_args, "-munix" );
if (opts->unwind_tables) strarray_add( spec_args, "-fasynchronous-unwind-tables" );
else strarray_add( spec_args, "-fno-asynchronous-unwind-tables" );
return spec_args;
@@ -1790,6 +1792,7 @@ int main(int argc, char **argv)
{
opts.use_msvcrt = 1;
raw_compiler_arg = 0;
+ strarray_add( opts.winebuild_args, opts.args->base[i] );
}
else if (strcmp("-mwindows", opts.args->base[i]) == 0)
{
@@ -1810,6 +1813,11 @@ int main(int argc, char **argv)
{
raw_compiler_arg = 0;
}
+ else if (strcmp("-munix", opts.args->base[i]) == 0)
+ {
+ opts.unix_lib = 1;
+ raw_compiler_arg = 0;
+ }
else if (strcmp("-m16", opts.args->base[i]) == 0)
{
opts.win16_app = 1;
diff --git a/tools/winegcc/winegcc.man.in b/tools/winegcc/winegcc.man.in
index 5550767299..8a14dd59fd 100644
--- a/tools/winegcc/winegcc.man.in
+++ b/tools/winegcc/winegcc.man.in
@@ -59,6 +59,9 @@ Set the default entry point of the application to be the Unicode
This option adds -lgdi32, -lcomdlg32, and -lshell32 to the list of
default libraries, and passes '--subsystem windows' to winebuild
to build graphical applications.
+.B \-munix
+Set when building the Unix counterpart of a builtin module.
+.TP
.IP \fB-nodefaultlibs\fR
Do not use the standard system libraries when linking. These
include at a minimum -lkernel32, -luser32, -ladvapi32, and
More information about the wine-cvs
mailing list