Module: wine Branch: master Commit: 4768b11c2454168bba62d710f5c66e466620aa66 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4768b11c2454168bba62d710f5...
Author: Damjan Jovanovic damjan.jov@gmail.com Date: Thu Jun 14 20:34:47 2012 +0200
winebuild: Support the mingw32 target without an i[3456]86- prefix.
---
tools/winebuild/main.c | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c index 0eeeb04..28ecec8 100644 --- a/tools/winebuild/main.c +++ b/tools/winebuild/main.c @@ -191,12 +191,21 @@ static void set_target( const char *target )
/* get the CPU part */
- if (!(p = strchr( spec, '-' ))) fatal_error( "Invalid target specification '%s'\n", target ); - *p++ = 0; - if ((target_cpu = get_cpu_from_name( spec )) == -1) - fatal_error( "Unrecognized CPU '%s'\n", spec ); - platform = p; - if ((p = strrchr( p, '-' ))) platform = p + 1; + if ((p = strchr( spec, '-' ))) + { + *p++ = 0; + if ((target_cpu = get_cpu_from_name( spec )) == -1) + fatal_error( "Unrecognized CPU '%s'\n", spec ); + platform = p; + if ((p = strrchr( p, '-' ))) platform = p + 1; + } + else if (!strcmp( spec, "mingw32" )) + { + target_cpu = CPU_x86; + platform = spec; + } + else + fatal_error( "Invalid target specification '%s'\n", target );
/* get the OS part */