diff --git a/tools/winegcc/utils.h b/tools/winegcc/utils.h index 789b4ea973f..536fb2d2f97 100644 --- a/tools/winegcc/utils.h +++ b/tools/winegcc/utils.h @@ -42,7 +42,12 @@ enum target_cpu enum target_platform { - PLATFORM_UNSPECIFIED, PLATFORM_APPLE, PLATFORM_SOLARIS, PLATFORM_WINDOWS, PLATFORM_CYGWIN + PLATFORM_UNSPECIFIED, + PLATFORM_APPLE, + PLATFORM_ANDROID, + PLATFORM_SOLARIS, + PLATFORM_WINDOWS, + PLATFORM_CYGWIN }; void error(const char* s, ...) DECLSPEC_NORETURN; diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index ee5ac6befbf..c07243b620a 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -171,6 +171,7 @@ static const struct { { "macos", PLATFORM_APPLE }, { "darwin", PLATFORM_APPLE }, + { "android", PLATFORM_ANDROID }, { "solaris", PLATFORM_SOLARIS }, { "cygwin", PLATFORM_CYGWIN }, { "mingw32", PLATFORM_WINDOWS }, @@ -229,6 +230,8 @@ static const enum target_cpu build_cpu = CPU_ARM64; #ifdef __APPLE__ static enum target_platform build_platform = PLATFORM_APPLE; +#elif defined(__ANDROID__) +static enum target_platform build_platform = PLATFORM_ANDROID; #elif defined(__sun) static enum target_platform build_platform = PLATFORM_SOLARIS; #elif defined(__CYGWIN__) @@ -384,6 +387,7 @@ static const strarray* get_lddllflags( const struct options *opts, const strarra } break; + case PLATFORM_ANDROID: case PLATFORM_SOLARIS: case PLATFORM_UNSPECIFIED: strarray_add( flags, "-shared" ); @@ -1121,6 +1125,9 @@ static void build(struct options* opts) strarray_add(tmp_files, mapfile); } break; + case PLATFORM_ANDROID: + /* not supported on Android */ + break; default: if (opts->image_base) {