Commit cbc35152 authored by Alexandre Julliard's avatar Alexandre Julliard

winegcc: Pass -mno-cygwin and -munix flags directly to winebuild.

parent 79335620
...@@ -207,6 +207,7 @@ struct options ...@@ -207,6 +207,7 @@ struct options
int nostartfiles; int nostartfiles;
int nodefaultlibs; int nodefaultlibs;
int noshortwchar; int noshortwchar;
int unix_lib;
int gui_app; int gui_app;
int unicode_app; int unicode_app;
int win16_app; int win16_app;
...@@ -964,7 +965,8 @@ static strarray *get_winebuild_args(struct options *opts) ...@@ -964,7 +965,8 @@ static strarray *get_winebuild_args(struct options *opts)
for (i = 0; i < opts->prefix->size; i++) for (i = 0; i < opts->prefix->size; i++)
strarray_add( spec_args, strmake( "-B%s", opts->prefix->base[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" ); if (opts->unwind_tables) strarray_add( spec_args, "-fasynchronous-unwind-tables" );
else strarray_add( spec_args, "-fno-asynchronous-unwind-tables" ); else strarray_add( spec_args, "-fno-asynchronous-unwind-tables" );
return spec_args; return spec_args;
...@@ -1790,6 +1792,7 @@ int main(int argc, char **argv) ...@@ -1790,6 +1792,7 @@ int main(int argc, char **argv)
{ {
opts.use_msvcrt = 1; opts.use_msvcrt = 1;
raw_compiler_arg = 0; raw_compiler_arg = 0;
strarray_add( opts.winebuild_args, opts.args->base[i] );
} }
else if (strcmp("-mwindows", opts.args->base[i]) == 0) else if (strcmp("-mwindows", opts.args->base[i]) == 0)
{ {
...@@ -1810,6 +1813,11 @@ int main(int argc, char **argv) ...@@ -1810,6 +1813,11 @@ int main(int argc, char **argv)
{ {
raw_compiler_arg = 0; 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) else if (strcmp("-m16", opts.args->base[i]) == 0)
{ {
opts.win16_app = 1; opts.win16_app = 1;
......
...@@ -59,6 +59,9 @@ Set the default entry point of the application to be the Unicode ...@@ -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 This option adds -lgdi32, -lcomdlg32, and -lshell32 to the list of
default libraries, and passes '--subsystem windows' to winebuild default libraries, and passes '--subsystem windows' to winebuild
to build graphical applications. to build graphical applications.
.B \-munix
Set when building the Unix counterpart of a builtin module.
.TP
.IP \fB-nodefaultlibs\fR .IP \fB-nodefaultlibs\fR
Do not use the standard system libraries when linking. These Do not use the standard system libraries when linking. These
include at a minimum -lkernel32, -luser32, -ladvapi32, and include at a minimum -lkernel32, -luser32, -ladvapi32, and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment