diff options
-rw-r--r-- | android/jni/Android.mk | 8 | ||||
-rw-r--r-- | android/jni/com/mapswithme/core/jni_helper.cpp | 8 | ||||
-rw-r--r-- | tools/mkspecs/android-g++/qmake.conf | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 968f95c59b..a2215d777c 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -10,6 +10,14 @@ LOCAL_CFLAGS := -ffunction-sections -fdata-sections TARGET_PLATFORM := android-5 +ifeq ($(TARGET_ARCH_ABI), mips) + TARGET_PLATFORM := android-9 +else + ifeq ($(TARGET_ARCH_ABI), x86) + TARGET_PLATFORM := android-9 + endif +endif + LOCAL_HEADER_FILES := \ com/mapswithme/core/jni_helper.hpp \ com/mapswithme/core/logging.hpp \ diff --git a/android/jni/com/mapswithme/core/jni_helper.cpp b/android/jni/com/mapswithme/core/jni_helper.cpp index 86033545d2..92c08e76ab 100644 --- a/android/jni/com/mapswithme/core/jni_helper.cpp +++ b/android/jni/com/mapswithme/core/jni_helper.cpp @@ -12,7 +12,7 @@ extern "C" { /// fix for stack unwinding problem during exception handling on Android 2.1 /// http://code.google.com/p/android/issues/detail?id=20176 -#ifndef __mips__ +#ifdef __arm__ typedef long unsigned int *_Unwind_Ptr; @@ -27,18 +27,18 @@ extern "C" static void* g_func_ptr; -#endif // __mips__ +#endif // __arm__ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM * jvm, void *) { /// fix for stack unwinding problem during exception handling on Android 2.1 /// http://code.google.com/p/android/issues/detail?id=20176 -#ifndef __mips__ +#ifdef __arm__ // when i throw exception, linker maybe can't find __gnu_Unwind_Find_exidx(lazy binding issue??) // so I force to bind this symbol at shared object load time g_func_ptr = (void*)__gnu_Unwind_Find_exidx; -#endif // __mips__ +#endif // __arm__ g_jvm = jvm; jni::InitSystemLog(); diff --git a/tools/mkspecs/android-g++/qmake.conf b/tools/mkspecs/android-g++/qmake.conf index 0ccc8ec8e1..ba7fe7df2c 100644 --- a/tools/mkspecs/android-g++/qmake.conf +++ b/tools/mkspecs/android-g++/qmake.conf @@ -21,7 +21,7 @@ TOOLCHAIN_VERSION = 4.6 contains(ANDROID_TARGET_ABI, x86) { NDK_TOOLCHAIN = x86-$$TOOLCHAIN_VERSION ANDROID_TARGET_ARCH = x86 - ANDROID_CC_PREFIX = i686-android-linux + ANDROID_CC_PREFIX = i686-linux-android # NOTE: x86 works only from android-9 and above! ANDROID_PLATFORM = android-9 } else { |