Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDmitry Yunitsky <yunik@mapswithme.com>2016-05-27 16:32:27 +0300
committerDmitry Yunitsky <yunik@mapswithme.com>2016-05-30 14:52:01 +0300
commit02b0dfd5131dc08d6e8d7bf49d6b202f7c79dd97 (patch)
treef7d81f6066b1be900d8375e111756fb213780cbe /tools
parent6d5b599cf0bfd263634e839b4f652a91523b44f3 (diff)
[android] Reverted NDK to avoid crashes on x86.
Diffstat (limited to 'tools')
-rw-r--r--tools/android/cxxabi.cc_patch15
-rw-r--r--tools/mkspecs/android-clang/qmake.conf11
2 files changed, 21 insertions, 5 deletions
diff --git a/tools/android/cxxabi.cc_patch b/tools/android/cxxabi.cc_patch
new file mode 100644
index 0000000000..79412c529e
--- /dev/null
+++ b/tools/android/cxxabi.cc_patch
@@ -0,0 +1,15 @@
+diff --git a/Users/yunik/devtools/android-sdk/ndk-bundle/sources/cxx-stl/gabi++/src/cxxabi.cc b/android/../tools/android/cxxabi.cc
+index 3f428d9..9c0e8bc 100644
+--- a/Users/yunik/devtools/android-sdk/ndk-bundle/sources/cxx-stl/gabi++/src/cxxabi.cc
++++ b/android/../tools/android/cxxabi.cc
+@@ -296,7 +296,9 @@ namespace __cxxabiv1 {
+
+ extern "C" void *__cxa_allocate_exception(size_t thrown_size) _GABIXX_NOEXCEPT {
+ size_t size = thrown_size + sizeof(__cxa_exception);
+- __cxa_exception *buffer = static_cast<__cxa_exception*>(malloc(size));
++ // Bugfix for crashes appearing on stack unwinding, taken from https://android-review.googlesource.com/#/c/182443/
++ //__cxa_exception *buffer = static_cast<__cxa_exception*>(malloc(size));
++ __cxa_exception *buffer = static_cast<__cxa_exception*>(memalign(__alignof__(__cxa_exception), size));
+ if (!buffer) {
+ // Since Android uses memory-overcommit, we enter here only when
+ // the exception object is VERY large. This will propably never happen.
diff --git a/tools/mkspecs/android-clang/qmake.conf b/tools/mkspecs/android-clang/qmake.conf
index 6c498513b6..be8b5ffc5e 100644
--- a/tools/mkspecs/android-clang/qmake.conf
+++ b/tools/mkspecs/android-clang/qmake.conf
@@ -5,18 +5,19 @@
#########################################################################
ANDROID_TARGET_ABI = $$(NDK_ABI)
-# By default use armv7 architecture with hardware math co-processor.
-isEmpty( ANDROID_TARGET_ABI ): ANDROID_TARGET_ABI = armeabi-v7a-hard
+# By default use armv7 architecture.
+isEmpty( ANDROID_TARGET_ABI ): ANDROID_TARGET_ABI = armeabi-v7a
# Minimum supported platform is Android 4.0.3.
ANDROID_PLATFORM = android-15
-GCC_VERSION = 4.9
+GCC_VERSION = 4.8
+CLANG_VERSION = 3.6
MAKEFILE_GENERATOR = UNIX
-QMAKE_COMPILER = $$(NDK_ROOT)/toolchains/llvm/prebuilt/$$(NDK_HOST)/bin/clang
+QMAKE_COMPILER = $$(NDK_ROOT)/toolchains/llvm-$$CLANG_VERSION/prebuilt/$$(NDK_HOST)/bin/clang
QMAKE_CC = $$QMAKE_COMPILER
-QMAKE_CXX = $$(NDK_ROOT)/toolchains/llvm/prebuilt/$$(NDK_HOST)/bin/clang++
+QMAKE_CXX = $$(NDK_ROOT)/toolchains/llvm-$$CLANG_VERSION/prebuilt/$$(NDK_HOST)/bin/clang++
QMAKE_LINK_C = $$QMAKE_CC
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
QMAKE_LINK = $$QMAKE_CXX