From 8d2da358b7088837191a7fae8a19b711ecb47dfa Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 27 Nov 2014 12:58:42 +0100 Subject: macx-ios-clang: only provide default LaunchScreen.xib if using Xcode 6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If using an older version of Xcode, Xcode will sometimes complain that LaunchScreen.xib uses auto layout while the project at the same time has deployment target set to 5.0 (where auto layout is not supported). This is a bug in Xcode really, since LaunchScreen.xib will only be used when running on iOS 7 (otherwise a LaunchImage will be used). This has been fixed in Xcode 6. This patch adds a check for this early on. Change-Id: Ie612c25b413add23e15fc3cb4f9e30bb5292369d Reviewed-by: Tor Arne Vestbø --- mkspecs/macx-ios-clang/features/default_post.prf | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf index 643a17e23e..45ba777630 100644 --- a/mkspecs/macx-ios-clang/features/default_post.prf +++ b/mkspecs/macx-ios-clang/features/default_post.prf @@ -185,13 +185,17 @@ macx-xcode { launch_images.files = $$copy_image.output QMAKE_BUNDLE_DATA += launch_images - # Set up default LaunchScreen to support iPhone6/6+ - launch_screen = LaunchScreen.xib - copy_launch_screen.input = $$QMAKESPEC/$$launch_screen - copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$launch_screen - QMAKE_SUBSTITUTES += copy_launch_screen - launch_screens.files = $$copy_launch_screen.output - QMAKE_BUNDLE_DATA += launch_screens + lessThan(QMAKE_XCODE_VERSION, "6.0") { + warning("You need to update Xcode to version 6 or newer to fully support iPhone6/6+") + } else { + # Set up default LaunchScreen to support iPhone6/6+ + launch_screen = LaunchScreen.xib + copy_launch_screen.input = $$QMAKESPEC/$$launch_screen + copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$launch_screen + QMAKE_SUBSTITUTES += copy_launch_screen + launch_screens.files = $$copy_launch_screen.output + QMAKE_BUNDLE_DATA += launch_screens + } } macx-xcode { -- cgit v1.2.3 From 799f83fc9a5e11194ae56e9d13cd6eb45f2aea24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 1 Dec 2014 12:59:16 +0100 Subject: Decouple caching of iOS/OSX SDK path and version in sdk.prf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Combining them could lead to intermediate builds having cached the path, but not the version, resulting in later version checks failing. Change-Id: Ia10f4268ce7b9e82c81627970236d68c00b80391 Reviewed-by: Richard Moe Gustavsen Reviewed-by: Tor Arne Vestbø --- mkspecs/features/mac/sdk.prf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf index 97be211595..d2e698894f 100644 --- a/mkspecs/features/mac/sdk.prf +++ b/mkspecs/features/mac/sdk.prf @@ -9,11 +9,15 @@ isEmpty(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path) { QMAKE_MAC_SDK_PATH = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version Path 2>/dev/null") isEmpty(QMAKE_MAC_SDK_PATH): error("Could not resolve SDK path for \'$$QMAKE_MAC_SDK\'") cache(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path, set stash, QMAKE_MAC_SDK_PATH) +} else { + QMAKE_MAC_SDK_PATH = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path) +} + +isEmpty(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.version) { QMAKE_MAC_SDK_VERSION = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version SDKVersion 2>/dev/null") isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$$QMAKE_MAC_SDK\'") cache(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.version, set stash, QMAKE_MAC_SDK_VERSION) } else { - QMAKE_MAC_SDK_PATH = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path) QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.version) } -- cgit v1.2.3 From 2b258dc80b34dc785257efa2292457e32da9408d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 22 Nov 2014 20:31:16 -0800 Subject: Make sure plugins under LTCG get the right flags too. Change-Id: I51384b4c3ceca25b6e010ccf67fa0f1995cfa557 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/ltcg.prf | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/ltcg.prf b/mkspecs/features/ltcg.prf index b418135014..1459ccdc40 100644 --- a/mkspecs/features/ltcg.prf +++ b/mkspecs/features/ltcg.prf @@ -41,10 +41,12 @@ CONFIG(release, debug|release) { QMAKE_LFLAGS_LTCG += $$QMAKE_CFLAGS $$QMAKE_CFLAGS_LTCG QMAKE_LFLAGS_APP += $$QMAKE_CFLAGS_APP QMAKE_LFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB + QMAKE_LFLAGS_PLUGIN += $$QMAKE_CFLAGS_SHLIB } else { QMAKE_LFLAGS_LTCG = $$QMAKE_CXXFLAGS $$QMAKE_LFLAGS_LTCG QMAKE_LFLAGS_APP += $$QMAKE_CXXFLAGS_APP QMAKE_LFLAGS_SHLIB += $$QMAKE_CXXFLAGS_SHLIB + QMAKE_LFLAGS_PLUGIN += $$QMAKE_CFLAGS_SHLIB } } -- cgit v1.2.3 From fe6f4b9ad7eff15e6201baea9dad737c792a328c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 22 Nov 2014 21:00:34 -0800 Subject: Fix linking of sources without LTCG to a static lib with LTCG Whenever a binary is created and linked against a static lib that was compiled with LTCG, the final linking step requires the compiler flags so that the pre-compiled data in the shared library can get properly compiled. This could happen for a static build of Qt with LTCG, but also happens frequently for Qt's own build when linking regular libraries and applications against QtBootstrap or QtPlatformSupport. The linking fails when the target is a shared library (example: QtWaylandClient linking against QtPlatformSupport). The .prl file actually contains the "ltcg" flag, so the best solution would actually be to process that flag there and add link_ltcg if any dependent .prl has "ltcg", but I couldn't find out how to do that. Change-Id: I4a75a14d1dcb8c2089a427285e25d5555df7d7d3 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/link_ltcg.prf | 18 ++++++++++++++++++ mkspecs/features/ltcg.prf | 18 +----------------- mkspecs/features/qt_functions.prf | 1 + mkspecs/features/qt_module_pris.prf | 2 ++ 4 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 mkspecs/features/link_ltcg.prf (limited to 'mkspecs') diff --git a/mkspecs/features/link_ltcg.prf b/mkspecs/features/link_ltcg.prf new file mode 100644 index 0000000000..537021f11b --- /dev/null +++ b/mkspecs/features/link_ltcg.prf @@ -0,0 +1,18 @@ +gcc { + # When doing link-time code generation, we need to pass the compiler + # flags during linking the stage too. This file is processed after + # default_post.prf, so the QMAKE_CXXFLAGS already contains + # QMAKE_CXXFLAGS_DEBUG or _RELEASE. + use_c_linker { + # use_c_linker.prf is in effect, use the C flags + QMAKE_LFLAGS_LTCG += $$QMAKE_CFLAGS $$QMAKE_CFLAGS_LTCG + QMAKE_LFLAGS_APP += $$QMAKE_CFLAGS_APP + QMAKE_LFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB + QMAKE_LFLAGS_PLUGIN += $$QMAKE_CFLAGS_SHLIB + } else { + QMAKE_LFLAGS_LTCG = $$QMAKE_CXXFLAGS $$QMAKE_LFLAGS_LTCG + QMAKE_LFLAGS_APP += $$QMAKE_CXXFLAGS_APP + QMAKE_LFLAGS_SHLIB += $$QMAKE_CXXFLAGS_SHLIB + QMAKE_LFLAGS_PLUGIN += $$QMAKE_CFLAGS_SHLIB + } +} diff --git a/mkspecs/features/ltcg.prf b/mkspecs/features/ltcg.prf index 1459ccdc40..b0765a85c3 100644 --- a/mkspecs/features/ltcg.prf +++ b/mkspecs/features/ltcg.prf @@ -31,25 +31,9 @@ CONFIG(release, debug|release) { QMAKE_CXXFLAGS_LTCG = QMAKE_LFLAGS_LTCG = } - - # When doing link-time code generation, we need to pass the compiler - # flags during linking stage too. This file is processed after - # default_post.prf, so the QMAKE_CXXFLAGS already contains - # QMAKE_CXXFLAGS_DEBUG or _RELEASE. - use_c_linker { - # use_c_linker.prf is in effect, use the C flags - QMAKE_LFLAGS_LTCG += $$QMAKE_CFLAGS $$QMAKE_CFLAGS_LTCG - QMAKE_LFLAGS_APP += $$QMAKE_CFLAGS_APP - QMAKE_LFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB - QMAKE_LFLAGS_PLUGIN += $$QMAKE_CFLAGS_SHLIB - } else { - QMAKE_LFLAGS_LTCG = $$QMAKE_CXXFLAGS $$QMAKE_LFLAGS_LTCG - QMAKE_LFLAGS_APP += $$QMAKE_CXXFLAGS_APP - QMAKE_LFLAGS_SHLIB += $$QMAKE_CXXFLAGS_SHLIB - QMAKE_LFLAGS_PLUGIN += $$QMAKE_CFLAGS_SHLIB - } } + load(link_ltcg) QMAKE_CFLAGS *= $$QMAKE_CFLAGS_LTCG QMAKE_CXXFLAGS *= $$QMAKE_CXXFLAGS_LTCG QMAKE_LFLAGS *= $$QMAKE_LFLAGS_LTCG diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index a9a622dd1d..7961f6512a 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -68,6 +68,7 @@ defineTest(qtAddModule) { using_privates = true export(using_privates) } + contains(MODULE_CONFIG, ltcg): CONFIG += link_ltcg qtProcessModuleFlags(CONFIG, QT.$${1}.CONFIG) qtProcessModuleFlags(DEFINES, QT.$${1}.DEFINES) diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index 9a876caf5e..03a8e5db71 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -66,6 +66,8 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri module_build_type = internal_module: \ module_build_type += internal_module + ltcg: \ + module_build_type += ltcg !isEmpty(MODULE_CONFIG): \ module_config = "QT.$${MODULE_ID}.CONFIG = $$MODULE_CONFIG" else: \ -- cgit v1.2.3 From 1018502722ee70dd077304e35ff4600853143571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 1 Dec 2014 15:13:05 +0100 Subject: iOS: Use DISTCLEAN_DEPS instead of custom distclean target Change-Id: I1fb6dc4c9ef3623f58a9c8412499df7b9f9ff9bf Reviewed-by: Oswald Buddenhagen --- mkspecs/macx-ios-clang/features/default_post.prf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf index 45ba777630..aa849eb8b1 100644 --- a/mkspecs/macx-ios-clang/features/default_post.prf +++ b/mkspecs/macx-ios-clang/features/default_post.prf @@ -68,8 +68,7 @@ equals(TEMPLATE, app) { debug-iphonesimulator-distclean debug-iphoneos-distclean \ release-iphonesimulator-distclean release-iphoneos-distclean QMAKE_EXTRA_TARGETS += xcode_distclean - distclean.depends = xcode_distclean - QMAKE_EXTRA_TARGETS += distclean + DISTCLEAN_DEPS += xcode_distclean mkpath($$OUT_PWD)|error("Aborting.") args = -- cgit v1.2.3 From 0fa5310425665394e0d4ff4b6747b1290dcef7d5 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 4 Dec 2014 12:38:08 +0100 Subject: 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 --- mkspecs/android-g++/qmake.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs') 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): \ -- cgit v1.2.3 From c43133c81ea9abc10b42f1bd46c756167cad35d3 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 3 Dec 2014 11:18:16 +0100 Subject: Make no_debug_info also strip out -gstabs Since QtWebKit started using stabs on some platforms to reducing memory pressure during linking, the tricks to strip out debug-info in the internals no longer worked because no-debug-info doesn't strip the -gstabs compiler and linker flags. Change-Id: I151088f29058b8fe50cba9aa3ec8ecd84b85d7d8 Reviewed-by: Jocelyn Turcotte Reviewed-by: Oswald Buddenhagen --- mkspecs/features/no_debug_info.prf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/no_debug_info.prf b/mkspecs/features/no_debug_info.prf index e05410d491..1307679a39 100644 --- a/mkspecs/features/no_debug_info.prf +++ b/mkspecs/features/no_debug_info.prf @@ -7,8 +7,8 @@ win32-msvc2*|wince*msvc* { QMAKE_CXXFLAGS_DEBUG -= -Zi QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zi } else { - QMAKE_CFLAGS -= -g -ggdb3 - QMAKE_CXXFLAGS -= -g -ggdb3 - QMAKE_LFLAGS -= -g -ggdb3 - QMAKE_LIBFLAGS -= -g -ggdb3 + QMAKE_CFLAGS -= -g -ggdb3 -gstabs + QMAKE_CXXFLAGS -= -g -ggdb3 -gstabs + QMAKE_LFLAGS -= -g -ggdb3 -gstabs + QMAKE_LIBFLAGS -= -g -ggdb3 -gstabs } -- cgit v1.2.3