Alexandre Julliard : winegcc: Disable setting image base address on Android.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 16 09:43:47 CST 2015


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Nov 16 23:30:10 2015 +0900

winegcc: Disable setting image base address on Android.

The Android linker doesn't handle this correctly.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/winegcc/utils.h   | 7 ++++++-
 tools/winegcc/winegcc.c | 7 +++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/tools/winegcc/utils.h b/tools/winegcc/utils.h
index 789b4ea..536fb2d 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 ee5ac6b..c07243b 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)
         {




More information about the wine-cvs mailing list