Alexandre Julliard : winebuild: Add a -munix option.

Alexandre Julliard julliard at winehq.org
Mon Jun 17 15:54:19 CDT 2019


Module: wine
Branch: master
Commit: 5061261c5ebbfea147b418da7de97621d7c79c44
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5061261c5ebbfea147b418da7de97621d7c79c44

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jun 17 09:24:25 2019 +0200

winebuild: Add a -munix option.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/winebuild/build.h          | 1 +
 tools/winebuild/main.c           | 2 ++
 tools/winebuild/winebuild.man.in | 4 ++++
 tools/winegcc/winegcc.c          | 1 +
 4 files changed, 8 insertions(+)

diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index 241fd60..382829c 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -358,6 +358,7 @@ extern int verbose;
 extern int link_ext_symbols;
 extern int force_pointer_size;
 extern int unwind_tables;
+extern int unix_lib;
 
 extern char *input_file_name;
 extern char *spec_file_name;
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index 831db5d..d308716 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -46,6 +46,7 @@ int verbose = 0;
 int link_ext_symbols = 0;
 int force_pointer_size = 0;
 int unwind_tables = 0;
+int unix_lib = 0;
 
 #ifdef __i386__
 enum target_cpu target_cpu = CPU_x86;
@@ -411,6 +412,7 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
             else if (!strcmp( optarg, "64" )) force_pointer_size = 8;
             else if (!strcmp( optarg, "arm" )) thumb_mode = 0;
             else if (!strcmp( optarg, "thumb" )) thumb_mode = 1;
+            else if (!strcmp( optarg, "unix" )) unix_lib = 1;
             else if (!strncmp( optarg, "cpu=", 4 )) cpu_option = xstrdup( optarg + 4 );
             else if (!strncmp( optarg, "fpu=", 4 )) fpu_option = xstrdup( optarg + 4 );
             else if (!strncmp( optarg, "arch=", 5 )) arch_option = xstrdup( optarg + 5 );
diff --git a/tools/winebuild/winebuild.man.in b/tools/winebuild/winebuild.man.in
index 461bff6..e9386f9 100644
--- a/tools/winebuild/winebuild.man.in
+++ b/tools/winebuild/winebuild.man.in
@@ -160,6 +160,10 @@ Generate respectively 16-bit, 32-bit or 64-bit code.
 .BI \-marm,\ \-mthumb,\ \-march= option ,\ \-mcpu= option ,\ \-mfpu= option ,\ \-mfloat-abi= option
 Set code generation options for the assembler.
 .TP
+.B \-munix
+Build a library that imports standard functions from the Unix C
+library instead of the Windows runtime.
+.TP
 .BI \-M,\ --main-module= module
 When building a 16-bit dll, set the name of its 32-bit counterpart to
 \fImodule\fR. This is used to enforce that the load order for the
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 242df38..32df2bf 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -845,6 +845,7 @@ static strarray *get_winebuild_args(struct options *opts)
         strarray_add( spec_args, "--target" );
         strarray_add( spec_args, opts->target );
     }
+    if (!opts->use_msvcrt) 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;




More information about the wine-cvs mailing list