From c84114acee48a05e2445e7b487ef43e9861ddd95 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 2 Aug 2013 10:14:01 +0200 Subject: [PATCH] Android: Fix crash when compiling release mode for armv5 When building in thumb mode for armv5 applications will crash with SIGILL on startup. This has been observed on armv7 devices and emulators. It could be a bug in the gcc 4.4.3 toolchain, but since the other toolchains in the NDK have other bugs that make it impossible to use them for building, we need to disable thumb until the cross-compiler has been fixed. Task-number: QTBUG-31338 Change-Id: I22dd228158ef8c43b0b1d6e549d5725c1930536b Reviewed-by: Thiago Macieira Reviewed-by: Paul Olav Tvete --- mkspecs/android-g++/qmake.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mkspecs/android-g++/qmake.conf b/mkspecs/android-g++/qmake.conf index 48b8e2119a5..bcdfe068977 100644 --- a/mkspecs/android-g++/qmake.conf +++ b/mkspecs/android-g++/qmake.conf @@ -109,8 +109,12 @@ equals(ANDROID_TARGET_ARCH, x86) { QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -O2 QMAKE_CFLAGS_DEBUG = -g -fno-omit-frame-pointer } else { # arm - QMAKE_CFLAGS_RELEASE = -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 - QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 + QMAKE_CFLAGS_RELEASE = -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 + QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 + equals(ANDROID_TARGET_ARCH, armeabi-v7a) { + QMAKE_CFLAGS_RELEASE += -mthumb + QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -mthumb + } QMAKE_CFLAGS_DEBUG = -g -marm -O0 -fno-omit-frame-pointer }