Commit c44dead5 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

winebuild: Use -mcpu option for the assembler.

parent 7af9179e
......@@ -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 */
......@@ -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 );
......
......@@ -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;
}
......
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