diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-12-04 12:38:08 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-12-05 08:13:56 +0100 |
commit | 0fa5310425665394e0d4ff4b6747b1290dcef7d5 (patch) | |
tree | 6c48b26f5618c7a626f0c58a51d6aa8bfcb614ce /mkspecs | |
parent | 451668d2524a62845f84cfa8f7297037657972a8 (diff) | |
download | qtbase-0fa5310425665394e0d4ff4b6747b1290dcef7d5.tar.gz qtbase-0fa5310425665394e0d4ff4b6747b1290dcef7d5.tar.bz2 qtbase-0fa5310425665394e0d4ff4b6747b1290dcef7d5.zip |
Android: Enable -fno-builtin-memmove in arm builds
On some devices, a miscompilation of libc.so has caused it to
return the wrong value. Instead of returning the dest pointer,
it returns dest + n. When compiling with optimizations turned
on, gcc may use this return value for subsequent accesses to
dest after the memmove() call, causing memory corruption.
This caused problems e.g. in QVector::prepend() which would
overwrite the whole vector with the new value.
Setting -fno-builtin-memmove disables the optimization and
works around this bug with very little risk or impact.
More information in:
http://code.google.com/p/android/issues/detail?id=81692
[ChangeLog][Android] Fixed device-specific crash on Samsung
Galaxy Tab 3 Lite 7" and some other devices.
Task-number: QTBUG-34984
Change-Id: I0c1347149eb5fe1c298758fe7de81aca4137f652
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/android-g++/qmake.conf | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mkspecs/android-g++/qmake.conf b/mkspecs/android-g++/qmake.conf index e510c2d93c..b0fea50206 100644 --- a/mkspecs/android-g++/qmake.conf +++ b/mkspecs/android-g++/qmake.conf @@ -102,9 +102,9 @@ ANDROID_SOURCES_CXX_STL_INCDIR = $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_ QMAKE_CC = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-gcc equals(ANDROID_TARGET_ARCH, armeabi-v7a): \ - QMAKE_CFLAGS = -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack + QMAKE_CFLAGS = -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -fno-builtin-memmove else: equals(ANDROID_TARGET_ARCH, armeabi): \ - QMAKE_CFLAGS = -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack + QMAKE_CFLAGS = -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -fno-builtin-memmove else: equals(ANDROID_TARGET_ARCH, x86): \ QMAKE_CFLAGS = -ffunction-sections -funwind-tables -O2 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -DANDROID -Wa,--noexecstack else: equals(ANDROID_TARGET_ARCH, mips): \ |