summaryrefslogtreecommitdiffstats
path: root/mkspecs/common/ios/arch.conf
diff options
context:
space:
mode:
authorIan Dean <ian@mediator-software.com>2012-07-18 19:26:39 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-07-25 00:11:47 (GMT)
commitc13df9f2147e85e104ac105f975ef87914c908e9 (patch)
tree6ee265e74c4645f02806cf19654a7a0f8360e622 /mkspecs/common/ios/arch.conf
parentc1e26903af2938cfcd75c7c6f6325b012cd9ccee (diff)
downloadQt-c13df9f2147e85e104ac105f975ef87914c908e9.zip
Qt-c13df9f2147e85e104ac105f975ef87914c908e9.tar.gz
Qt-c13df9f2147e85e104ac105f975ef87914c908e9.tar.bz2
Removed existing iOS mkspecs. Added Qt5 iOS mkspecs to unsupported.
Change-Id: I504d987abd092d25c68f7209cb5787a01d6fac50 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'mkspecs/common/ios/arch.conf')
-rw-r--r--mkspecs/common/ios/arch.conf84
1 files changed, 84 insertions, 0 deletions
diff --git a/mkspecs/common/ios/arch.conf b/mkspecs/common/ios/arch.conf
new file mode 100644
index 0000000..4ad9687
--- /dev/null
+++ b/mkspecs/common/ios/arch.conf
@@ -0,0 +1,84 @@
+#
+# 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 =
+
+###########################################################################
+
+# 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
+ }
+
+ # Samsung S5PC100, Apple A4, A5, A5X
+ equals(QMAKE_IOS_TARGET_ARCH, "armv7") {
+ # iOS CPU architecture (armv7)
+ QMAKE_IOS_ARM_ARCH = __ARM_ARCH_7__
+
+ # Thumb2 instructions
+ QMAKE_IOS_ARM_FLAGS = -mthumb
+ QMAKE_IOS_ARM_ARCH += __MARM_THUMB__
+
+ # NEON instructions
+ *-g++*: QMAKE_IOS_ARM_FLAGS += -mfloat-abi=softfp -mfpu=neon
+ 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.")
+ }
+ }
+# 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 =
+}