forked from organicmaps/organicmaps
[android] Fixed x86 and mips toolchains
This commit is contained in:
parent
d499e9c257
commit
f1b10073da
3 changed files with 13 additions and 5 deletions
|
@ -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 \
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue