summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/clang-mac.conf5
-rw-r--r--mkspecs/common/clang.conf1
-rw-r--r--mkspecs/common/g++-base.conf1
-rw-r--r--mkspecs/common/mac/qplatformdefs.h1
-rw-r--r--mkspecs/common/msvc-desktop.conf2
-rw-r--r--mkspecs/common/wince/qmake.conf2
-rw-r--r--mkspecs/common/winrt_winphone/qmake.conf2
-rw-r--r--mkspecs/common/winrt_winphone/qplatformdefs.h10
-rw-r--r--mkspecs/cygwin-g++/qmake.conf2
-rw-r--r--mkspecs/devices/common/linux_device_post.conf4
-rw-r--r--mkspecs/devices/linux-beagleboard-g++/qmake.conf7
-rw-r--r--mkspecs/devices/linux-nuc-g++/qmake.conf20
-rw-r--r--mkspecs/devices/linux-nuc-g++/qplatformdefs.h34
-rw-r--r--mkspecs/features/c++11.prf17
-rw-r--r--mkspecs/features/c++14.prf12
-rw-r--r--mkspecs/features/lex.prf21
-rw-r--r--mkspecs/features/plugin_bundle.prf2
-rw-r--r--mkspecs/features/qt.prf11
-rw-r--r--mkspecs/features/qt_common.prf2
-rw-r--r--mkspecs/features/resources.prf60
-rw-r--r--mkspecs/features/yacc.prf12
-rw-r--r--mkspecs/linux-icc/qmake.conf1
-rw-r--r--mkspecs/macx-icc/qmake.conf1
-rw-r--r--[-rwxr-xr-x]mkspecs/macx-ios-clang/Info.plist.app0
-rw-r--r--mkspecs/macx-ios-clang/features/default_post.prf183
-rw-r--r--mkspecs/macx-ios-clang/features/exclusive_builds_post.prf8
-rw-r--r--mkspecs/macx-ios-clang/features/qt.prf34
-rw-r--r--mkspecs/macx-ios-clang/features/resolve_config.prf64
-rw-r--r--mkspecs/macx-ios-clang/features/testcase.prf12
-rw-r--r--mkspecs/macx-ios-clang/features/testcase_targets.prf3
-rw-r--r--mkspecs/macx-ios-clang/features/xcodebuild.prf49
-rwxr-xr-xmkspecs/macx-ios-clang/ios_destinations.sh (renamed from mkspecs/macx-ios-clang/rename_main.sh)61
-rw-r--r--mkspecs/macx-ios-clang/qmake.conf2
-rw-r--r--mkspecs/macx-ios-clang/xcodebuild.mk96
-rw-r--r--mkspecs/win32-g++/qmake.conf3
-rw-r--r--mkspecs/win32-icc/qmake.conf2
36 files changed, 466 insertions, 281 deletions
diff --git a/mkspecs/common/clang-mac.conf b/mkspecs/common/clang-mac.conf
index 3280274f36..d95e982b14 100644
--- a/mkspecs/common/clang-mac.conf
+++ b/mkspecs/common/clang-mac.conf
@@ -6,5 +6,6 @@ QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvm.clang.1_0
-QMAKE_CXXFLAGS_CXX11 += -stdlib=libc++
-QMAKE_LFLAGS_CXX11 += -stdlib=libc++
+QMAKE_CXXFLAGS += -stdlib=libc++
+QMAKE_OBJECTIVE_CFLAGS += -stdlib=libc++
+QMAKE_LFLAGS += -stdlib=libc++
diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf
index a0a2b3f3d1..ee5fc14458 100644
--- a/mkspecs/common/clang.conf
+++ b/mkspecs/common/clang.conf
@@ -27,6 +27,7 @@ QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_CXXFLAGS_DISABLE_LTCG = $$QMAKE_CFLAGS_DISABLE_LTCG
QMAKE_CXXFLAGS_CXX11 = -std=c++11
+QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
QMAKE_LFLAGS_CXX11 =
QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
diff --git a/mkspecs/common/g++-base.conf b/mkspecs/common/g++-base.conf
index d687dbc3f3..114a441687 100644
--- a/mkspecs/common/g++-base.conf
+++ b/mkspecs/common/g++-base.conf
@@ -28,4 +28,5 @@ QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_P
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_CXXFLAGS_CXX11 = -std=c++0x
+QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++0x
QMAKE_LFLAGS_CXX11 =
diff --git a/mkspecs/common/mac/qplatformdefs.h b/mkspecs/common/mac/qplatformdefs.h
index 44664933df..18f62e23f8 100644
--- a/mkspecs/common/mac/qplatformdefs.h
+++ b/mkspecs/common/mac/qplatformdefs.h
@@ -62,6 +62,7 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/wait.h>
+#define __APPLE_USE_RFC_3542
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index 369f95bae9..849048dad0 100644
--- a/mkspecs/common/msvc-desktop.conf
+++ b/mkspecs/common/msvc-desktop.conf
@@ -23,7 +23,7 @@ contains(QMAKE_TARGET.arch, x86_64) {
QMAKE_CC = cl
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
+QMAKE_YACC = bison -y
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -nologo -Zc:wchar_t
QMAKE_CFLAGS_WARN_ON = -W3
diff --git a/mkspecs/common/wince/qmake.conf b/mkspecs/common/wince/qmake.conf
index 434e063de8..3eac38f6b7 100644
--- a/mkspecs/common/wince/qmake.conf
+++ b/mkspecs/common/wince/qmake.conf
@@ -15,7 +15,7 @@ QMAKE_COMPILER = msvc
QMAKE_CC = cl
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
+QMAKE_YACC = bison -y
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
QMAKE_CFLAGS_WARN_ON = -W3
diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf
index 97ef661230..ca5119bded 100644
--- a/mkspecs/common/winrt_winphone/qmake.conf
+++ b/mkspecs/common/winrt_winphone/qmake.conf
@@ -16,7 +16,7 @@ DEPLOYMENT_PLUGIN += qwinrt
QMAKE_CC = cl
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
+QMAKE_YACC = bison -y
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -nologo
QMAKE_CFLAGS_WARN_ON = -W3
diff --git a/mkspecs/common/winrt_winphone/qplatformdefs.h b/mkspecs/common/winrt_winphone/qplatformdefs.h
index 14f6c58253..6abac1e94d 100644
--- a/mkspecs/common/winrt_winphone/qplatformdefs.h
+++ b/mkspecs/common/winrt_winphone/qplatformdefs.h
@@ -130,4 +130,14 @@
typedef int mode_t;
+#ifndef INADDR_ANY
+# define INADDR_ANY (u_long)0x00000000
+#endif
+#ifndef INADDR_LOOPBACK
+# define INADDR_LOOPBACK 0x7f000001
+#endif
+#ifndef INADDR_BROADCAST
+# define INADDR_BROADCAST (u_long)0xffffffff
+#endif
+
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/cygwin-g++/qmake.conf b/mkspecs/cygwin-g++/qmake.conf
index caed4133b1..53cd35611f 100644
--- a/mkspecs/cygwin-g++/qmake.conf
+++ b/mkspecs/cygwin-g++/qmake.conf
@@ -14,7 +14,7 @@ QMAKE_COMPILER = gcc
QMAKE_CC = gcc
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
+QMAKE_YACC = bison -y
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -pipe
QMAKE_CFLAGS_DEPS = -M
diff --git a/mkspecs/devices/common/linux_device_post.conf b/mkspecs/devices/common/linux_device_post.conf
index d90d25191f..88fa31d805 100644
--- a/mkspecs/devices/common/linux_device_post.conf
+++ b/mkspecs/devices/common/linux_device_post.conf
@@ -3,6 +3,10 @@ contains(DISTRO_OPTS, deb-multi-arch) {
-Wl,-rpath-link,$$[QT_SYSROOT]/lib/$${GCC_MACHINE_DUMP}
}
+contains(DISTRO_OPTS, boot2qt) {
+ QMAKE_PLATFORM += boot2qt
+}
+
QMAKE_CFLAGS += $$COMPILER_FLAGS
QMAKE_CXXFLAGS += $$COMPILER_FLAGS
QMAKE_LFLAGS += $$LINKER_FLAGS
diff --git a/mkspecs/devices/linux-beagleboard-g++/qmake.conf b/mkspecs/devices/linux-beagleboard-g++/qmake.conf
index 1d32d374c6..604da50f63 100644
--- a/mkspecs/devices/linux-beagleboard-g++/qmake.conf
+++ b/mkspecs/devices/linux-beagleboard-g++/qmake.conf
@@ -26,7 +26,7 @@ QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
QMAKE_NM = $${CROSS_COMPILE}nm -P
QMAKE_STRIP = $${CROSS_COMPILE}strip
-COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
+COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb
#modifications to gcc-base.conf
QMAKE_CFLAGS += $${COMPILER_FLAGS}
@@ -47,11 +47,12 @@ QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL}
QMAKE_LIBS_OPENVG = -lOpenVG $${QMAKE_LIBS_EGL}
+DISTRO_OPTS += hard-float
+
# No need for any special EGL device integration.
# Prioritize the default, compiled-in integration over any plugins.
EGLFS_DEVICE_INTEGRATION = none
-# Sanity check
-deviceSanityCheckCompiler()
+include(../common/linux_arm_device_post.conf)
load(qt_config)
diff --git a/mkspecs/devices/linux-nuc-g++/qmake.conf b/mkspecs/devices/linux-nuc-g++/qmake.conf
new file mode 100644
index 0000000000..fef5991341
--- /dev/null
+++ b/mkspecs/devices/linux-nuc-g++/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for the Intel NUC DE3815TYKE targeting EGL/GLES either via KMS (eglfs) or Wayland
+#
+# Verified with a core-image-weston image produced by Yocto.
+
+include(../common/linux_device_pre.conf)
+
+QMAKE_LIBS_EGL += -lEGL
+QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL
+
+NUC_CFLAGS = -m64
+QMAKE_CFLAGS += $$NUC_CFLAGS
+QMAKE_CXXFLAGS += $$NUC_CFLAGS
+
+# Preferred eglfs backend
+EGLFS_DEVICE_INTEGRATION = eglfs_kms
+
+include(../common/linux_device_post.conf)
+
+load(qt_config)
diff --git a/mkspecs/devices/linux-nuc-g++/qplatformdefs.h b/mkspecs/devices/linux-nuc-g++/qplatformdefs.h
new file mode 100644
index 0000000000..5ae49b35dd
--- /dev/null
+++ b/mkspecs/devices/linux-nuc-g++/qplatformdefs.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** 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 The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/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 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/features/c++11.prf b/mkspecs/features/c++11.prf
index 32eaca4a9b..c8a86548ee 100644
--- a/mkspecs/features/c++11.prf
+++ b/mkspecs/features/c++11.prf
@@ -1,10 +1,9 @@
-QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_CXX11
-QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CXXFLAGS_CXX11
-QMAKE_LFLAGS += $$QMAKE_LFLAGS_CXX11
-
-contains(QMAKE_LFLAGS, -stdlib=libc++) {
- equals(QMAKE_MACOSX_DEPLOYMENT_TARGET, 10.6): \
- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
- contains(QMAKE_IOS_DEPLOYMENT_TARGET, ^4.*): \
- QMAKE_IOS_DEPLOYMENT_TARGET = 5.0
+strict_c++|isEmpty(QMAKE_CXXFLAGS_GNUCXX11) {
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_CXX11
+ QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CXXFLAGS_CXX11
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_CXX11
+} else {
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_GNUCXX11
+ QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CXXFLAGS_GNUCXX11
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_GNUCXX11
}
diff --git a/mkspecs/features/c++14.prf b/mkspecs/features/c++14.prf
index a54d11840d..076458560d 100644
--- a/mkspecs/features/c++14.prf
+++ b/mkspecs/features/c++14.prf
@@ -2,15 +2,21 @@ intel_icc {
# ICC does not support C++14 yet
} else: clang {
# Clang has supported -std=c++1y since version 3.2
- greaterThan(QT_CLANG_MAJOR_VERSION, 3)|greaterThan(QT_CLANG_MINOR_VERSION, 1): \
+ greaterThan(QT_CLANG_MAJOR_VERSION, 3)|greaterThan(QT_CLANG_MINOR_VERSION, 1) {
QMAKE_CXXFLAGS_CXX11 = -std=c++1y
+ QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++1y
+ }
# Unknown how long Apple Clang has supported -std=c++1y, but at least since XCode 5.0
- greaterThan(QT_APPLE_CLANG_MAJOR_VERSION, 4): \
+ greaterThan(QT_APPLE_CLANG_MAJOR_VERSION, 4) {
QMAKE_CXXFLAGS_CXX11 = -std=c++1y
+ QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++1y
+ }
} else: gcc {
# GCC has supported -std=c++1y since 4.8
- greaterThan(QT_GCC_MAJOR_VERSION, 4)|greaterThan(QT_GCC_MINOR_VERSION, 7): \
+ greaterThan(QT_GCC_MAJOR_VERSION, 4)|greaterThan(QT_GCC_MINOR_VERSION, 7) {
QMAKE_CXXFLAGS_CXX11 = -std=c++1y
+ QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++1y
+ }
}
# Delegate to c++11.prf
diff --git a/mkspecs/features/lex.prf b/mkspecs/features/lex.prf
index 43d8fbd038..19ffe1932c 100644
--- a/mkspecs/features/lex.prf
+++ b/mkspecs/features/lex.prf
@@ -10,13 +10,22 @@
} else {
lex.variable_out = GENERATED_SOURCES
}
- isEmpty(QMAKE_LEXFLAGS_MANGLE):QMAKE_LEXFLAGS_MANGLE = -P${QMAKE_FILE_BASE}
- QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS
- !yacc_no_name_mangle:QMAKE_LEXEXTRAFLAGS += $$QMAKE_LEXFLAGS_MANGLE
- lex.commands = $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS ${QMAKE_FILE_IN}$$escape_expand(\\n\\t) \
- $$QMAKE_DEL_FILE $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}$$escape_expand(\\n\\t) \
- $$QMAKE_MOVE lex.${QMAKE_FILE_BASE}.c $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}$$escape_expand(\\n\\t)
+ contains(QMAKE_LEX, .*flex) {
+ # GNU flex, we can use -o outfile
+ lex.commands = $$QMAKE_LEX $$QMAKE_LEXFLAGS --nounistd -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+ } else {
+ # stupid POSIX lex, it only generates a file called lex.yy.c
+ # or lex.prefix.c if the -P<prefix> option is active
+ intermediate_file = lex.yy.c
+ QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS $$QMAKE_LEXFLAGS_MANGLE
+
+ lex.commands = \
+ -$(DEL_FILE) ${QMAKE_FILE_OUT}$$escape_expand(\\n\\t) \
+ $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS ${QMAKE_FILE_IN}$$escape_expand(\\n\\t) \
+ $(MOVE) $$intermediate_file ${QMAKE_FILE_OUT} $$escape_expand(\\n\\t)
+ unset(intermediate_file)
+ }
lex.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}
silent:lex.commands = @echo Lex ${QMAKE_FILE_IN} && $$lex.commands
diff --git a/mkspecs/features/plugin_bundle.prf b/mkspecs/features/plugin_bundle.prf
new file mode 100644
index 0000000000..f3e7294c90
--- /dev/null
+++ b/mkspecs/features/plugin_bundle.prf
@@ -0,0 +1,2 @@
+# Override mkspec default which creates a shared library
+mac: QMAKE_LFLAGS_PLUGIN = -bundle
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index be54d030e7..ce93105f4b 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -252,15 +252,18 @@ for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
# if the plugin is linked statically there is no need to deploy it
DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY
}
- isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:if(wince*|winrt): {
+
+ # The following block is currently broken, because qt_plugin_XXX.prf files
+ # are not generated for dynamic builds.
+ false:isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:if(wince*|winrt) {
QT_ITEM =
debug: QT_ITEM = $${QTPLUG}d4.dll
else: QT_ITEM = $${QTPLUG}4.dll
- eval(qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS/get]/$${QT_PLUGINPATH}/$${QT_ITEM})
- eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
+ qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS/get]/$${QT_PLUGINPATH}/$${QT_ITEM}
+ qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH}
- DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
+ INSTALLS *= qt_additional_plugin_$${QTPLUG}
}
}
}
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 55f65b5526..2ed43e5063 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -12,7 +12,7 @@
QMAKE_DIR_REPLACE_SANE += DESTDIR
CONFIG -= debug_and_release_target
-contains(QT_CONFIG, c++11): CONFIG += c++11
+contains(QT_CONFIG, c++11): CONFIG += c++11 strict_c++
contains(TEMPLATE, .*lib) {
# module and plugins
!host_build:contains(QT_CONFIG, reduce_exports): CONFIG += hide_symbols
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index 8564731a22..7a38ff8f38 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -6,6 +6,66 @@ isEmpty(QMAKE_MOD_RCC):QMAKE_MOD_RCC = qrc
!contains(QMAKE_RESOURCE_FLAGS, -root):!isEmpty(QMAKE_RESOURCE_ROOT):QMAKE_RESOURCE_FLAGS += -root $$QMAKE_RESOURCE_ROOT
!contains(QMAKE_RESOURCE_FLAGS, -name): QMAKE_RESOURCE_FLAGS += -name ${QMAKE_FILE_BASE}
+# http://www.w3.org/TR/xml/#syntax
+defineReplace(xml_escape) {
+ 1 ~= s,&,&amp;,
+ 1 ~= s,\',&apos;,
+ 1 ~= s,\",&quot;,
+ 1 ~= s,<,&lt;,
+ 1 ~= s,>,&gt;,
+ return($$1)
+}
+
+RESOURCES += qmake_immediate
+for(resource, RESOURCES) {
+ # Regular case of user qrc file
+ contains(resource, ".*\.qrc$"): \
+ next()
+
+ # Fallback for stand-alone files/directories
+ !defined($${resource}.files, var) {
+ !equals(resource, qmake_immediate) {
+ !exists($$absolute_path($$resource, $$_PRO_FILE_PWD_)): \
+ warning("Failure to find: $$resource")
+ qmake_immediate.files += $$resource
+ }
+ RESOURCES -= $$resource
+ next()
+ }
+
+ resource_file = $$RCC_DIR/qmake_$${resource}.qrc
+
+ !debug_and_release|build_pass {
+ # Collection of files, generate qrc file
+ prefix = $$eval($${resource}.prefix)
+ isEmpty(prefix): \
+ prefix = "/"
+
+ resource_file_content = \
+ "<!DOCTYPE RCC><RCC version=\"1.0\">" \
+ "<qresource prefix=\"$$xml_escape($$prefix)\">"
+
+ abs_base = $$absolute_path($$eval($${resource}.base), $$_PRO_FILE_PWD_)
+
+ for(file, $${resource}.files) {
+ abs_path = $$absolute_path($$file, $$_PRO_FILE_PWD_)
+ alias = $$relative_path($$abs_path, $$abs_base)
+ resource_file_content += \
+ "<file alias=\"$$xml_escape($$alias)\">$$xml_escape($$abs_path)</file>"
+ }
+
+ resource_file_content += \
+ "</qresource>" \
+ "</RCC>"
+
+ !write_file($$OUT_PWD/$$resource_file, resource_file_content): \
+ error("Aborting.")
+ }
+
+ RESOURCES -= $$resource
+ RESOURCES += $$resource_file
+}
+
rcc.input = RESOURCES
rcc.name = RCC ${QMAKE_FILE_IN}
rcc.depend_command = $$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
diff --git a/mkspecs/features/yacc.prf b/mkspecs/features/yacc.prf
index 4d7e0a381b..22fe4cb0a2 100644
--- a/mkspecs/features/yacc.prf
+++ b/mkspecs/features/yacc.prf
@@ -9,9 +9,9 @@
isEmpty(QMAKE_YACCFLAGS_MANGLE) {
- QMAKE_YACCFLAGS_MANGLE = -p ${QMAKE_FILE_BASE}
- QMAKE_YACC_HEADER = y.tab.h
- QMAKE_YACC_SOURCE = y.tab.c
+ QMAKE_YACCFLAGS_MANGLE = -p ${QMAKE_FILE_BASE} -b ${QMAKE_FILE_BASE}
+ QMAKE_YACC_HEADER = ${QMAKE_FILE_BASE}.tab.h
+ QMAKE_YACC_SOURCE = ${QMAKE_FILE_BASE}.tab.c
} else {
QMAKE_YACCFLAGS_MANGLE ~= s/\\$base/${QMAKE_FILE_BASE}/g #backwards compat
QMAKE_YACC_HEADER ~= s/\\$base/${QMAKE_FILE_BASE}/g
@@ -21,10 +21,10 @@
!yacc_no_name_mangle:QMAKE_YACCDECLFLAGS += $$QMAKE_YACCFLAGS_MANGLE
yacc_decl.commands = \
+ -$(DEL_FILE) $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_H)} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_CPP)}$$escape_expand(\\n\\t) \
$$QMAKE_YACC $$QMAKE_YACCDECLFLAGS ${QMAKE_FILE_IN}$$escape_expand(\\n\\t) \
- $$QMAKE_DEL_FILE $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_H)} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_CPP)}$$escape_expand(\\n\\t) \
- $$QMAKE_MOVE $${QMAKE_YACC_HEADER} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_H)}$$escape_expand(\\n\\t) \
- $$QMAKE_MOVE $${QMAKE_YACC_SOURCE} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_CPP)}$$escape_expand(\\n\\t)
+ $(MOVE) $${QMAKE_YACC_HEADER} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_H)}$$escape_expand(\\n\\t) \
+ $(MOVE) $${QMAKE_YACC_SOURCE} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_CPP)}$$escape_expand(\\n\\t)
yacc_decl.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_H)}
silent:yacc_decl.commands = @echo Yacc ${QMAKE_FILE_IN} && $$yacc_decl.commands
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index 9190aa9f28..ca9e81512e 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -50,6 +50,7 @@ QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
# Disabling exceptions disabled - workaround for QTBUG-36577
#QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
QMAKE_CXXFLAGS_CXX11 = -std=c++0x
+QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++0x
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_INCDIR =
diff --git a/mkspecs/macx-icc/qmake.conf b/mkspecs/macx-icc/qmake.conf
index 5e45e67d0c..c145c2c8f3 100644
--- a/mkspecs/macx-icc/qmake.conf
+++ b/mkspecs/macx-icc/qmake.conf
@@ -53,6 +53,7 @@ QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_CXXFLAGS_CXX11 = -std=c++11
+QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
diff --git a/mkspecs/macx-ios-clang/Info.plist.app b/mkspecs/macx-ios-clang/Info.plist.app
index 623ed496c5..623ed496c5 100755..100644
--- a/mkspecs/macx-ios-clang/Info.plist.app
+++ b/mkspecs/macx-ios-clang/Info.plist.app
diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf
index 172e34bac5..5266c88f16 100644
--- a/mkspecs/macx-ios-clang/features/default_post.prf
+++ b/mkspecs/macx-ios-clang/features/default_post.prf
@@ -1,179 +1,24 @@
-load(sdk)
-
-# Resolve config so we don't need to use CONFIG() later on
-CONFIG(iphonesimulator, iphonesimulator|iphoneos) {
- CONFIG -= iphoneos
-} else {
- CONFIG -= iphonesimulator
- CONFIG += iphoneos
-}
-
-equals(TEMPLATE, app) {
+equals(TEMPLATE, app):contains(CONFIG, qt) {
# If the application uses Qt, it needs to be an application bundle
# to be able to deploy and run on iOS. The only exception to this
# is if you're working with a jailbroken device and can run the
# resulting binary from the console/over SSH, but that's not a
# use-case we care about, so no need to complicate the logic.
- qt: CONFIG *= app_bundle
-
- app_bundle {
- macx-xcode {
- # There is no way to genereate Xcode projects that are limited to either
- # simulator or device builds, so iphonesimulator_and_iphoneos is always
- # effectivly active, even if the user disabled it explicitly.
- # The Xcode generator doesn't support multiple BUILDS though (exclusive
- # builds), so we have to manually set up the simulator suffix.
- library_suffix_iphonesimulator.name = "$${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING}[sdk=iphonesimulator*]"
- library_suffix_iphonesimulator.value = "_iphonesimulator$($${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING})"
- QMAKE_MAC_XCODE_SETTINGS += library_suffix_iphonesimulator
- CONFIG *= xcode_dynamic_library_suffix
- } else {
- # For Qt applications we want Xcode project files as the generated output,
- # but since qmake doesn't handle the transition between makefiles and Xcode
- # project files (which happens when using subdirs), we create a wrapper
- # makefile that takes care of generating the Xcode project, and allows
- # building by calling out to xcodebuild.
- TEMPLATE = aux
-
- SOURCES =
- OBJECTIVE_SOURCES =
- RESOURCES =
- INSTALLS =
- QMAKE_EXTRA_COMPILERS =
-
- !build_pass {
- CONFIG += debug_and_release
- load(resolve_config)
-
- CONFIG += iphonesimulator_and_iphoneos
- iphonesimulator.name = Simulator
- iphoneos.name = Device
- addExclusiveBuilds(iphonesimulator, iphoneos)
-
- load(exclusive_builds_post)
-
- xcode_distclean.commands = "$(DEL_FILE) -R $${TARGET}.xcodeproj"
- xcode_distclean.depends = \
- debug-iphonesimulator-distclean debug-iphoneos-distclean \
- release-iphonesimulator-distclean release-iphoneos-distclean
- QMAKE_EXTRA_TARGETS += xcode_distclean
- DISTCLEAN_DEPS += xcode_distclean
-
- mkpath($$OUT_PWD)|error("Aborting.")
- args =
- for(arg, QMAKE_ARGS): \
- args += $$system_quote($$arg)
- system("cd $$system_quote($$OUT_PWD) && $$QMAKE_QMAKE $$args $$system_quote($$_PRO_FILE_) -spec macx-xcode")
-
- # We have a target, even though our template is aux
- CONFIG += have_target
-
- } else {
- load(resolve_config)
-
- iphonesimulator: \
- sdk = iphonesimulator
- else: \
- sdk = iphoneos
-
- debug: \
- cfg = debug
- else: \
- cfg = release
-
- for(action, $$list(build install clean test)) {
- equals(action, build) {
- action_target_suffix =
- action_target = all
- } else: equals(action, test) {
- action_target_suffix = -check
- action_target = check
- } else {
- action_target_suffix = -$$action
- action_target = $$action
- }
-
- target = $${sdk}-$${cfg}$${action_target_suffix}
-
- xcodebuild = "xcodebuild $$action -scheme $(TARGET) -sdk $$sdk -configuration $$title($$cfg)"
-
- equals(action, test):equals(sdk, iphoneos) {
- AVAILABLE_DEVICE_IDS = "$(shell system_profiler SPUSBDataType | sed -n -E -e '/(iPhone|iPad|iPod)/,/Serial/s/ *Serial Number: *(.+)/\1/p')"
- CUSTOM_DEVICE_IDS = "$(filter $(EXPORT_AVAILABLE_DEVICE_IDS), $(IOS_TEST_DEVICE_IDS))"
- TEST_DEVICE_IDS = "$(strip $(if $(EXPORT_CUSTOM_DEVICE_IDS), $(EXPORT_CUSTOM_DEVICE_IDS), $(EXPORT_AVAILABLE_DEVICE_IDS)))"
-
- QMAKE_EXTRA_VARIABLES += AVAILABLE_DEVICE_IDS CUSTOM_DEVICE_IDS TEST_DEVICE_IDS
-
- xcodebuild = "@$(if $(EXPORT_TEST_DEVICE_IDS),"\
- "echo Running tests on $(words $(EXPORT_TEST_DEVICE_IDS)) device\\(s\\): && ("\
- "$(foreach deviceid, $(EXPORT_TEST_DEVICE_IDS),"\
- "(echo Testing on device ID '$(deviceid)' ... && $${xcodebuild} -destination 'platform=iOS,id=$(deviceid)' && echo) &&"\
- ") echo Tests completed successfully on all devices"\
- "), $(error No iOS devices connected, please connect at least one device that can be used for testing.))"
- }
-
- $${target}.commands = $$xcodebuild
- QMAKE_EXTRA_TARGETS += $$target
-
- $${action_target}.depends += $$target
- QMAKE_EXTRA_TARGETS *= $${action_target}
- }
-
- xcode_build_dir_distclean.commands = "$(DEL_FILE) -R $$title($$cfg)-$${sdk}"
- xcode_build_dir_distclean.depends = clean
- QMAKE_EXTRA_TARGETS += xcode_build_dir_distclean
- distclean.depends = xcode_build_dir_distclean
- QMAKE_EXTRA_TARGETS += distclean
- }
- }
- }
-} else: equals(TEMPLATE, lib) {
- iphonesimulator.name = Simulator
- iphoneos.name = Device
- addExclusiveBuilds(iphonesimulator, iphoneos)
-} else: equals(TEMPLATE, subdirs) {
- # Prevent recursion into host_builds
- for(subdir, SUBDIRS) {
- contains($${subdir}.CONFIG, host_build) {
- $${subdir}.CONFIG += no_iphoneos_target no_iphonesimulator_target
-
- # Other targets which we do want to recurse into may depend on this target,
- # for example corelib depends on moc, rcc, bootstrap, etc, and other libs
- # may depend on host-tools that are needed to build the lib, so we resolve
- # the final target name and redirect it to the base target, so that the
- # dependency chain is not broken for the other targets.
-
- !isEmpty($${subdir}.target) {
- target = $$eval($${subdir}.target)
- } else {
- !isEmpty($${subdir}.file): \
- file = $$eval($${subdir}.file)
- else: !isEmpty($${subdir}.subdir): \
- file = $$eval($${subdir}.subdir)
- else: \
- file = $$subdir
-
- target = sub-$$file
- }
-
- target ~= s,[^a-zA-Z0-9_],-,
-
- $${target}-iphonesimulator.depends = $$target
- $${target}-iphoneos.depends = $$target
- QMAKE_EXTRA_TARGETS += $${target}-iphonesimulator $${target}-iphoneos
- }
- }
-
- prepareRecursiveTarget(iphonesimulator)
- prepareRecursiveTarget(iphoneos)
- QMAKE_EXTRA_TARGETS += iphonesimulator iphoneos
-
-} else: equals(TEMPLATE, aux) {
- # Dummy targets for the 'aux' TEMPLATE, so we can always recurse
- QMAKE_EXTRA_TARGETS *= iphonesimulator iphoneos
+ CONFIG *= app_bundle
+
+ # For Qt applications we want Xcode project files as the generated output,
+ # but since qmake doesn't handle the transition between makefiles and Xcode
+ # project files (which happens when using subdirs), we can't just override
+ # MAKEFILE_GENERATOR. Instead, we generate the Xcode project by spawning a
+ # child qmake process with -spec macx-xcode and let the top level qmake
+ # process generate a wrapper makefile that forwards everything to xcodebuild.
+ equals(MAKEFILE_GENERATOR, UNIX): \
+ CONFIG = xcodebuild $$CONFIG
}
+load(default_post)
+
macx-xcode {
ios_device_family.name = TARGETED_DEVICE_FAMILY
ios_device_family.value = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY
@@ -251,5 +96,3 @@ macx-xcode {
QMAKE_OBJECTIVE_CFLAGS += $$arch_flags
QMAKE_LFLAGS += $$arch_flags
}
-
-load(default_post)
diff --git a/mkspecs/macx-ios-clang/features/exclusive_builds_post.prf b/mkspecs/macx-ios-clang/features/exclusive_builds_post.prf
new file mode 100644
index 0000000000..1fb0a55846
--- /dev/null
+++ b/mkspecs/macx-ios-clang/features/exclusive_builds_post.prf
@@ -0,0 +1,8 @@
+
+xcodebuild {
+ # Prevent qmake from generating empty output dirs for each exclusive build,
+ # as Xcode will do this by itself, and with a different name.
+ QMAKE_DIR_REPLACE =
+}
+
+load(exclusive_builds_post)
diff --git a/mkspecs/macx-ios-clang/features/qt.prf b/mkspecs/macx-ios-clang/features/qt.prf
index 9e6b486c6e..474a195e4b 100644
--- a/mkspecs/macx-ios-clang/features/qt.prf
+++ b/mkspecs/macx-ios-clang/features/qt.prf
@@ -19,34 +19,12 @@ equals(TEMPLATE, app):contains(qt_depends, gui(-private)?) {
QTPLUGIN.platforms = -
!no_main_wrapper {
- # We use ld to rename the _main symbol to _qt_main, so that we don't get a symbol clash
- # with the _main we provide that calls UIApplicationMain. We need to make a copy of the
- # original object file, as ld will not copy over DWARF debug information to the output
- # file. Instead, it will inject a reference back to the original object file, so when
- # Xcode runs dsymutil to make the final dSYM file it will still find the debug info
- # for the object file that provided the original _main. This back-reference has the
- # interesting side-effect of the debug information still referring to the original
- # symbol name, so stack-traces will show both our wrapper main and the original
- # user main as 'main', and adding a symbolic breakpoint for 'main' will break on
- # both functions. Although a bit weird, it's a good thing, as the user will still be
- # able to add symbolic breakpoints for 'main', not caring that the symbol is actually
- # called 'qt_main' now.
-
- macx-xcode {
- objects_dir = "\"${OBJECT_FILE_DIR}-${CURRENT_VARIANT}\""
- archs = "\"${ARCHS}\""
- } else {
- isEmpty(OBJECTS_DIR): \
- objects_dir = .
- else: \
- objects_dir = $$shell_quote($$OBJECTS_DIR)
- archs = $$shell_quote($$QMAKE_IOS_DEVICE_ARCHS $$QMAKE_IOS_SIMULATOR_ARCHS)
- }
-
- !isEmpty(QMAKE_PRE_LINK): \
- QMAKE_PRE_LINK += ";"
-
- QMAKE_PRE_LINK += $$shell_quote($$QMAKESPEC/rename_main.sh) $$objects_dir $$archs
+ # The LC_MAIN load command available in iOS 6.0 and above allows dyld to
+ # directly call the entrypoint instead of going through _start in crt.o.
+ # Passing -e to the linker changes the entrypoint from _main to our custom
+ # wrapper that calls UIApplicationMain and dispatches back to main() once
+ # the application has started up and is ready to initialize QApplication.
+ QMAKE_LFLAGS += -Wl,-e,_qt_main_wrapper
}
}
diff --git a/mkspecs/macx-ios-clang/features/resolve_config.prf b/mkspecs/macx-ios-clang/features/resolve_config.prf
new file mode 100644
index 0000000000..d1d3e8ca39
--- /dev/null
+++ b/mkspecs/macx-ios-clang/features/resolve_config.prf
@@ -0,0 +1,64 @@
+
+xcodebuild {
+ # Xcode project files always support both Debug and Release configurations
+ # and iOS device and simulator targets, so we make sure the wrapper-makefile
+ # also does.
+ CONFIG += debug_and_release iphonesimulator_and_iphoneos
+}
+
+load(resolve_config)
+
+CONFIG(iphonesimulator, iphonesimulator|iphoneos): \
+ CONFIG -= iphoneos
+else: \
+ CONFIG -= iphonesimulator
+
+macx-xcode {
+ # There is no way to genereate Xcode projects that are limited to either
+ # simulator or device builds, so iphonesimulator_and_iphoneos is always
+ # effectivly active, even if the user disabled it explicitly.
+ # The Xcode generator doesn't support multiple BUILDS though (exclusive
+ # builds), so we have to manually set up the simulator suffix.
+ library_suffix_iphonesimulator.name = "$${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING}[sdk=iphonesimulator*]"
+ library_suffix_iphonesimulator.value = "_iphonesimulator$($${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING})"
+ QMAKE_MAC_XCODE_SETTINGS += library_suffix_iphonesimulator
+ CONFIG *= xcode_dynamic_library_suffix
+} else {
+ iphonesimulator.name = Simulator
+ iphoneos.name = Device
+ addExclusiveBuilds(iphonesimulator, iphoneos)
+}
+
+equals(TEMPLATE, subdirs) {
+ # Prevent recursion into host_builds
+ for(subdir, SUBDIRS) {
+ contains($${subdir}.CONFIG, host_build) {
+ $${subdir}.CONFIG += no_iphoneos_target no_iphonesimulator_target
+
+ # Other targets which we do want to recurse into may depend on this target,
+ # for example corelib depends on moc, rcc, bootstrap, etc, and other libs
+ # may depend on host-tools that are needed to build the lib, so we resolve
+ # the final target name and redirect it to the base target, so that the
+ # dependency chain is not broken for the other targets.
+
+ !isEmpty($${subdir}.target) {
+ target = $$eval($${subdir}.target)
+ } else {
+ !isEmpty($${subdir}.file): \
+ file = $$eval($${subdir}.file)
+ else: !isEmpty($${subdir}.subdir): \
+ file = $$eval($${subdir}.subdir)
+ else: \
+ file = $$subdir
+
+ target = sub-$$file
+ }
+
+ target ~= s,[^a-zA-Z0-9_],-,
+
+ $${target}-iphonesimulator.depends = $$target
+ $${target}-iphoneos.depends = $$target
+ QMAKE_EXTRA_TARGETS += $${target}-iphonesimulator $${target}-iphoneos
+ }
+ }
+}
diff --git a/mkspecs/macx-ios-clang/features/testcase.prf b/mkspecs/macx-ios-clang/features/testcase.prf
new file mode 100644
index 0000000000..e16c163ffa
--- /dev/null
+++ b/mkspecs/macx-ios-clang/features/testcase.prf
@@ -0,0 +1,12 @@
+# Pretend we have a target, even though our template is aux
+xcodebuild: \
+ CONFIG += have_target
+
+load(testcase)
+
+# We provide our own check logic
+xcodebuild {
+ check.depends =
+ check.commands =
+ QMAKE_EXTRA_TARGETS *= check
+}
diff --git a/mkspecs/macx-ios-clang/features/testcase_targets.prf b/mkspecs/macx-ios-clang/features/testcase_targets.prf
new file mode 100644
index 0000000000..e0a2922c3f
--- /dev/null
+++ b/mkspecs/macx-ios-clang/features/testcase_targets.prf
@@ -0,0 +1,3 @@
+# For the xcodebuild wrapper makefile we deal with test targets manually
+!xcodebuild: \
+ load(testcase_targets)
diff --git a/mkspecs/macx-ios-clang/features/xcodebuild.prf b/mkspecs/macx-ios-clang/features/xcodebuild.prf
new file mode 100644
index 0000000000..b897432a43
--- /dev/null
+++ b/mkspecs/macx-ios-clang/features/xcodebuild.prf
@@ -0,0 +1,49 @@
+
+# For Qt applications we want Xcode project files as the generated output,
+# but since qmake doesn't handle the transition between makefiles and Xcode
+# project files (which happens when using subdirs), we can't just override
+# MAKEFILE_GENERATOR. Instead, we generate the Xcode project by spawing a
+# child qmake process with -spec macx-xcode and let the top level qmake
+# process generate a wrapper makefile that forwards everything to xcodebuild.
+
+TEMPLATE = aux
+
+SOURCES =
+OBJECTIVE_SOURCES =
+RESOURCES =
+INSTALLS =
+QMAKE_EXTRA_COMPILERS =
+
+!mkpath($$OUT_PWD): \
+ error("Failed to create $$OUT_PWD")
+
+args =
+for(arg, QMAKE_ARGS): \
+ args += $$system_quote($$arg)
+
+cmd = "$$QMAKE_QMAKE $$args $$system_quote($$_PRO_FILE_) -spec macx-xcode"
+debug(1, "Generating Xcode project in $$OUT_PWD using '$$cmd'")
+system("cd $$system_quote($$OUT_PWD) && $$cmd")
+
+# Subtargets
+
+for(build, BUILDS): \
+ SUBTARGETS += $$eval($${build}.target)
+QMAKE_EXTRA_VARIABLES += SUBTARGETS
+
+CONFIG += no_default_goal_deps
+
+QMAKE_EXTRA_INCLUDES += $$shell_quote($$QMAKESPEC/xcodebuild.mk)
+
+# Distclean
+
+distfiles = $${TARGET}.xcodeproj
+for(build, BUILDS): \
+ distfiles += $$title($$eval($${build}.target))
+distclean_xcodebuild.commands = -$(DEL_FILE) -R $$distfiles
+
+distclean.depends += clean_all distclean_xcodebuild
+QMAKE_EXTRA_TARGETS += distclean distclean_xcodebuild
+
+# Empty exclusive builds, we've set them up manually
+BUILDS =
diff --git a/mkspecs/macx-ios-clang/rename_main.sh b/mkspecs/macx-ios-clang/ios_destinations.sh
index 1547f5f75c..aebf8f6403 100755
--- a/mkspecs/macx-ios-clang/rename_main.sh
+++ b/mkspecs/macx-ios-clang/ios_destinations.sh
@@ -33,46 +33,23 @@
##
#############################################################################
-if [ $# -ne 2 ]; then
- echo "$0: wrong number of arguments for internal tool used by iOS mkspec"
-else
- arch_paths=""
- for a in $2; do
- arch_paths="$arch_paths
-$1/$a"
+booted_simulator=$(xcrun simctl list devices | grep -v unavailable | grep Booted | perl -lne 'print $1 if /\((.*?)\)/')
+echo "IPHONESIMULATOR_DEVICES = $booted_simulator"
+
+xcodebuild test -scheme $1 -destination 'id=0' -destination-timeout 1 2>&1| sed -n 's/{ \(platform:.*\) }/\1/p' | while read destination; do
+ id=$(echo $destination | sed -n -E 's/.*id:([^ ,]+).*/\1/p')
+ echo $destination | tr ',' '\n' | while read keyval; do
+ key=$(echo $keyval | cut -d ':' -f 1 | tr '[:lower:]' '[:upper:]')
+ val=$(echo $keyval | cut -d ':' -f 2)
+ echo "%_$id: DESTINATION_${key} = $val"
+
+ if [ $key = 'PLATFORM' ]; then
+ if [ "$val" = "iOS" ]; then
+ echo "IPHONEOS_DEVICES += $id"
+ elif [ "$val" = "iOS Simulator" -a "$id" != "$booted_simulator" ]; then
+ echo "IPHONESIMULATOR_DEVICES += $id"
+ fi
+ fi
done
- for f in $(IFS="
-"; find $arch_paths -name '*.o'); do
- # Skip object files without the _main symbol
- nm $f 2>/dev/null | grep -q 'T _main$' || continue
-
- fname=${f#$1/}
-
- file -b $f | grep -qi 'llvm bit-code' && \
- (cat \
-<<EOF >&2
-$f:: error: The file '$fname' contains LLVM bitcode, not object code. Automatic main() redirection could not be applied.
-note: This is most likely due to the use of link-time optimization (-flto). Please disable LTO, or work around the \
-issue by manually renaming your main() function to qtmn():
-
-#ifdef Q_OS_IOS
-extern "C" int qtmn(int argc, char *argv[])
-#else
-int main(int argc, char *argv[])
-#endif
-EOF
- ) && exit 1
-
- echo "Found main() in $fname"
-
- strings -t d - $f | grep '_main\(\.eh\)\?$' | while read match; do
- offset=$(echo $match | cut -d ' ' -f 1)
- symbol=$(echo $match | cut -d ' ' -f 2)
-
- echo " Renaming '$symbol' at offset $offset to '${symbol/main/qtmn}'"
-
- # In-place rename the string (keeping the same length)
- printf '_qtmn' | dd of=$f bs=1 seek=$offset conv=notrunc >/dev/null 2>&1
- done
- done
-fi \ No newline at end of file
+ echo
+done
diff --git a/mkspecs/macx-ios-clang/qmake.conf b/mkspecs/macx-ios-clang/qmake.conf
index 0dd761760c..d5e5840902 100644
--- a/mkspecs/macx-ios-clang/qmake.conf
+++ b/mkspecs/macx-ios-clang/qmake.conf
@@ -7,7 +7,7 @@ CONFIG += app_bundle reduce_exports incremental global_init_link
QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_MACOSX_DEPLOYMENT_TARGET =
-QMAKE_IOS_DEPLOYMENT_TARGET = 5.1.1
+QMAKE_IOS_DEPLOYMENT_TARGET = 6.0
INCLUDEPATH += $$PWD/ios
DEFINES += DARWIN_NO_CARBON QT_NO_PRINTER QT_NO_PRINTDIALOG
diff --git a/mkspecs/macx-ios-clang/xcodebuild.mk b/mkspecs/macx-ios-clang/xcodebuild.mk
new file mode 100644
index 0000000000..f50010abc1
--- /dev/null
+++ b/mkspecs/macx-ios-clang/xcodebuild.mk
@@ -0,0 +1,96 @@
+
+# We don't want xcodebuild to run in parallel
+.NOTPARALLEL:
+
+# Functions
+targets = $(foreach target, $(EXPORT_SUBTARGETS), $(target)-$(strip $(1)))
+toupper = $(shell echo $1 | tr '[:lower:]' '[:upper:]')
+tolower = $(shell echo $1 | tr '[:upper:]' '[:lower:]')
+basesdk = $(shell echo $1 | sed 's/[0-9.]*$$//')
+
+# Explicit comma variable
+, := ,
+
+# Default targets
+first: build
+all: build_all
+
+.DEFAULT_GOAL = first
+
+# Top level targets
+build: build_first
+clean: clean_first
+install: install_first
+check: check_first
+distclean: clean_all
+
+$(EXPORT_SUBTARGETS): % : %-build
+
+# Generic targets
+%_first: $(firstword $(call targets, %)) ;
+%_all: $(call targets, %) ;
+
+# Actions
+%-build: ACTION = build
+%-build: xcodebuild-% ;
+
+%-clean: ACTION = clean
+%-clean: xcodebuild-% ;
+
+%-install: ACTION = install
+%-install: xcodebuild-% ;
+
+# Limit check to a single configuration
+%-iphoneos-check: check-iphoneos ;
+%-iphonesimulator-check: check-iphonesimulator ;
+
+# SDK
+%-iphoneos: SDK = iphoneos
+%-iphonesimulator: SDK = iphonesimulator
+
+# Configuration
+release-%: CONFIGURATION = Release
+debug-%: CONFIGURATION = Debug
+
+# Test and build (device) destinations
+ifneq ($(filter check%,$(MAKECMDGOALS)),)
+ ifeq ($(DEVICES),)
+ $(info Enumerating test destinations (you may override this by setting DEVICES explicitly), please wait...)
+ SPECDIR := $(dir $(lastword $(MAKEFILE_LIST)))
+ DESTINATIONS_INCLUDE = /tmp/ios_destinations.mk
+ $(shell $(SPECDIR)/ios_destinations.sh $(TARGET) > $(DESTINATIONS_INCLUDE))
+ include $(DESTINATIONS_INCLUDE)
+ endif
+endif
+
+%-iphonesimulator: DEVICES = $(firstword $(IPHONESIMULATOR_DEVICES))
+%-iphoneos: DEVICES = $(IPHONEOS_DEVICES)
+
+IPHONEOS_GENERIC_DESTINATION := "generic/platform=iOS"
+IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell xcrun simctl list devices | grep -v unavailable | perl -lne 'print $$1 if /\((.*?)\)/' | tail -n 1)"
+
+DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(value $(call toupper,$(call basesdk,$(SDK)))_GENERIC_DESTINATION))
+
+# Xcodebuild
+
+DESTINATION_MESSAGE = "Running $(call tolower,$(CONFIGURATION)) $(ACTION) \
+ on '$(DESTINATION_NAME)' ($(DESTINATION_ID))$(if $(DESTINATION_OS),$(,) $(DESTINATION_PLATFORM) $(DESTINATION_OS),)"
+
+xcodebuild-%:
+ @$(if $(DESTINATION_NAME), echo $(DESTINATION_MESSAGE),)
+ xcodebuild $(ACTION) -scheme $(TARGET) $(if $(SDK), -sdk $(SDK),) $(if $(CONFIGURATION), -configuration $(CONFIGURATION),) $(if $(DESTINATION), -destination $(DESTINATION) -destination-timeout 1,)
+
+xcodebuild-check-device_%: DESTINATION_ID=$(lastword $(subst _, ,$@))
+
+# Special check target (requires SECONDEXPANSION due to devices)
+.SECONDEXPANSION:
+check-%: ACTION = test
+check-%: $$(foreach device, $$(DEVICES), xcodebuild-check-device_$$(device)) ;
+ @echo $(if $^, Ran $(call tolower,$(CONFIGURATION)) tests on $(words $^) $(SDK) destination\(s\): $(DEVICES), No compatible test devices found for \'$(SDK)\' SDK && false)
+
+# Determined by device
+check-%: SDK =
+
+# Default to debug for testing
+check-%: CONFIGURATION = Debug
+
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
index c6ff808a99..019c220de5 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -23,7 +23,7 @@ QMAKE_COMPILER = gcc
QMAKE_CC = $${CROSS_COMPILE}gcc
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
+QMAKE_YACC = bison -y
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport
QMAKE_CFLAGS_DEPS = -M
@@ -56,6 +56,7 @@ QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
QMAKE_CXXFLAGS_CXX11 = -std=c++0x
+QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++0x
QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
QMAKE_INCDIR =
diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf
index 2ec0d84918..31c87fff26 100644
--- a/mkspecs/win32-icc/qmake.conf
+++ b/mkspecs/win32-icc/qmake.conf
@@ -15,7 +15,7 @@ QMAKE_COMPILER = msvc intel_icl # icl pretends to be msvc
QMAKE_CC = icl
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
+QMAKE_YACC = bison -y
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -nologo -Zm200 /Qprec /Qwd1744,1738
QMAKE_CFLAGS_WARN_ON = -W3 /Qwd673