summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/devices/linux-beagleboard-g++/qmake.conf7
-rw-r--r--mkspecs/features/plugin_bundle.prf2
-rw-r--r--mkspecs/features/qt.prf11
-rw-r--r--mkspecs/features/resources.prf60
-rw-r--r--[-rwxr-xr-x]mkspecs/macx-ios-clang/Info.plist.app0
-rw-r--r--mkspecs/macx-ios-clang/features/qt.prf34
-rw-r--r--mkspecs/macx-ios-clang/qmake.conf2
-rwxr-xr-xmkspecs/macx-ios-clang/rename_main.sh78
8 files changed, 80 insertions, 114 deletions
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/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/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,&,&,
+ 1 ~= s,\',',
+ 1 ~= s,\",",
+ 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/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/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/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/rename_main.sh b/mkspecs/macx-ios-clang/rename_main.sh
deleted file mode 100755
index 1547f5f75c..0000000000
--- a/mkspecs/macx-ios-clang/rename_main.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/bash
-
-#############################################################################
-##
-## Copyright (C) 2015 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is the build configuration utility 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$
-##
-#############################################################################
-
-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"
- 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