From 0cd776f2cdeebb6b8d2cd5d17be7a1d561708ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 16 Jan 2014 13:47:19 +0100 Subject: iOS: Prevent trying to use both libc++ and libstdc++ Static builds of Qt will automatically enable C++11 for all projects, but this happens in mac/default_post which is after our check. Change-Id: I22a01e5d876242263fa31f8a404a65905c6c1877 Reviewed-by: Simon Hausmann --- mkspecs/macx-ios-clang/features/default_post.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs/macx-ios-clang/features/default_post.prf') diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf index 3428823624..09e1951be0 100644 --- a/mkspecs/macx-ios-clang/features/default_post.prf +++ b/mkspecs/macx-ios-clang/features/default_post.prf @@ -184,7 +184,7 @@ macx-xcode { launch_images.files = $$copy_image.output QMAKE_BUNDLE_DATA += launch_images - !c++11 { + !contains(QT_CONFIG, c++11) { # Explicitly use libstdc++ if C++11 support is not enabled, # as otherwise Xcode will choose the compiler default based # on the deployment target, which for iOS 7 is libc++. This -- cgit v1.2.3 From c5192b300e7f3e24720a5886a25ed932e0e7f335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 16 Jan 2014 19:43:07 +0100 Subject: iOS: Fix simulator build by enabling SSE2 code paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 3c375a76a13e151496ccfea0a2b3ff9fdc75784f enabled SSE2 in Qt, but we failed to build the files that implemented the SSE2 specific drawhelpers and image functions. Since we know what the iOS simulator supports and the platforms it runs on we can safely enable this ourselves without it being based on a configure test. Change-Id: I0cfc43de80068b89aa47c34ffa84ee1c1734886c Reviewed-by: Tor Arne Vestbø --- mkspecs/macx-ios-clang/features/default_post.prf | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'mkspecs/macx-ios-clang/features/default_post.prf') diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf index 09e1951be0..6662bb9c8e 100644 --- a/mkspecs/macx-ios-clang/features/default_post.prf +++ b/mkspecs/macx-ios-clang/features/default_post.prf @@ -7,6 +7,9 @@ contains(QMAKE_MAC_SDK, ^iphonesimulator.*) { CONFIG += iphonesimulator } +iphonesimulator_and_iphoneos:iphonesimulator: \ + QMAKE_MAC_SDK ~= s,^iphoneos,iphonesimulator, + # Resolve config so we don't need to use CONFIG() later on CONFIG(iphonesimulator, iphonesimulator|iphoneos) { CONFIG -= iphoneos @@ -118,15 +121,6 @@ equals(TEMPLATE, app) { iphonesimulator.name = Simulator iphoneos.name = Device addExclusiveBuilds(iphonesimulator, iphoneos) - - iphonesimulator_and_iphoneos:iphonesimulator { - QT_ARCH = i386 - QMAKE_MAC_SDK ~= s,^iphoneos,iphonesimulator, - - # Since the CPU feature detection done by configure is limited to one - # target at the moment, we disable SIMD support for simulator. - CONFIG -= simd - } } else: equals(TEMPLATE, subdirs) { # Prevent recursion into host_builds for(subdir, SUBDIRS) { -- cgit v1.2.3 From 4c980d2e9bc8f656179ea32fa3207d98ada59de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 27 Jan 2014 17:27:36 +0100 Subject: Explicitly use libstdc++ for non-C++11 static builds Otherwise the compiler may choose libc++ based on the deployment target, and we'll end up with broken builds due to the mismatch between the two libraries, eg: Undefined symbols for architecture x86_64: "std::ios_base::Init::Init()", referenced from: __GLOBAL__I_a in libQt5Qml.a(qv4object.o) ... "std::ios_base::Init::~Init()", referenced from: __GLOBAL__I_a in libQt5Qml.a(qv4object.o) ... "std::__throw_length_error(char const*)", referenced from: ... This problem is not iOS specific, which is why the logic is moved to the more generic mac/default_post.prf. Change-Id: I28b94e614f9167fc0db84bbf1c88dd97d5629938 Reviewed-by: Oswald Buddenhagen --- mkspecs/macx-ios-clang/features/default_post.prf | 9 --------- 1 file changed, 9 deletions(-) (limited to 'mkspecs/macx-ios-clang/features/default_post.prf') diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf index 6662bb9c8e..28ad095da7 100644 --- a/mkspecs/macx-ios-clang/features/default_post.prf +++ b/mkspecs/macx-ios-clang/features/default_post.prf @@ -178,15 +178,6 @@ macx-xcode { launch_images.files = $$copy_image.output QMAKE_BUNDLE_DATA += launch_images - !contains(QT_CONFIG, c++11) { - # Explicitly use libstdc++ if C++11 support is not enabled, - # as otherwise Xcode will choose the compiler default based - # on the deployment target, which for iOS 7 is libc++. This - # breaks compilation since Qt was built against libstdc++. - QMAKE_CXXFLAGS += -stdlib=libstdc++ - QMAKE_LFLAGS += -stdlib=libstdc++ - } - # Make the default debug information format for debug builds # DWARF instead of DWARF with dSYM. This cuts down build times # for application debug builds significantly, as Xcode doesn't -- cgit v1.2.3