summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/clang.conf6
-rw-r--r--mkspecs/common/gcc-base-unix.conf1
-rw-r--r--mkspecs/common/gcc-base.conf3
-rw-r--r--mkspecs/common/qnx/qplatformdefs.h109
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf6
-rw-r--r--mkspecs/features/c++14.prf17
-rw-r--r--mkspecs/features/default_post.prf2
-rw-r--r--mkspecs/features/ltcg.prf54
-rw-r--r--mkspecs/features/qt.prf6
-rw-r--r--mkspecs/features/qt_build_config.prf6
-rw-r--r--mkspecs/features/qt_common.prf2
-rw-r--r--mkspecs/features/qt_module_headers.prf9
-rw-r--r--mkspecs/features/resources.prf48
-rw-r--r--mkspecs/features/simd.prf369
-rw-r--r--mkspecs/features/win32/ltcg.prf5
-rw-r--r--mkspecs/features/winrt/package_manifest.prf41
-rw-r--r--mkspecs/linux-icc/qmake.conf3
-rw-r--r--mkspecs/macx-icc/qmake.conf20
-rwxr-xr-xmkspecs/macx-ios-clang/rename_main.sh21
-rw-r--r--mkspecs/qnx-armle-v7-qcc/qplatformdefs.h66
-rw-r--r--mkspecs/qnx-armv7le-qcc/qplatformdefs.h2
-rw-r--r--mkspecs/qnx-x86-qcc/qplatformdefs.h68
-rw-r--r--mkspecs/win32-g++/qmake.conf1
-rw-r--r--mkspecs/win32-icc/qmake.conf17
-rw-r--r--mkspecs/win32-msvc2013/qmake.conf4
25 files changed, 387 insertions, 499 deletions
diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf
index d58b44b295..6235296ef3 100644
--- a/mkspecs/common/clang.conf
+++ b/mkspecs/common/clang.conf
@@ -16,8 +16,12 @@ QMAKE_PCH_OUTPUT_EXT = .pch
QMAKE_CFLAGS_ISYSTEM = -isystem
QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CFLAGS_USE_PRECOMPILE = -Xclang -include-pch -Xclang ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_LTCG = -flto
+
QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
+QMAKE_CXXFLAGS_CXX11 = -std=c++11
-QMAKE_CXXFLAGS_CXX11 = -std=c++11
QMAKE_LFLAGS_CXX11 =
+QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
diff --git a/mkspecs/common/gcc-base-unix.conf b/mkspecs/common/gcc-base-unix.conf
index 84ef88aa4f..29e0521927 100644
--- a/mkspecs/common/gcc-base-unix.conf
+++ b/mkspecs/common/gcc-base-unix.conf
@@ -16,6 +16,7 @@ QMAKE_LFLAGS_SONAME += -Wl,-soname,
QMAKE_LFLAGS_THREAD +=
QMAKE_LFLAGS_RPATH = -Wl,-rpath,
QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link,
+QMAKE_LFLAGS_USE_GOLD = -fuse-ld=gold
# -Bsymbolic-functions (ld) support
QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
index fcff502af6..06d87d7b36 100644
--- a/mkspecs/common/gcc-base.conf
+++ b/mkspecs/common/gcc-base.conf
@@ -48,6 +48,7 @@ QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions
QMAKE_CFLAGS_SPLIT_SECTIONS += -ffunction-sections
+QMAKE_CFLAGS_LTCG = -flto
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
@@ -62,12 +63,14 @@ QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_EXCEPTIONS_OFF += $$QMAKE_CFLAGS_EXCEPTIONS_OFF
QMAKE_CXXFLAGS_SPLIT_SECTIONS += $$QMAKE_CFLAGS_SPLIT_SECTIONS
+QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_LFLAGS +=
QMAKE_LFLAGS_DEBUG +=
QMAKE_LFLAGS_APP +=
QMAKE_LFLAGS_RELEASE +=
QMAKE_LFLAGS_EXCEPTIONS_OFF +=
+QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG -fuse-linker-plugin
QMAKE_CFLAGS_SSE2 += -msse2
QMAKE_CFLAGS_SSE3 += -msse3
diff --git a/mkspecs/common/qnx/qplatformdefs.h b/mkspecs/common/qnx/qplatformdefs.h
new file mode 100644
index 0000000000..4baa93b642
--- /dev/null
+++ b/mkspecs/common/qnx/qplatformdefs.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
+** 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$
+**
+****************************************************************************/
+
+#ifndef Q_QNX_PLATFORMDEFS_H
+#define Q_QNX_PLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+#define __STDC_CONSTANT_MACROS
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+// QNX doesn't have the System V <sys/shm.h> header. This is not a standard
+// POSIX header, it's only documented in the Single UNIX Specification.
+// The preferred POSIX compliant way to share memory is to use the functions
+// in <sys/mman.h> that comply with the POSIX Real Time Interface (1003.1b).
+#include <sys/mman.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+// for htonl
+#include <arpa/inet.h>
+
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#if !defined(__EXT_QNX__READDIR64_R)
+#define QT_NO_READDIR64
+#endif
+#include "../posix/qplatformdefs.h"
+#if defined(__EXT_QNX__READDIR64_R)
+#define QT_EXT_QNX_READDIR_R ::_readdir64_r
+#elif defined(__EXT_QNX__READDIR_R)
+#define QT_EXT_QNX_READDIR_R ::_readdir_r
+#endif
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+// QNX6 doesn't have getpagesize()
+inline int getpagesize()
+{
+ return ::sysconf(_SC_PAGESIZE);
+}
+
+#include <stdlib.h>
+
+#define QT_QWS_TEMP_DIR QString::fromLatin1(qgetenv("TMP"))
+
+#endif // Q_QNX_PLATFORMDEFS_H
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index 5bc1fd14c9..2d40b13d63 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -39,10 +39,14 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-no-sdk {
isEmpty(ANDROID_TARGET_ARCH): ANDROID_TARGET_ARCH = $$DEFAULT_ANDROID_TARGET_ARCH
FILE_CONTENT += " \"target-architecture\": $$emitString($$ANDROID_TARGET_ARCH),"
- # Explicitly set dependencies of application for deployment
+ # Explicitly set qt dependencies of application for deployment
!isEmpty(ANDROID_DEPLOYMENT_DEPENDENCIES): \
FILE_CONTENT += " \"deployment-dependencies\": $$emitString($$join(ANDROID_DEPLOYMENT_DEPENDENCIES, ",")),"
+ # Explicitly set external dependencies of application for deployment
+ !isEmpty(ANDROID_EXTRA_PLUGINS): \
+ FILE_CONTENT += " \"android-extra-plugins\": $$emitString($$join(ANDROID_EXTRA_PLUGINS, ",")),"
+
# Android-specific settings of Project
!isEmpty(ANDROID_PACKAGE_SOURCE_DIR): \
FILE_CONTENT += " \"android-package-source-directory\": $$emitString($$ANDROID_PACKAGE_SOURCE_DIR),"
diff --git a/mkspecs/features/c++14.prf b/mkspecs/features/c++14.prf
new file mode 100644
index 0000000000..a54d11840d
--- /dev/null
+++ b/mkspecs/features/c++14.prf
@@ -0,0 +1,17 @@
+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): \
+ QMAKE_CXXFLAGS_CXX11 = -std=c++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): \
+ QMAKE_CXXFLAGS_CXX11 = -std=c++1y
+} else: gcc {
+ # GCC has supported -std=c++1y since 4.8
+ greaterThan(QT_GCC_MAJOR_VERSION, 4)|greaterThan(QT_GCC_MINOR_VERSION, 7): \
+ QMAKE_CXXFLAGS_CXX11 = -std=c++1y
+}
+
+# Delegate to c++11.prf
+include(c++11.prf)
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index 6fb140b252..085527f28d 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -61,6 +61,8 @@ debug {
QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE
}
+use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
+
dll:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_DLL
static:mac: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB
staticlib:unix {
diff --git a/mkspecs/features/ltcg.prf b/mkspecs/features/ltcg.prf
new file mode 100644
index 0000000000..b418135014
--- /dev/null
+++ b/mkspecs/features/ltcg.prf
@@ -0,0 +1,54 @@
+CONFIG(release, debug|release) {
+ # We need fat object files when creating static libraries on some platforms
+ # so the linker will know to load a particular object from the library
+ # in the first place. With GCC, we have -ffat-lto-objects. MSVC
+ # seems to work just fine. For other compilers, we disable LTCG
+ # for static libraries.
+ msvc {
+ # Nothing to do
+ } else: gcc {
+ !clang:!intel_icc {
+ static|fat-lto {
+ QMAKE_CFLAGS_LTCG += -ffat-lto-objects
+ QMAKE_CXXFLAGS_LTCG += -ffat-lto-objects
+ } else {
+ QMAKE_CFLAGS_LTCG += -fno-fat-lto-objects
+ QMAKE_CXXFLAGS_LTCG += -fno-fat-lto-objects
+ }
+ linux {
+ # Get the number of online processors, like _SC_NPROCESSORS_ONLN
+ isEmpty(QMAKE_NPROCESSORS_ONLN) {
+ QMAKE_NPROCESSORS_ONLN = $$system("grep -c '^processor' /proc/cpuinfo 2>/dev/null || echo 1")
+ cache(QMAKE_NPROCESSORS_ONLN, set stash)
+ }
+
+ # Override LTO number of jobs
+ QMAKE_LFLAGS_LTCG -= -flto
+ QMAKE_LFLAGS_LTCG += -flto=$$QMAKE_NPROCESSORS_ONLN
+ }
+ } else: static {
+ QMAKE_CFLAGS_LTCG =
+ 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
+ } else {
+ QMAKE_LFLAGS_LTCG = $$QMAKE_CXXFLAGS $$QMAKE_LFLAGS_LTCG
+ QMAKE_LFLAGS_APP += $$QMAKE_CXXFLAGS_APP
+ QMAKE_LFLAGS_SHLIB += $$QMAKE_CXXFLAGS_SHLIB
+ }
+ }
+
+ QMAKE_CFLAGS *= $$QMAKE_CFLAGS_LTCG
+ QMAKE_CXXFLAGS *= $$QMAKE_CXXFLAGS_LTCG
+ QMAKE_LFLAGS *= $$QMAKE_LFLAGS_LTCG
+}
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 9edf5cd530..71dfcf2912 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -89,12 +89,12 @@ contains(qt_module_deps, qml): \
}
# run qmlimportscanner
- qtPrepareTool(QMLIMPORTSCANNER, qmlimportscanner)
+ qtPrepareTool(QMLIMPORTSCANNER, qmlimportscanner, _SYS)
for (QMLPATH, QMLPATHS): \
IMPORTPATHS += -importPath $$QMLPATH
- #message(run $$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
- JSON = $$system($$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
+ #message(run $$QMLIMPORTSCANNER_SYS $$_PRO_FILE_PWD_ $$IMPORTPATHS)
+ JSON = $$system($$QMLIMPORTSCANNER_SYS $$_PRO_FILE_PWD_ $$IMPORTPATHS)
parseJson(JSON, IMPORTS)| error("Failed to parse qmlimportscanner output.")
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
index 5fece28ca3..42046c238a 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
@@ -25,6 +25,12 @@ OBJECTS_DIR = .obj
MOC_DIR = .moc
RCC_DIR = .rcc
UI_DIR = .uic
+intel_icl {
+ # ICL 14.0 has a bug that makes it not find #includes in dirs starting with .
+ MOC_DIR = tmp/moc
+ RCC_DIR = tmp/rcc
+ UI_DIR = tmp/uic
+}
QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 4dcabe9237..ebc5f00b8f 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -15,7 +15,7 @@ CONFIG -= debug_and_release_target
contains(QT_CONFIG, c++11): CONFIG += c++11
contains(TEMPLATE, .*lib) {
# module and plugins
- contains(QT_CONFIG, reduce_exports): CONFIG += hide_symbols
+ !host_build:contains(QT_CONFIG, reduce_exports): CONFIG += hide_symbols
unix:contains(QT_CONFIG, reduce_relocations): CONFIG += bsymbolic_functions
contains(QT_CONFIG, largefile): CONFIG += largefile
contains(QT_CONFIG, separate_debug_info): CONFIG += separate_debug_info
diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf
index 0baa9ec7b2..efa964ca14 100644
--- a/mkspecs/features/qt_module_headers.prf
+++ b/mkspecs/features/qt_module_headers.prf
@@ -56,12 +56,21 @@ autogen_warning = \
MODULE_MASTER_DEPS_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$${MODULE_INCNAME}Depends
!build_pass {
MODULE_MASTER_DEPS_HEADER_CONT = $$autogen_warning
+ MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}ifdef __cplusplus /* create empty PCH in C mode */"
for(dep, MODULE_DEPENDS) {
depname = $$eval(QT.$${dep}.name)
MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}include <$$depname/$$depname>"
}
+ MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}endif"
write_file($$MODULE_MASTER_DEPS_HEADER, MODULE_MASTER_DEPS_HEADER_CONT)|error("Aborting.")
}
SYNCQT.HEADER_FILES += $$MODULE_MASTER_DEPS_HEADER
+# Automatically enable precompiled headers for Qt modules,
+# except for Gcc/Windows: Larger precompiled headers crash cc1plus.exe
+# (e.g. with i686-4.8.2-release-posix-dwarf-rt_v3-rev3)
+!gcc|!equals(QMAKE_HOST.os, Windows) {
+ isEmpty(PRECOMPILED_HEADER): PRECOMPILED_HEADER = $$MODULE_MASTER_DEPS_HEADER
+}
+
CONFIG += qt_install_headers
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index 68ca4d1442..f8a15bc84f 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -3,26 +3,40 @@ qtPrepareTool(QMAKE_RCC, rcc, _DEP)
isEmpty(RCC_DIR):RCC_DIR = .
isEmpty(QMAKE_MOD_RCC):QMAKE_MOD_RCC = qrc
-resource_combine {
- rcc.CONFIG += combine
- rcc.output = $$RCC_DIR/$${first(QMAKE_MOD_RCC)}_combined$${first(QMAKE_EXT_CPP)}
-} else {
- rcc.output = $$RCC_DIR/$${first(QMAKE_MOD_RCC)}_${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
-}
!contains(QMAKE_RESOURCE_FLAGS, -root):!isEmpty(QMAKE_RESOURCE_ROOT):QMAKE_RESOURCE_FLAGS += -root $$QMAKE_RESOURCE_ROOT
-!contains(QMAKE_RESOURCE_FLAGS, -name) {
- resource_combine {
- isEmpty(QMAKE_RESOURCE_NAME):!isEmpty(TARGET):QMAKE_RESOURCE_NAME = $$TARGET
- !isEmpty(QMAKE_RESOURCE_NAME):QMAKE_RESOURCE_FLAGS += -name $$QMAKE_RESOURCE_NAME
- } else {
- QMAKE_RESOURCE_FLAGS += -name ${QMAKE_FILE_BASE}
- }
-}
-rcc.commands = $$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+!contains(QMAKE_RESOURCE_FLAGS, -name): QMAKE_RESOURCE_FLAGS += -name ${QMAKE_FILE_BASE}
+
+rcc.input = RESOURCES
+rcc.name = RCC ${QMAKE_FILE_IN}
rcc.depend_command = $$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
rcc.CONFIG += add_inputs_as_makefile_deps
-rcc.input = RESOURCES
+
+resources_small|ltcg|macx-xcode {
+
+rcc.output = $$RCC_DIR/$${first(QMAKE_MOD_RCC)}_${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
+rcc.commands = $$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
rcc.variable_out = SOURCES
-rcc.name = RCC ${QMAKE_FILE_IN}
+
+} else {
+
+isEmpty(RCC_CXX):RCC_CXX = $$QMAKE_CXX $(CXXFLAGS)
+RCC_OUT_BASE = $$RCC_DIR/$${first(QMAKE_MOD_RCC)}_${QMAKE_FILE_BASE}
+RCC_CPP = $$RCC_OUT_BASE$${first(QMAKE_EXT_CPP)}
+RCC_TMP = $${RCC_OUT_BASE}.tmp$${first(QMAKE_EXT_OBJ)}
+RCC_OBJ = $$RCC_OUT_BASE$${first(QMAKE_EXT_OBJ)}
+
+msvc: RCC_CXX_O_FLAG = "-Fo"
+else: RCC_CXX_O_FLAG = "-o "
+
+rcc.output = $$RCC_OBJ
+rcc.commands = \
+ $$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -pass 1 -o $$RCC_CPP && \
+ $$RCC_CXX -c $$RCC_CPP $$RCC_CXX_O_FLAG$$RCC_TMP && \
+ $$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -pass 2 -temp $$RCC_TMP -o ${QMAKE_FILE_OUT}
+rcc.clean += $$RCC_CPP $$RCC_TMP
+
+}
+
silent:rcc.commands = @echo rcc ${QMAKE_FILE_IN} && $$rcc.commands
+else:rcc.commands ~= s/&&/$$escape_expand(\\n\\t)/g
QMAKE_EXTRA_COMPILERS += rcc
diff --git a/mkspecs/features/simd.prf b/mkspecs/features/simd.prf
index 62a63f90ca..7d9eaffafa 100644
--- a/mkspecs/features/simd.prf
+++ b/mkspecs/features/simd.prf
@@ -18,297 +18,82 @@ QT_CPU_FEATURES = $$eval(QT_CPU_FEATURES.$$QT_ARCH)
#
# Set up compilers for SIMD (SSE/AVX, NEON etc)
#
-gcc { # includes intel_icc and clang variants
- sse2 {
- HEADERS += $$SSE2_HEADERS
-
- sse2_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, sse2):sse2_compiler.commands += $$QMAKE_CFLAGS_SSE2
- sse2_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- sse2_compiler.dependency_type = TYPE_C
- sse2_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- sse2_compiler.input = SSE2_SOURCES
- sse2_compiler.variable_out = OBJECTS
- sse2_compiler.name = compiling[sse2] ${QMAKE_FILE_IN}
- silent:sse2_compiler.commands = @echo compiling[sse2] ${QMAKE_FILE_IN} && $$sse2_compiler.commands
- QMAKE_EXTRA_COMPILERS += sse2_compiler
- }
- sse3 {
- HEADERS += $$SSE3_HEADERS
-
- sse3_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, sse3):sse3_compiler.commands += $$QMAKE_CFLAGS_SSE3
- sse3_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- sse3_compiler.dependency_type = TYPE_C
- sse3_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- sse3_compiler.input = SSE3_SOURCES
- sse3_compiler.variable_out = OBJECTS
- sse3_compiler.name = compiling[sse3] ${QMAKE_FILE_IN}
- silent:sse3_compiler.commands = @echo compiling[sse3] ${QMAKE_FILE_IN} && $$sse3_compiler.commands
- QMAKE_EXTRA_COMPILERS += sse3_compiler
- }
- ssse3 {
- HEADERS += $$SSSE3_HEADERS
-
- ssse3_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, ssse3):ssse3_compiler.commands += $$QMAKE_CFLAGS_SSSE3
- ssse3_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- ssse3_compiler.dependency_type = TYPE_C
- ssse3_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- ssse3_compiler.input = SSSE3_SOURCES
- ssse3_compiler.variable_out = OBJECTS
- ssse3_compiler.name = compiling[ssse3] ${QMAKE_FILE_IN}
- silent:ssse3_compiler.commands = @echo compiling[ssse3] ${QMAKE_FILE_IN} && $$ssse3_compiler.commands
- QMAKE_EXTRA_COMPILERS += ssse3_compiler
- }
- sse4_1 {
- HEADERS += $$SSE4_1_HEADERS
-
- sse4_1_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, sse4_1):sse4_1_compiler.commands += $$QMAKE_CFLAGS_SSE4_1
- sse4_1_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- sse4_1_compiler.dependency_type = TYPE_C
- sse4_1_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- sse4_1_compiler.input = SSE4_1_SOURCES
- sse4_1_compiler.variable_out = OBJECTS
- sse4_1_compiler.name = compiling[sse4_1] ${QMAKE_FILE_IN}
- silent:sse4_1_compiler.commands = @echo compiling[sse4_1] ${QMAKE_FILE_IN} && $$sse4_1_compiler.commands
- QMAKE_EXTRA_COMPILERS += sse4_1_compiler
- }
- sse4_2 {
- HEADERS += $$SSE4_2_HEADERS
-
- sse4_2_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, sse4_2):sse4_2_compiler.commands += $$QMAKE_CFLAGS_SSE4_2
- sse4_2_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- sse4_2_compiler.dependency_type = TYPE_C
- sse4_2_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- sse4_2_compiler.input = SSE4_2_SOURCES
- sse4_2_compiler.variable_out = OBJECTS
- sse4_2_compiler.name = compiling[sse4_2] ${QMAKE_FILE_IN}
- silent:sse4_2_compiler.commands = @echo compiling[sse4_2] ${QMAKE_FILE_IN} && $$sse4_2_compiler.commands
- QMAKE_EXTRA_COMPILERS += sse4_2_compiler
- }
- avx {
- HEADERS += $$AVX_HEADERS
-
- avx_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, avx):avx_compiler.commands += $$QMAKE_CFLAGS_AVX
- avx_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- avx_compiler.dependency_type = TYPE_C
- avx_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- avx_compiler.input = AVX_SOURCES
- avx_compiler.variable_out = OBJECTS
- avx_compiler.name = compiling[avx] ${QMAKE_FILE_IN}
- silent:avx_compiler.commands = @echo compiling[avx] ${QMAKE_FILE_IN} && $$avx_compiler.commands
- QMAKE_EXTRA_COMPILERS += avx_compiler
- }
- avx2 {
- HEADERS += $$AVX2_HEADERS
-
- avx2_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, avx2):avx2_compiler.commands += $$QMAKE_CFLAGS_AVX2
- avx2_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- avx2_compiler.dependency_type = TYPE_C
- avx2_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- avx2_compiler.input = AVX2_SOURCES
- avx2_compiler.variable_out = OBJECTS
- avx2_compiler.name = compiling[avx2] ${QMAKE_FILE_IN}
- silent:avx2_compiler.commands = @echo compiling[avx2] ${QMAKE_FILE_IN} && $$avx2_compiler.commands
- QMAKE_EXTRA_COMPILERS += avx2_compiler
- }
- contains(QT_CPU_FEATURES.$$QT_ARCH, neon) {
- HEADERS += $$NEON_HEADERS
-
- neon_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, neon):neon_compiler.commands += $$QMAKE_CFLAGS_NEON
- neon_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- neon_compiler.dependency_type = TYPE_C
- neon_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- neon_compiler.input = NEON_SOURCES
- neon_compiler.variable_out = OBJECTS
- neon_compiler.name = compiling[neon] ${QMAKE_FILE_IN}
- silent:neon_compiler.commands = @echo compiling[neon] ${QMAKE_FILE_IN} && $$neon_compiler.commands
- neon_assembler.commands = $$QMAKE_CC -c $(CFLAGS)
- !contains(QT_CPU_FEATURES, neon):neon_assembler.commands += $$QMAKE_CFLAGS_NEON
- neon_assembler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- neon_assembler.dependency_type = TYPE_C
- neon_assembler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- neon_assembler.input = NEON_ASM
- neon_assembler.variable_out = OBJECTS
- neon_assembler.name = assembling[neon] ${QMAKE_FILE_IN}
- silent:neon_assembler.commands = @echo assembling[neon] ${QMAKE_FILE_IN} && $$neon_assembler.commands
- QMAKE_EXTRA_COMPILERS += neon_compiler neon_assembler
- }
- iwmmxt {
- HEADERS += $$IWMMXT_HEADERS
-
- iwmmxt_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- iwmmxt_compiler.commands += $$QMAKE_CFLAGS_IWMMXT
- iwmmxt_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- iwmmxt_compiler.dependency_type = TYPE_C
- iwmmxt_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- iwmmxt_compiler.input = IWMMXT_SOURCES
- iwmmxt_compiler.variable_out = OBJECTS
- iwmmxt_compiler.name = compiling[iwmmxt] ${QMAKE_FILE_IN}
- silent:iwmmxt_compiler.commands = @echo compiling[iwmmxt] ${QMAKE_FILE_IN} && $$iwmmxt_compiler.commands
- QMAKE_EXTRA_COMPILERS += iwmmxt_compiler
- }
- mips_dsp {
- HEADERS += $$MIPS_DSP_HEADERS
-
- mips_dsp_compiler.commands = $$QMAKE_CXX -c
- mips_dsp_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- mips_dsp_compiler.dependency_type = TYPE_C
- mips_dsp_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- mips_dsp_compiler.input = MIPS_DSP_SOURCES
- mips_dsp_compiler.variable_out = OBJECTS
- mips_dsp_compiler.name = compiling[mips_dsp] ${QMAKE_FILE_IN}
- silent:mips_dsp_compiler.commands = @echo compiling[mips_dsp] ${QMAKE_FILE_IN} && $$mips_dsp_compiler.commands
- mips_dsp_assembler.commands = $$QMAKE_CC -c
- mips_dsp_assembler.commands += $(CFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- mips_dsp_assembler.dependency_type = TYPE_C
- mips_dsp_assembler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- mips_dsp_assembler.input = MIPS_DSP_ASM
- mips_dsp_assembler.variable_out = OBJECTS
- mips_dsp_assembler.name = assembling[mips_dsp] ${QMAKE_FILE_IN}
- silent:mips_dsp_assembler.commands = @echo assembling[mips_dsp] ${QMAKE_FILE_IN} && $$mips_dsp_assembler.commands
- QMAKE_EXTRA_COMPILERS += mips_dsp_compiler
- QMAKE_EXTRA_COMPILERS += mips_dsp_assembler
+defineTest(addSimdCompiler) {
+ name = $$1
+ upname = $$upper($$name)
+ headers_var = $${upname}_HEADERS
+ sources_var = $${upname}_SOURCES
+ asm_var = $${upname}_ASM
+
+ CONFIG($$1) {
+ cflags = $$eval(QMAKE_CFLAGS_$${upname})
+ contains(QT_CPU_FEATURES, $$name) {
+ # Default compiler settings include this feature, so just add to SOURCES
+ SOURCES += $$eval($$sources_var)
+ export(SOURCES)
+ } else {
+ # We need special compiler flags
+ $${name}_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS) $$cflags $(INCPATH) ${QMAKE_FILE_IN}
+ msvc: $${name}_compiler.commands += -Fo${QMAKE_FILE_OUT}
+ else: $${name}_compiler.commands += -o ${QMAKE_FILE_OUT}
+
+ $${name}_compiler.dependency_type = TYPE_C
+ $${name}_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
+ $${name}_compiler.input = $$sources_var
+ $${name}_compiler.variable_out = OBJECTS
+ $${name}_compiler.name = compiling[$${name}] ${QMAKE_FILE_IN}
+ silent: $${name}_compiler.commands = @echo compiling[$${name}] ${QMAKE_FILE_IN} && $$eval($${name}_compiler.commands)
+ QMAKE_EXTRA_COMPILERS += $${name}_compiler
+
+ export($${name}_compiler.commands)
+ export($${name}_compiler.dependency_type)
+ export($${name}_compiler.output)
+ export($${name}_compiler.input)
+ export($${name}_compiler.variable_out)
+ export($${name}_compiler.name)
+ }
+
+ # We always need an assembler (need to run the C compiler and without precompiled headers)
+ msvc {
+ # Don't know how to run MSVC's assembler...
+ !isEmpty($$asm_var): error("Sorry, not implemented: assembling $$upname for MSVC.")
+ } else: false {
+ # This is just for the IDE
+ SOURCES += $$eval($$asm_var)
+ export(SOURCES)
+ } else {
+ $${name}_assembler.commands = $$QMAKE_CC -c $(CFLAGS)
+ !contains(QT_CPU_FEATURES, $${name}): $${name}_assembler.commands += $$cflags
+ clang:no_clang_integrated_as: $${name}_assembler.commands += -fno-integrated-as
+ $${name}_assembler.commands += $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+ $${name}_assembler.dependency_type = TYPE_C
+ $${name}_assembler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
+ $${name}_assembler.input = $$asm_var
+ $${name}_assembler.variable_out = OBJECTS
+ $${name}_assembler.name = assembling[$${name}] ${QMAKE_FILE_IN}
+ silent: $${name}_assembler.commands = @echo assembling[$${name}] ${QMAKE_FILE_IN} && $$eval($${name}_assembler.commands)
+ QMAKE_EXTRA_COMPILERS += $${name}_assembler
+
+ export($${name}_assembler.commands)
+ export($${name}_assembler.dependency_type)
+ export($${name}_assembler.output)
+ export($${name}_assembler.input)
+ export($${name}_assembler.variable_out)
+ export($${name}_assembler.name)
+ }
+
+ HEADERS += $$eval($$headers_var)
+ export(HEADERS)
+ export(QMAKE_EXTRA_COMPILERS)
}
- mips_dspr2 {
- HEADERS += $$MIPS_DSP_HEADERS
-
- mips_dspr2_compiler.commands = $$QMAKE_CXX -c
- mips_dspr2_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- mips_dspr2_compiler.dependency_type = TYPE_C
- mips_dspr2_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- mips_dspr2_compiler.input = MIPS_DSPR2_SOURCES
- mips_dspr2_compiler.variable_out = OBJECTS
- mips_dspr2_compiler.name = compiling[mips_dspr2] ${QMAKE_FILE_IN}
- silent:mips_dspr2_compiler.commands = @echo compiling[mips_dspr2] ${QMAKE_FILE_IN} && $$mips_dspr2_compiler.commands
- mips_dspr2_assembler.commands = $$QMAKE_CC -c
- mips_dspr2_assembler.commands += $(CFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
- mips_dspr2_assembler.dependency_type = TYPE_C
- mips_dspr2_assembler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- mips_dspr2_assembler.input = MIPS_DSPR2_ASM
- mips_dspr2_assembler.variable_out = OBJECTS
- mips_dspr2_assembler.name = assembling[mips_dspr2] ${QMAKE_FILE_IN}
- silent:mips_dspr2_assembler.commands = @echo assembling[mips_dspr2] ${QMAKE_FILE_IN} && $$mips_dspr2_assembler.commands
- QMAKE_EXTRA_COMPILERS += mips_dspr2_compiler
- QMAKE_EXTRA_COMPILERS += mips_dspr2_assembler
- }
-} else:win32-msvc*|winrt {
- sse2 {
- HEADERS += $$SSE2_HEADERS
-
- sse2_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, sse2):sse2_compiler.commands += $$QMAKE_CFLAGS_SSE2
- sse2_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT}
- sse2_compiler.dependency_type = TYPE_C
- sse2_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- sse2_compiler.input = SSE2_SOURCES
- sse2_compiler.variable_out = OBJECTS
- sse2_compiler.name = compiling[sse2] ${QMAKE_FILE_IN}
- silent:sse2_compiler.commands = @echo compiling[sse2] ${QMAKE_FILE_IN} && $$sse2_compiler.commands
- QMAKE_EXTRA_COMPILERS += sse2_compiler
- }
- # MSVC doesn't have an option for anything higher than SSE2 specifically, so check if SSE2 is
- # already enabled instead (this is for code generation - intrinsics should still be supported)
- sse3 {
- HEADERS += $$SSE3_HEADERS
-
- sse3_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, sse2):sse3_compiler.commands += $$QMAKE_CFLAGS_SSE3
- sse3_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT}
- sse3_compiler.dependency_type = TYPE_C
- sse3_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- sse3_compiler.input = SSE3_SOURCES
- sse3_compiler.variable_out = OBJECTS
- sse3_compiler.name = compiling[sse3] ${QMAKE_FILE_IN}
- silent:sse3_compiler.commands = @echo compiling[sse3] ${QMAKE_FILE_IN} && $$sse3_compiler.commands
- QMAKE_EXTRA_COMPILERS += sse3_compiler
- }
- ssse3 {
- HEADERS += $$SSSE3_HEADERS
-
- ssse3_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, sse2):ssse3_compiler.commands += $$QMAKE_CFLAGS_SSSE3
- ssse3_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT}
- ssse3_compiler.dependency_type = TYPE_C
- ssse3_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- ssse3_compiler.input = SSSE3_SOURCES
- ssse3_compiler.variable_out = OBJECTS
- ssse3_compiler.name = compiling[ssse3] ${QMAKE_FILE_IN}
- silent:ssse3_compiler.commands = @echo compiling[ssse3] ${QMAKE_FILE_IN} && $$ssse3_compiler.commands
- QMAKE_EXTRA_COMPILERS += ssse3_compiler
- }
- sse4_1 {
- HEADERS += $$SSE4_1_HEADERS
-
- sse4_1_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, sse2):sse4_1_compiler.commands += $$QMAKE_CFLAGS_SSE4_1
- sse4_1_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT}
- sse4_1_compiler.dependency_type = TYPE_C
- sse4_1_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- sse4_1_compiler.input = SSE4_1_SOURCES
- sse4_1_compiler.variable_out = OBJECTS
- sse4_1_compiler.name = compiling[sse4_1] ${QMAKE_FILE_IN}
- silent:sse4_1_compiler.commands = @echo compiling[sse4_1] ${QMAKE_FILE_IN} && $$sse4_1_compiler.commands
- QMAKE_EXTRA_COMPILERS += sse4_1_compiler
- }
- sse4_2 {
- HEADERS += $$SSE4_2_HEADERS
-
- sse4_2_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, sse2):sse4_2_compiler.commands += $$QMAKE_CFLAGS_SSE4_2
- sse4_2_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT}
- sse4_2_compiler.dependency_type = TYPE_C
- sse4_2_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- sse4_2_compiler.input = SSE4_2_SOURCES
- sse4_2_compiler.variable_out = OBJECTS
- sse4_2_compiler.name = compiling[sse4_2] ${QMAKE_FILE_IN}
- silent:sse4_2_compiler.commands = @echo compiling[sse4_2] ${QMAKE_FILE_IN} && $$sse4_2_compiler.commands
- QMAKE_EXTRA_COMPILERS += sse4_2_compiler
- }
- # Similarly for AVX2 - just uses AVX
- avx {
- HEADERS += $$AVX_HEADERS
-
- avx_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS) -D_M_AVX
- !contains(QT_CPU_FEATURES, avx):avx_compiler.commands += $$QMAKE_CFLAGS_AVX
- avx_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT}
- avx_compiler.dependency_type = TYPE_C
- avx_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- avx_compiler.input = AVX_SOURCES
- avx_compiler.variable_out = OBJECTS
- avx_compiler.name = compiling[avx] ${QMAKE_FILE_IN}
- silent:avx_compiler.commands = @echo compiling[avx] ${QMAKE_FILE_IN} && $$avx_compiler.commands
- QMAKE_EXTRA_COMPILERS += avx_compiler
- }
- avx2 {
- HEADERS += $$AVX2_HEADERS
-
- avx2_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS)
- !contains(QT_CPU_FEATURES, avx):avx2_compiler.commands += $$QMAKE_CFLAGS_AVX2
- avx2_compiler.commands += $(INCPATH) ${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT}
- avx2_compiler.dependency_type = TYPE_C
- avx2_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- avx2_compiler.input = AVX2_SOURCES
- avx2_compiler.variable_out = OBJECTS
- avx2_compiler.name = compiling[avx2] ${QMAKE_FILE_IN}
- silent:avx2_compiler.commands = @echo compiling[avx2] ${QMAKE_FILE_IN} && $$avx2_compiler.commands
- QMAKE_EXTRA_COMPILERS += avx2_compiler
- }
-} else:false {
- # This allows an IDE like Creator to know that these files are part of the sources
- SOURCES += \
- $$SSE2_SOURCES $$SSE3_SOURCES $$SSSE3_SOURCES $$SSE4_1_SOURCES $$SSE4_2_SOURCES \
- $$AVX_SOURCES $$AVX2_SOURCES \
- $$NEON_SOURCES $$NEON_ASM \
- $$IWMMXT_SOURCES \
- $$MIPS_DSP_SOURCES $$MIPS_DSPR2_SOURCES $$MIPS_DSP_ASM $$MIPS_DSPR2_ASM
-
- # Headers are already done in the above sections.
}
-
+addSimdCompiler(sse2)
+addSimdCompiler(sse3)
+addSimdCompiler(ssse3)
+addSimdCompiler(sse4_1)
+addSimdCompiler(sse4_2)
+addSimdCompiler(avx)
+addSimdCompiler(avx2)
+addSimdCompiler(neon)
+addSimdCompiler(mips_dsp)
+addSimdCompiler(mips_dspr2)
diff --git a/mkspecs/features/win32/ltcg.prf b/mkspecs/features/win32/ltcg.prf
deleted file mode 100644
index f6f1299f47..0000000000
--- a/mkspecs/features/win32/ltcg.prf
+++ /dev/null
@@ -1,5 +0,0 @@
-CONFIG(release, debug|release) {
- QMAKE_CFLAGS *= $$QMAKE_CFLAGS_LTCG
- QMAKE_CXXFLAGS *= $$QMAKE_CXXFLAGS_LTCG
- QMAKE_LFLAGS *= $$QMAKE_LFLAGS_LTCG
-}
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index 46fe1e57e4..b4242bfdaa 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -12,14 +12,11 @@
# WINRT_MANIFEST.name: The name of the package as displayed to the user. Defaults to TARGET.
# WINRT_MANIFEST.architecture: The target architecture. Defaults to VCPROJ_ARCH.
# WINRT_MANIFEST.version: The version number of the package. Defaults to "1.0.0.0".
-# WINRT_MANIFEST.arguments: Allows arguments to be passed to the executable.
# WINRT_MANIFEST.publisher: Display name of the publisher. Defaults to "Default publisher display name".
-# WINRT_MANIFEST.publisher_id: On Windows 8/RT/Phone 8.1, the publisher's distinguished name (default: CN=MyCN). On Windows Phone 8.0, the publisher's UUID (default: invalid UUID string).
-# WINRT_MANIFEST.phone_product_id): On Windows Phone 8.1, the GUID of the product. Defaults to the value of WINRT_MANIFEST.identity.
-# WINRT_MANIFEST.phone_publisher_id: On Windows Phone 8.1, the GUID of the publiser. Defaults to an invalid GUID.
+# WINRT_MANIFEST.publisher_id: The publisher's distinguished name (default: CN=MyCN).
+# WINRT_MANIFEST.phone_product_id: The GUID of the product. Defaults to the value of WINRT_MANIFEST.identity. (Windows Phone only)
+# WINRT_MANIFEST.phone_publisher_id: The GUID of the publisher. Defaults to an invalid GUID. (Windows Phone only)
# WINRT_MANIFEST.description: Package description. Defaults to "Default package description".
-# WINRT_MANIFEST.author: Package author (Windows Phone 8.0 only). Defaults to "Default package author".
-# WINRT_MANIFEST.genre: Package genre (Windows Phone 8.0 only). Defaults to "apps.normal".
# WINRT_MANIFEST.background: Tile background color. Defaults to "green".
# WINRT_MANIFEST.foreground: Tile foreground (text) color (Windows 8/RT only). Defaults to "light".
# WINRT_MANIFEST.logo_store: Logo image file for Windows Store. Default provided by the mkspec.
@@ -30,7 +27,6 @@
# WINRT_MANIFEST.iconic_tile_icon: Image file for the "iconic" tile template icon. Default provided by the mkspec.
# WINRT_MANIFEST.iconic_tile_small: Image file for the small "iconic" tile template logo. Default provided by the mkspec.
# WINRT_MANIFEST.default_language: Specifies the default language of the application
-# WINRT_MANIFEST.languages: Specifies the languages the application supports
# WINRT_MANIFEST.capabilities: Specifies capabilities to add to the capability list.
# WINRT_MANIFEST.capabilities_device: Specifies device capabilities to add to the capability list. (location, webcam...)
# WINRT_MANIFEST.dependencies: Specifies dependencies required by the package.
@@ -51,9 +47,7 @@
BUILD_DIR = $$dirname(QMAKE_RESOLVED_TARGET)
}
- winphone:equals(WINSDK_VER, 8.0): \
- manifest_file.output = $$BUILD_DIR/WMAppManifest.xml
- else: contains(TEMPLATE, "vc.*"): \
+ contains(TEMPLATE, "vc.*"): \
manifest_file.output = $$BUILD_DIR/Package.appxmanifest
else: \
manifest_file.output = $$BUILD_DIR/AppxManifest.xml
@@ -80,49 +74,30 @@
write_file($$UUID_CACHE, WINRT_UUID)|error("Unable to write the UUID cache; aborting.")
eval($$WINRT_UUID)
}
- winphone:equals(WINSDK_VER, 8.0): WINRT_MANIFEST.identity = {$$WINRT_MANIFEST.identity}
}
isEmpty(WINRT_MANIFEST.name): WINRT_MANIFEST.name = $$TARGET
isEmpty(WINRT_MANIFEST.architecture): WINRT_MANIFEST.architecture = $$VCPROJ_ARCH
isEmpty(WINRT_MANIFEST.version): WINRT_MANIFEST.version = 1.0.0.0
isEmpty(WINRT_MANIFEST.publisher): WINRT_MANIFEST.publisher = Default publisher display name
- isEmpty(WINRT_MANIFEST.publisherid) {
- winphone:equals(WINSDK_VER, 8.0): WINRT_MANIFEST.publisherid = {00000000-0000-0000-0000-000000000000}
- else: WINRT_MANIFEST.publisherid = CN=$$(USERNAME)
- }
+ isEmpty(WINRT_MANIFEST.publisherid): WINRT_MANIFEST.publisherid = CN=$$(USERNAME)
isEmpty(WINRT_MANIFEST.phone_product_id): WINRT_MANIFEST.phone_product_id = $$WINRT_MANIFEST.identity
isEmpty(WINRT_MANIFEST.phone_publisher_id): WINRT_MANIFEST.phone_publisher_id = 00000000-0000-0000-0000-000000000000
isEmpty(WINRT_MANIFEST.description): WINRT_MANIFEST.description = Default package description
- isEmpty(WINRT_MANIFEST.author): WINRT_MANIFEST.author = Default package author
- isEmpty(WINRT_MANIFEST.genre): WINRT_MANIFEST.genre = apps.normal
isEmpty(WINRT_MANIFEST.background): WINRT_MANIFEST.background = green
isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light
isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en
- winphone:equals(WINSDK_VER, 8.0): INDENT = "$$escape_expand(\\r\\n) "
- else: INDENT = "$$escape_expand(\\r\\n) "
-
- # Languages are given as a string list
- WINRT_MANIFEST.languages = $$unique(WINRT_MANIFEST.languages)
- winphone:equals(WINSDK_VER, 8.0):!isEmpty(WINRT_MANIFEST.languages) {
- for(LANGUAGE, WINRT_MANIFEST.languages): \
- MANIFEST_LANGUAGES += "<Language code=\"$$LANGUAGE\" />"
-
- WINRT_MANIFEST.languages = \
- $$join(MANIFEST_LANGUAGES, $$INDENT, \
- "$$escape_expand(\\r\\n) <Languages xmlns=\"\">$$INDENT", \
- "$$escape_expand(\\r\\n) </Languages>")
- }
+ INDENT = "$$escape_expand(\\r\\n) "
# Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)
WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities)
WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device)
- !isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device)|winphone {
+ !isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device) {
MANIFEST_CAPABILITIES += "<Capabilities>"
for(CAPABILITY, WINRT_MANIFEST.capabilities): \
MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
- !winphone:for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \
+ for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \
MANIFEST_CAPABILITIES += " <DeviceCapability Name=\"$$CAPABILITY\" />"
MANIFEST_CAPABILITIES += "</Capabilities>"
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index c0caca09fa..8119c8aa09 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -24,6 +24,7 @@ QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_ISYSTEM = -isystem
QMAKE_CFLAGS_THREAD = -D_REENTRANT
QMAKE_CFLAGS_SPLIT_SECTIONS = -ffunction-sections
+QMAKE_CFLAGS_LTCG = -ipo
QMAKE_CFLAGS_SSE2 += -xSSE2
QMAKE_CFLAGS_SSE3 += -xSSE3
@@ -49,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_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_INCDIR =
QMAKE_LIBDIR =
@@ -70,6 +72,7 @@ QMAKE_LFLAGS_NOUNDEF = -Wl,-z,defs
QMAKE_LFLAGS_RPATH = -Wl,-rpath,
QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link,
QMAKE_LFLAGS_CXX11 =
+QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD = -ldl
diff --git a/mkspecs/macx-icc/qmake.conf b/mkspecs/macx-icc/qmake.conf
index 03dc58a65c..88b04976f2 100644
--- a/mkspecs/macx-icc/qmake.conf
+++ b/mkspecs/macx-icc/qmake.conf
@@ -23,14 +23,15 @@ QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD =
QMAKE_CFLAGS_SPLIT_SECTIONS = -ffunction-sections
+QMAKE_CFLAGS_LTCG = -ipo
-QMAKE_CFLAGS_SSE2 += -xSSE2
-QMAKE_CFLAGS_SSE3 += -xSSE3
-QMAKE_CFLAGS_SSSE3 += -xSSSE3
-QMAKE_CFLAGS_SSE4_1 += -xSSE4.1
-QMAKE_CFLAGS_SSE4_2 += -xSSE4.2
-QMAKE_CFLAGS_AVX += -xAVX
-QMAKE_CFLAGS_AVX2 += -xCORE-AVX2
+QMAKE_CFLAGS_SSE2 += -msse2
+QMAKE_CFLAGS_SSE3 += -msse3
+QMAKE_CFLAGS_SSSE3 += -mssse3
+QMAKE_CFLAGS_SSE4_1 += -msse4.1
+QMAKE_CFLAGS_SSE4_2 += -msse4.2
+QMAKE_CFLAGS_AVX += -mavx
+QMAKE_CFLAGS_AVX2 += -march=core-avx2
QMAKE_OBJECTIVE_CC = clang
QMAKE_OBJECTIVE_CFLAGS = -pipe
@@ -51,8 +52,10 @@ QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
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
+# Disabled, due to invalid C++11 code on Apple headers
+#QMAKE_CXXFLAGS_CXX11 = -std=c++11
QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
+QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_LINK = icpc
QMAKE_LINK_SHLIB = icpc
@@ -65,6 +68,7 @@ QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME = -install_name$${LITERAL_WHITESPACE}
QMAKE_LFLAGS_THREAD =
QMAKE_LFLAGS_RPATH =
+QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_LFLAGS_VERSION = -current_version$${LITERAL_WHITESPACE}
QMAKE_LFLAGS_COMPAT_VERSION = -compatibility_version$${LITERAL_WHITESPACE}
diff --git a/mkspecs/macx-ios-clang/rename_main.sh b/mkspecs/macx-ios-clang/rename_main.sh
index b30eb160d0..b1321e855e 100755
--- a/mkspecs/macx-ios-clang/rename_main.sh
+++ b/mkspecs/macx-ios-clang/rename_main.sh
@@ -46,9 +46,26 @@ if [ $# -eq 0 ]; then
else
for f in $(find $1 -name '*.o'); do
# Skip object files without the _main symbol
- nm $f | grep -q 'T _main$' || continue
+ nm $f 2>/dev/null | grep -q 'T _main$' || continue
- echo "Found main() in ${f#$1/}"
+ 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)
diff --git a/mkspecs/qnx-armle-v7-qcc/qplatformdefs.h b/mkspecs/qnx-armle-v7-qcc/qplatformdefs.h
index 2f95f0d392..e8590f2e3e 100644
--- a/mkspecs/qnx-armle-v7-qcc/qplatformdefs.h
+++ b/mkspecs/qnx-armle-v7-qcc/qplatformdefs.h
@@ -3,7 +3,7 @@
** Copyright (C) 2012 - 2014 BlackBerry Limited. All rights reserved.
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtCore module of the Qt Toolkit.
+** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -42,68 +42,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-#define __STDC_CONSTANT_MACROS
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-// QNX doesn't have the System V <sys/shm.h> header. This is not a standard
-// POSIX header, it's only documented in the Single UNIX Specification.
-// The preferred POSIX compliant way to share memory is to use the functions
-// in <sys/mman.h> that comply with the POSIX Real Time Interface (1003.1b).
-#include <sys/mman.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-// for htonl
-#include <arpa/inet.h>
-
-#define QT_USE_XOPEN_LFS_EXTENSIONS
-#if !defined(__EXT_QNX__READDIR64_R)
-#define QT_NO_READDIR64
-#endif
-#include "../common/posix/qplatformdefs.h"
-#if defined(__EXT_QNX__READDIR64_R)
-#define QT_EXT_QNX_READDIR_R ::_readdir64_r
-#elif defined(__EXT_QNX__READDIR_R)
-#define QT_EXT_QNX_READDIR_R ::_readdir_r
-#endif
-
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-
-// QNX6 doesn't have getpagesize()
-inline int getpagesize()
-{
- return ::sysconf(_SC_PAGESIZE);
-}
-
-#include <stdlib.h>
-
-#define QT_QWS_TEMP_DIR QString::fromLatin1(qgetenv("TMP"))
+#include "../common/qnx/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/qnx-armv7le-qcc/qplatformdefs.h b/mkspecs/qnx-armv7le-qcc/qplatformdefs.h
index bc8f6792ab..f97befa5cb 100644
--- a/mkspecs/qnx-armv7le-qcc/qplatformdefs.h
+++ b/mkspecs/qnx-armv7le-qcc/qplatformdefs.h
@@ -3,7 +3,7 @@
** Copyright (C) 2012 - 2014 BlackBerry Limited. All rights reserved.
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtCore module of the Qt Toolkit.
+** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/mkspecs/qnx-x86-qcc/qplatformdefs.h b/mkspecs/qnx-x86-qcc/qplatformdefs.h
index b47aecde0d..e8590f2e3e 100644
--- a/mkspecs/qnx-x86-qcc/qplatformdefs.h
+++ b/mkspecs/qnx-x86-qcc/qplatformdefs.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2012 Research In Motion Limited. <blackberry-qt@qnx.com>
+** Copyright (C) 2012 - 2014 BlackBerry Limited. All rights reserved.
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtCore module of the Qt Toolkit.
+** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -42,68 +42,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-#define __STDC_CONSTANT_MACROS
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-// QNX doesn't have the System V <sys/shm.h> header. This is not a standard
-// POSIX header, it's only documented in the Single UNIX Specification.
-// The preferred POSIX compliant way to share memory is to use the functions
-// in <sys/mman.h> that comply with the POSIX Real Time Interface (1003.1b).
-#include <sys/mman.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-// for htonl
-#include <arpa/inet.h>
-
-#define QT_USE_XOPEN_LFS_EXTENSIONS
-#if !defined(__EXT_QNX__READDIR64_R)
-#define QT_NO_READDIR64
-#endif
-#include "../common/posix/qplatformdefs.h"
-#if defined(__EXT_QNX__READDIR64_R)
-#define QT_EXT_QNX_READDIR_R ::_readdir64_r
-#elif defined(__EXT_QNX__READDIR_R)
-#define QT_EXT_QNX_READDIR_R ::_readdir_r
-#endif
-
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-
-// QNX6 doesn't have getpagesize()
-inline int getpagesize()
-{
- return ::sysconf(_SC_PAGESIZE);
-}
-
-#include <stdlib.h>
-
-#define QT_QWS_TEMP_DIR QString::fromLatin1(qgetenv("TMP"))
+#include "../common/qnx/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
index d26ffb4e21..01c8ab9bc3 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -78,6 +78,7 @@ QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
QMAKE_LFLAGS_DLL = -shared
QMAKE_LFLAGS_CXX11 =
QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
+QMAKE_LFLAGS_USE_GOLD = -fuse-ld=gold
QMAKE_LINK_OBJECT_MAX = 10
QMAKE_LINK_OBJECT_SCRIPT = object_script
QMAKE_PREFIX_STATICLIB = lib
diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf
index a20d7c3122..d326cdeee3 100644
--- a/mkspecs/win32-icc/qmake.conf
+++ b/mkspecs/win32-icc/qmake.conf
@@ -21,10 +21,16 @@ QMAKE_CFLAGS = -nologo -Zm200 /Qprec /Qwd1744,1738
QMAKE_CFLAGS_WARN_ON = -W3 /Qwd673
QMAKE_CFLAGS_WARN_OFF = -W0 /Qwd673
QMAKE_CFLAGS_RELEASE = -O2 -MD
-# Giving -O2 to debug builds should make icc 9.1 happy, but it might make debugging harder, so it might be reverted.
-# This is actually a workaround for a bug in icc 9.1.
-QMAKE_CFLAGS_DEBUG = -Zi -MDd -O2
+QMAKE_CFLAGS_DEBUG = -Zi -MDd -Od
QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_LTCG = -Qipo
+QMAKE_CFLAGS_SSE2 = -QxSSE2
+QMAKE_CFLAGS_SSE3 = -QxSSE3
+QMAKE_CFLAGS_SSSE3 = -QxSSSE3
+QMAKE_CFLAGS_SSE4_1 = -QxSSE4.1
+QMAKE_CFLAGS_SSE4_2 = -QxSSE4.2
+QMAKE_CFLAGS_AVX = -QxAVX
+QMAKE_CFLAGS_AVX2 = -QxCORE-AVX2
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS /Zc:forScope
@@ -37,8 +43,10 @@ QMAKE_CXXFLAGS_STL_ON = -GX
QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON = -GR
QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -GX
+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
+QMAKE_CXXFLAGS_CXX11 = -Qstd=c++11
+QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_INCDIR =
@@ -56,6 +64,7 @@ QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:console
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:windows
QMAKE_LFLAGS_DLL = /DLL
+QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_EXTENSION_STATICLIB = lib
QMAKE_LIBS =
diff --git a/mkspecs/win32-msvc2013/qmake.conf b/mkspecs/win32-msvc2013/qmake.conf
index 6e0bd0b214..535904a8f9 100644
--- a/mkspecs/win32-msvc2013/qmake.conf
+++ b/mkspecs/win32-msvc2013/qmake.conf
@@ -25,8 +25,8 @@ QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t -FS
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
+QMAKE_CFLAGS_RELEASE = -O2 -MD -Zc:strictStrings
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi -Zc:strictStrings
QMAKE_CFLAGS_DEBUG = -Zi -MDd
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_LTCG = -GL