André Hentschel : winebuild: Use -mcpu option for the assembler.

Alexandre Julliard julliard at winehq.org
Thu Apr 28 12:18:55 CDT 2011


Module: wine
Branch: master
Commit: c44dead5f6f9c118ec4bbab058a9fa6bf9696e6b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c44dead5f6f9c118ec4bbab058a9fa6bf9696e6b

Author: André Hentschel <nerv at dawncrow.de>
Date:   Wed Apr 27 19:45:11 2011 +0200

winebuild: Use -mcpu option for the assembler.

---

 tools/winebuild/build.h |    1 +
 tools/winebuild/main.c  |    7 ++++---
 tools/winebuild/utils.c |    2 ++
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index 2429446..b64c9a0 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -361,5 +361,6 @@ extern char **lib_path;
 extern char *as_command;
 extern char *ld_command;
 extern char *nm_command;
+extern char *cpu_option;
 
 #endif  /* __WINE_BUILD_H */
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index f6d39b0..55908d5 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -88,6 +88,7 @@ static int fake_module;
 char *as_command = NULL;
 char *ld_command = NULL;
 char *nm_command = NULL;
+char *cpu_option = NULL;
 
 static int nb_res_files;
 static char **res_files;
@@ -379,11 +380,11 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
             lib_path[nb_lib_paths++] = xstrdup( optarg );
             break;
         case 'm':
-            if (strcmp( optarg, "16" ) && strcmp( optarg, "32" ) && strcmp( optarg, "64" ))
-                fatal_error( "Invalid -m option '%s', expected -m16, -m32 or -m64\n", optarg );
             if (!strcmp( optarg, "16" )) spec->type = SPEC_WIN16;
             else if (!strcmp( optarg, "32" )) force_pointer_size = 4;
-            else force_pointer_size = 8;
+            else if (!strcmp( optarg, "64" )) force_pointer_size = 8;
+            else if (!strncmp( optarg, "cpu=", 4 )) cpu_option = xstrdup( optarg + 4 );
+            else fatal_error( "Invalid -m option '%s', expected -m16, -m32, -m64 or -mcpu\n", optarg );
             break;
         case 'M':
             spec->main_module = xstrdup( optarg );
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index ad637b6..931fc49 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -362,6 +362,8 @@ struct strarray *get_as_command(void)
             break;
         }
     }
+
+    if (cpu_option) strarray_add_one( args, strmake("-mcpu=%s", cpu_option) );
     return args;
 }
 




More information about the wine-cvs mailing list