winebuild: Use -mcpu option for the assembler.

This commit is contained in:
André Hentschel 2011-04-27 19:45:11 +02:00 committed by Alexandre Julliard
parent 7af9179eb9
commit c44dead5f6
3 changed files with 7 additions and 3 deletions

View File

@ -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 */

View File

@ -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 );

View File

@ -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;
}