From 810eee8c773019168c1fcad8262b847009ec149a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 1 Nov 2012 12:31:36 +0100 Subject: iOS: Bump arch and iOS SDK, now that we require GLES 2.x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now require SDK version 4.3 or above, and armv7. Change-Id: I4766e277a3a4a32712bf2ec27fede694e8316c95 Reviewed-by: Morten Johan Sørvig --- mkspecs/common/ios/GLES/gl.h | 43 ----------------- mkspecs/common/ios/arch.conf | 55 +++++----------------- mkspecs/common/ios/clang.conf | 23 +++------ mkspecs/common/ios/qmake.conf | 6 +-- mkspecs/common/ios/versions.conf | 8 +--- .../unsupported/macx-iosdevice-clang/qmake.conf | 6 +-- 6 files changed, 25 insertions(+), 116 deletions(-) delete mode 100644 mkspecs/common/ios/GLES/gl.h diff --git a/mkspecs/common/ios/GLES/gl.h b/mkspecs/common/ios/GLES/gl.h deleted file mode 100644 index 2b94b162eb..0000000000 --- a/mkspecs/common/ios/GLES/gl.h +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include diff --git a/mkspecs/common/ios/arch.conf b/mkspecs/common/ios/arch.conf index bf03fe752e..3ac84081af 100644 --- a/mkspecs/common/ios/arch.conf +++ b/mkspecs/common/ios/arch.conf @@ -1,38 +1,16 @@ # # Helper to set CPU architecture flags for iOS configurations # -# Depends on: -# -# QMAKE_IPHONEOS_DEPLOYMENT_TARGET - set in mkspecs/common/ios/versions.conf -# -# Note: -# -# Must be included after load(qt_config) in mkspec for auto-detection based -# on GL/ES version (GL/ES 2.x implies armv7 on iOS). -# -# Target architecture for iOS devices (armv6, armv7 or leave blank for default) -QMAKE_IOS_TARGET_ARCH = +# Target architecture for iOS devices (armv7 or leave blank for default) +QMAKE_IOS_TARGET_ARCH = ########################################################################### # Device? !*simulator* { - # Let mkspec specify archictecture - *armv6*: QMAKE_IOS_TARGET_ARCH = armv6 - else:*armv7*: QMAKE_IOS_TARGET_ARCH = armv7 - - # ARMv7 architecture device (see below) is required for OpenGL/ES 2.x - isEmpty(QMAKE_IOS_TARGET_ARCH):contains(QT_CONFIG, opengles2): QMAKE_IOS_TARGET_ARCH = armv7 - - # No target architecture specified? - isEmpty(QMAKE_IOS_TARGET_ARCH) { - # iOS versions < 4.3 can be armv6 or armv7, so need armv6 for max. compatibility, - # assume that building for OpenGL/ES 1.x is targeting armv6 - lessThan(QMAKE_IPHONEOS_DEPLOYMENT_TARGET, "4.3")|contains(QT_CONFIG, opengles1) { - QMAKE_IOS_TARGET_ARCH = armv6 - } else: QMAKE_IOS_TARGET_ARCH = armv7 - } + # ARMv7 architecture device is required for OpenGL/ES 2.x + isEmpty(QMAKE_IOS_TARGET_ARCH): QMAKE_IOS_TARGET_ARCH = armv7 # Samsung S5PC100, Apple A4, A5, A5X equals(QMAKE_IOS_TARGET_ARCH, "armv7") { @@ -46,38 +24,29 @@ QMAKE_IOS_TARGET_ARCH = # NEON instructions QMAKE_IOS_ARM_ARCH += __ARM_NEON__ } else { - # Samsung S5L8900 - if(equals(QMAKE_IOS_TARGET_ARCH, "armv6")) { - # iOS CPU architecture (armv6) - QMAKE_IOS_ARM_ARCH = __ARM_ARCH_6__ - - # ARM instructions - QMAKE_IOS_ARM_FLAGS = -marm -mcpu=arm1176jzf-s - !*clang*: QMAKE_IOS_ARM_FLAGS += -march=armv6 - } else { - # Unsupported architecture - error("Invalid iOS target $${QMAKE_IOS_TARGET_ARCH}! Edit mkspecs/common/ios/arch.conf to specify target architecture.") - } + # Unsupported architecture + error("Invalid iOS target $${QMAKE_IOS_TARGET_ARCH}!") } # Simulator is i386 only } else: QMAKE_IOS_TARGET_ARCH = i386 # iOS architecture build flags QMAKE_IOS_ARCH_FLAGS = -arch $$QMAKE_IOS_TARGET_ARCH + QMAKE_CFLAGS += $$QMAKE_IOS_ARCH_FLAGS QMAKE_CXXFLAGS += $$QMAKE_IOS_ARCH_FLAGS QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_ARCH_FLAGS QMAKE_LFLAGS += $$QMAKE_IOS_ARCH_FLAGS -QMAKE_IOS_TARGET_ARCH = -QMAKE_IOS_ARCH_FLAGS = # Architecture specific defines/flags !*simulator* { DEFINES += $$QMAKE_IOS_ARM_ARCH - QMAKE_IOS_ARM_ARCH = - QMAKE_CFLAGS += $$QMAKE_IOS_ARM_FLAGS QMAKE_CXXFLAGS += $$QMAKE_IOS_ARM_FLAGS QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_ARM_FLAGS - QMAKE_IOS_ARM_FLAGS = } + +unset(QMAKE_IOS_TARGET_ARCH) +unset(QMAKE_IOS_ARCH_FLAGS) +unset(QMAKE_IOS_ARM_ARCH) +unset(QMAKE_IOS_ARM_FLAGS) diff --git a/mkspecs/common/ios/clang.conf b/mkspecs/common/ios/clang.conf index 10d1dbd24e..eb7b058c6b 100644 --- a/mkspecs/common/ios/clang.conf +++ b/mkspecs/common/ios/clang.conf @@ -18,24 +18,13 @@ QMAKE_IOS_OBJ_CFLAGS = -Wno-arc-abi -Wc++0x-extensions QMAKE_IOS_OBJ_CFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch } -# Compiler version-specific flags -!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") { - # Clang 3.1 flags (will be used for later versions too) - QMAKE_IOS_CFLAGS += -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion - QMAKE_IOS_CXXFLAGS += -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wc++11-extensions - QMAKE_IOS_OBJ_CFLAGS += -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector +# Clang 3.1 (and above) flags +QMAKE_IOS_CFLAGS += -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion +QMAKE_IOS_CXXFLAGS += -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wc++11-extensions +QMAKE_IOS_OBJ_CFLAGS += -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector - # Warn about unsupported (later than 4.5) Xcode versions - !lessThan(QMAKE_IOS_XCODE_VERSION, "4.6"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary") -} else { - if (!lessThan(QMAKE_IOS_XCODE_VERSION, "4.2")) { - # Clang 3.0 flags - QMAKE_IOS_CFLAGS += -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits - } else { - # Older Clang versions are not supported - error("Unsupported Xcode version $${QMAKE_IOS_XCODE_VERSION}") - } -} +# Warn about unsupported (later than 4.5) Xcode versions +!lessThan(QMAKE_IOS_XCODE_VERSION, "4.6"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary") # Set build flags QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS diff --git a/mkspecs/common/ios/qmake.conf b/mkspecs/common/ios/qmake.conf index ce2124f4fe..7f6a4df544 100644 --- a/mkspecs/common/ios/qmake.conf +++ b/mkspecs/common/ios/qmake.conf @@ -17,10 +17,10 @@ QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_IOS_SDK_PATH # Basic iOS frameworks needed for any GUI app QMAKE_LFLAGS += -framework Foundation -framework UIKit -framework QuartzCore -lz -# OpenGL ES1 -QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers +# No OpenGL ES1 +QMAKE_INCDIR_OPENGL_ES1 = QMAKE_LIBDIR_OPENGL_ES1 = -QMAKE_LIBS_OPENGL_ES1 = -framework OpenGLES +QMAKE_LIBS_OPENGL_ES1 = # OpenGL ES2 QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers diff --git a/mkspecs/common/ios/versions.conf b/mkspecs/common/ios/versions.conf index b46905ff65..ef6f94cdb6 100644 --- a/mkspecs/common/ios/versions.conf +++ b/mkspecs/common/ios/versions.conf @@ -38,12 +38,8 @@ QMAKE_IOS_SDK_VERSION = # Do not edit values below here if using a pre-built SDK # -# Minimum iOS version required on deployment target (if not specified, will -# default to minimum version that guarantees ARMv7 & OpenGL/ES 2.x). -# -# No part of Qt or any known plugin uses features that require iOS versions -# later than 4.0. -QMAKE_IPHONEOS_DEPLOYMENT_TARGET = 4.0 +# Minimum iOS version required on deployment target +QMAKE_IPHONEOS_DEPLOYMENT_TARGET = 4.3 ########################################################################### diff --git a/mkspecs/unsupported/macx-iosdevice-clang/qmake.conf b/mkspecs/unsupported/macx-iosdevice-clang/qmake.conf index ed6852e0d6..b04d6070ae 100644 --- a/mkspecs/unsupported/macx-iosdevice-clang/qmake.conf +++ b/mkspecs/unsupported/macx-iosdevice-clang/qmake.conf @@ -13,6 +13,7 @@ include(../../common/ios.conf) include(../../common/ios/versions.conf) include(../../common/ios/clang.conf) include(../../common/ios/qmake.conf) +include(../../common/ios/arch.conf) # Version check lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later") @@ -29,7 +30,4 @@ QMAKE_LINK_SHLIB = $$QMAKE_CXX # Check that compiler is valid !exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the clang compiler") -load(qt_config) - -# Include after config is loaded to allow autodetection on GL/ES version -include(../../common/ios/arch.conf) +load(qt_config) \ No newline at end of file -- cgit v1.2.3