summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/macx.conf2
-rw-r--r--mkspecs/common/uikit.conf2
-rw-r--r--mkspecs/common/uikit/clang.conf4
-rw-r--r--mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf25
-rw-r--r--mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h8
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf6
-rwxr-xr-xmkspecs/features/data/mac/objc_namespace.sh6
-rw-r--r--mkspecs/features/mac/asset_catalogs.prf2
-rw-r--r--mkspecs/features/mac/default_post.prf4
-rw-r--r--mkspecs/features/qt.prf74
-rw-r--r--mkspecs/features/resources.prf1
-rw-r--r--mkspecs/features/uikit/default_pre.prf9
-rw-r--r--mkspecs/features/unix/mno_extern_direct_access.prf2
-rw-r--r--mkspecs/features/unix/no_direct_extern_access.prf7
-rw-r--r--mkspecs/features/wasm/emcc_ver.prf2
-rw-r--r--mkspecs/features/wasm/wasm.prf8
-rw-r--r--mkspecs/features/win32/separate_debug_info.prf6
-rw-r--r--mkspecs/wasm-emscripten/qmake.conf11
18 files changed, 117 insertions, 62 deletions
diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf
index b5427dd88c..2c1c90fd2b 100644
--- a/mkspecs/common/macx.conf
+++ b/mkspecs/common/macx.conf
@@ -7,7 +7,7 @@ QMAKE_MAC_SDK = macosx
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14
-QT_MAC_SDK_VERSION_MIN = 10.15
+QT_MAC_SDK_VERSION_MIN = 11
QT_MAC_SDK_VERSION_MAX = 12
diff --git a/mkspecs/common/uikit.conf b/mkspecs/common/uikit.conf
index 0388b8e616..8419506f09 100644
--- a/mkspecs/common/uikit.conf
+++ b/mkspecs/common/uikit.conf
@@ -3,7 +3,7 @@
#
QMAKE_PLATFORM += uikit
-CONFIG += bitcode reduce_exports shallow_bundle no_qt_rpath
+CONFIG += reduce_exports shallow_bundle no_qt_rpath
INCLUDEPATH += $$PWD/uikit
diff --git a/mkspecs/common/uikit/clang.conf b/mkspecs/common/uikit/clang.conf
index 6b9b7eea8e..f828f8b6f8 100644
--- a/mkspecs/common/uikit/clang.conf
+++ b/mkspecs/common/uikit/clang.conf
@@ -1,7 +1,3 @@
#
# compiler settings for iOS/tvOS/watchOS clang compilers
#
-
-# Based on the following information, http://clang.llvm.org/doxygen/ObjCRuntime_8h_source.html,
-# we can conclude that it's safe to always pass the following flags
-QMAKE_OBJECTIVE_CFLAGS += -fobjc-nonfragile-abi -fobjc-legacy-dispatch
diff --git a/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf b/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf
new file mode 100644
index 0000000000..9903775883
--- /dev/null
+++ b/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf
@@ -0,0 +1,25 @@
+#
+# Generic qmake configuration for building with g++ on Raspberry Pi 4 (64-bit).
+#
+# Tested with Raspberry Pi OS 64-bit and aarch64 gcc compiler from Debian package repository
+#
+# A minimal configure line could look something like this:
+# ./configure -release -opengl es2 -device linux-rasp-pi4-aarch64 -device-option CROSS_COMPILE=aarch64-linux-gnu- -sysroot ~/rpi-sysroot -prefix /usr/local/qt6 -extprefix $HOME/qt-raspi
+
+DISTRO_OPTS += deb-multi-arch
+
+include(../common/linux_device_pre.conf)
+
+QMAKE_LIBS_EGL += -lEGL
+QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL
+
+QMAKE_CFLAGS += -march=armv8-a
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+
+EGLFS_DEVICE_INTEGRATION = eglfs_kms
+
+LINKER_FLAGS += -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
+
+include(../common/linux_device_post.conf)
+
+load(qt_config)
diff --git a/mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h b/mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h
new file mode 100644
index 0000000000..3fe85b661c
--- /dev/null
+++ b/mkspecs/devices/linux-rasp-pi4-aarch64/qplatformdefs.h
@@ -0,0 +1,8 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index 037dc23772..1819a1f52c 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -62,8 +62,10 @@ contains(TEMPLATE, ".*app"):!build_pass {
!isEmpty(ANDROID_EXTRA_LIBS): \
FILE_CONTENT += " \"android-extra-libs\": $$emitString($$join(ANDROID_EXTRA_LIBS, ",")),"
- FILE_CONTENT += " \"qml-importscanner-binary\": $$emitString($$[QT_HOST_LIBEXECS]/qmlimportscanner),"
- FILE_CONTENT += " \"rcc-binary\": $$emitString($$[QT_HOST_LIBEXECS]/rcc),"
+ tool_extension = ""
+ contains(QMAKE_HOST.os, Windows): tool_extension = ".exe"
+ FILE_CONTENT += " \"qml-importscanner-binary\": $$emitString($$[QT_HOST_LIBEXECS]/qmlimportscanner$${tool_extension}),"
+ FILE_CONTENT += " \"rcc-binary\": $$emitString($$[QT_HOST_LIBEXECS]/rcc$${tool_extension}),"
qml_import_paths = $$(QML2_IMPORT_PATH)
qml_import_paths = $$split(qml_import_paths, $$DIRLIST_SEPARATOR)
diff --git a/mkspecs/features/data/mac/objc_namespace.sh b/mkspecs/features/data/mac/objc_namespace.sh
index 5ce25900f0..abb173ef69 100755
--- a/mkspecs/features/data/mac/objc_namespace.sh
+++ b/mkspecs/features/data/mac/objc_namespace.sh
@@ -79,7 +79,7 @@ read_32bit_value() {
otool_args=
otool() {
- command otool $otool_args $*
+ command otool $otool_args "$@"
}
declare -a extra_classnames_files
@@ -197,13 +197,13 @@ if [ "${mach_header[0]}" != "MH_MAGIC_64" ]; then
exit 1
fi
-architectures=$(otool -f -v $target | grep architecture)
+architectures=$(otool -f -v "$target" | grep architecture)
setup_arch() {
arch="$1"
if [ ! -z "$arch" ]; then
otool_args="-arch $arch"
- offset=$(otool -f -v $target | grep -A 6 "architecture $arch" | grep offset)
+ offset=$(otool -f -v "$target" | grep -A 6 "architecture $arch" | grep offset)
offset="${offset##*( )}"
arch_offset="$(echo $offset | cut -d ' ' -f 2)"
echo "🤖 Processing architecture '$arch' at offset $arch_offset..."
diff --git a/mkspecs/features/mac/asset_catalogs.prf b/mkspecs/features/mac/asset_catalogs.prf
index 58211c13a2..1b9745a132 100644
--- a/mkspecs/features/mac/asset_catalogs.prf
+++ b/mkspecs/features/mac/asset_catalogs.prf
@@ -68,7 +68,7 @@
$$asset_catalog_app_icon_arg \
$$asset_catalog_launch_image_arg \
--output-partial-info-plist $$shell_quote($$asset_catalog_compiler.target) \
- --platform $${version_identifier} \
+ --platform $${platform_identifier} \
--minimum-deployment-target $${deployment_target} \
--compile $$shell_quote($$QMAKE_ASSET_CATALOGS_BUILD_PATH)
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index abc6d82ade..09db1764b1 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -208,9 +208,11 @@ macx-xcode {
contains(VALID_SIMULATOR_ARCHS, $$arch) {
sdk = $$simulator.sdk
version_identifier = $$simulator.deployment_identifier
+ platform_identifier = $$simulator.sdk
} else {
sdk = $$device.sdk
version_identifier = $$device.deployment_identifier
+ platform_identifier = $$device.sdk
}
version_min_flags = \
@@ -237,9 +239,11 @@ macx-xcode {
} else {
simulator {
version_identifier = $$simulator.deployment_identifier
+ platform_identifier = $$simulator.sdk
sysroot_path = $$xcodeSDKInfo(Path, $$simulator.sdk)
} else {
version_identifier = $$device.deployment_identifier
+ platform_identifier = $$device.sdk
sysroot_path = $$xcodeSDKInfo(Path, $$device.sdk)
}
version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 0e03027bc3..71b6679af3 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -59,7 +59,7 @@ qaxserver {
!force_import_plugins:!contains(TEMPLATE, ".*app"):!if(contains(TEMPLATE, ".*lib"):dll): \
CONFIG -= import_plugins
unix {
- contains(QT_CONFIG, no_extern_direct_access): CONFIG += mno_extern_direct_access
+ contains(QT_CONFIG, no_direct_extern_access): CONFIG += no_direct_extern_access
else:contains(QT_CONFIG, reduce_relocations):!contains(TEMPLATE, .*lib): {
QMAKE_CFLAGS += $$QMAKE_CFLAGS_PIC
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_PIC
@@ -75,13 +75,15 @@ all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_d
QTPLUGIN = $$unique($$list($$lower($$QTPLUGIN)))
-import_plugins:qtConfig(static) {
+# Sanitize requested plugins, and add any default plugins
+import_plugins {
manualplugs = $$QTPLUGIN # User may specify plugins. Mostly legacy.
autoplugs = # Auto-added plugins.
# First round: explicitly specified modules.
- plugin_deps = $$all_qt_module_deps
+ all_plugin_deps = $$all_qt_module_deps
+ plugin_deps = $$all_plugin_deps
for(ever) {
- # Automatically link the default plugins for the linked Qt modules.
+ # Automatically add the default plugins for the linked Qt modules.
for (qtmod, plugin_deps) {
for (ptype, QT.$${qtmod}.plugin_types) {
nptype = $$replace(ptype, [-/], _)
@@ -89,7 +91,7 @@ import_plugins:qtConfig(static) {
for (plug, QT_PLUGINS) {
equals(QT_PLUGIN.$${plug}.TYPE, $$ptype) {
for (dep, QT_PLUGIN.$${plug}.EXTENDS) {
- !contains(all_qt_module_deps, $$dep) {
+ !contains(all_plugin_deps, $$dep) {
plug =
break()
}
@@ -112,44 +114,41 @@ import_plugins:qtConfig(static) {
for (plug, QTPLUGIN): \
plugin_deps += $$eval(QT_PLUGIN.$${plug}.DEPENDS)
plugin_deps = $$resolve_depends(plugin_deps, "QT.", ".depends" ".run_depends")
- plugin_deps -= $$all_qt_module_deps
+ plugin_deps -= $$all_plugin_deps
+
isEmpty(plugin_deps): \
break()
# ... and start over if any new Qt modules appeared,
# as these may want to load plugins in turn.
- all_qt_module_deps += $$plugin_deps
+ all_plugin_deps += $$plugin_deps
}
extraplugs = $$manualplugs
manualplugs -= $$autoplugs
extraplugs -= $$manualplugs
!isEmpty(extraplugs): \
warning("Redundant entries in QTPLUGIN: $$extraplugs")
-
- !isEmpty(QTPLUGIN) {
- IMPORT_FILE_CONT = \
- "// This file is autogenerated by qmake. It imports static plugin classes for" \
- "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables." \
- "$${LITERAL_HASH}include <QtPlugin>"
- for (plug, QTPLUGIN) {
- plug_class = $$eval(QT_PLUGIN.$${plug}.CLASS_NAME)
- !isEmpty(plug_class): \
- IMPORT_FILE_CONT += "Q_IMPORT_PLUGIN($$plug_class)"
- else: \
- warning("Plugin class name could not be determined for plugin '$$plug'.")
- }
- TARGET_BASENAME = $$lower($$basename(TARGET))
- TARGET_BASENAME ~= s/\s/_/g
-
- IMPORT_CPP = $$OUT_PWD/$${TARGET_BASENAME}_plugin_import.cpp
- write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error()
- GENERATED_SOURCES += $$IMPORT_CPP
- QMAKE_DISTCLEAN += $$IMPORT_CPP
- }
}
-# Only link against plugins in static builds
-!isEmpty(QTPLUGIN):qtConfig(static) {
+# Link static plugins
+!isEmpty(QTPLUGIN) {
for (plug, QTPLUGIN) {
+ module_config = $$eval(QT_PLUGIN.$${plug}.module_config)
+ isEmpty(module_config):!qtConfig(static): \
+ next() # Compatibility with older modules
+
+ !contains(module_config, staticlib): \
+ next()
+
+ plug_class = $$eval(QT_PLUGIN.$${plug}.CLASS_NAME)
+ !isEmpty(plug_class): \
+ IMPORT_FILE_CONT += "Q_IMPORT_PLUGIN($$plug_class)"
+ else: \
+ warning("Plugin class name could not be determined for plugin '$$plug'.")
+
+ plugin_deps = $$eval(QT_PLUGIN.$${plug}.DEPENDS)
+ plugin_deps = $$resolve_depends(plugin_deps, "QT.", ".depends" ".run_depends")
+ all_qt_module_deps *= $$plugin_deps
+
# Check if the plugin is known to Qt. We can use this to determine
# the plugin path. Unknown plugins must rely on the default link path.
plug_type = $$eval(QT_PLUGIN.$${plug}.TYPE)
@@ -163,6 +162,21 @@ import_plugins:qtConfig(static) {
LIBS += -l$${plug}$$qtPlatformTargetSuffix()
}
}
+
+ !isEmpty(IMPORT_FILE_CONT) {
+ IMPORT_FILE_CONT = \
+ "// This file is autogenerated by qmake. It imports static plugin classes for" \
+ "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables." \
+ "$${LITERAL_HASH}include <QtPlugin>" \
+ "$$IMPORT_FILE_CONT"
+
+ TARGET_BASENAME = $$lower($$basename(TARGET))
+ TARGET_BASENAME ~= s/\s/_/g
+ IMPORT_CPP = $$OUT_PWD/$${TARGET_BASENAME}_plugin_import.cpp
+ write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error()
+ GENERATED_SOURCES += $$IMPORT_CPP
+ QMAKE_DISTCLEAN += $$IMPORT_CPP
+ }
}
# target variable, flag source variable
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index a9ef9a7155..7fbd16d3bd 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -4,6 +4,7 @@ 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}
+!qtConfig(zstd): QMAKE_RESOURCE_FLAGS += --no-zstd
load(resources_functions)
qtFlattenResources()
diff --git a/mkspecs/features/uikit/default_pre.prf b/mkspecs/features/uikit/default_pre.prf
index bc72936520..4a7c0820d0 100644
--- a/mkspecs/features/uikit/default_pre.prf
+++ b/mkspecs/features/uikit/default_pre.prf
@@ -7,15 +7,6 @@ $$sim_and_dev|contains(QMAKE_MAC_SDK, ^$${device.sdk}.*): \
$$sim_and_dev|contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \
CONFIG += simulator $${simulator.sdk}
-$$sim_and_dev {
- # For a simulator_and_device build all the config tests
- # are based on the device's ARM SDK, but we know that the simulator
- # is Intel and that we support SSE/SSE2.
- QT_CPU_FEATURES.$$QT_ARCH += sse sse2
- CONFIG += sse sse2
- DEFINES += QT_COMPILER_SUPPORTS_SSE2
-}
-
CONFIG += entrypoint
unset(sim_and_dev)
diff --git a/mkspecs/features/unix/mno_extern_direct_access.prf b/mkspecs/features/unix/mno_extern_direct_access.prf
deleted file mode 100644
index 816e28bb43..0000000000
--- a/mkspecs/features/unix/mno_extern_direct_access.prf
+++ /dev/null
@@ -1,2 +0,0 @@
-QMAKE_CFLAGS += -mno-direct-extern-access
-QMAKE_CXXFLAGS += -mno-direct-extern-access
diff --git a/mkspecs/features/unix/no_direct_extern_access.prf b/mkspecs/features/unix/no_direct_extern_access.prf
new file mode 100644
index 0000000000..2b7b3c8539
--- /dev/null
+++ b/mkspecs/features/unix/no_direct_extern_access.prf
@@ -0,0 +1,7 @@
+clang {
+ QMAKE_CFLAGS += -fno-direct-access-external-data
+ QMAKE_CXXFLAGS += -fno-direct-access-external-data
+} else {
+ QMAKE_CFLAGS += -mno-direct-extern-access
+ QMAKE_CXXFLAGS += -mno-direct-extern-access
+}
diff --git a/mkspecs/features/wasm/emcc_ver.prf b/mkspecs/features/wasm/emcc_ver.prf
index 88a75108f1..3b56b17158 100644
--- a/mkspecs/features/wasm/emcc_ver.prf
+++ b/mkspecs/features/wasm/emcc_ver.prf
@@ -1,5 +1,5 @@
defineReplace(qtEmccRecommendedVersion) {
- return (3.0.0)
+ return (3.1.10)
}
defineReplace(qtSystemEmccVersion) {
diff --git a/mkspecs/features/wasm/wasm.prf b/mkspecs/features/wasm/wasm.prf
index 1ccda7a6e8..5e6501ed99 100644
--- a/mkspecs/features/wasm/wasm.prf
+++ b/mkspecs/features/wasm/wasm.prf
@@ -7,6 +7,14 @@ isEmpty(DESTDIR): DESTDIR = $$OUT_PWD
exists($$QMAKE_QT_CONFIG) {
## this may be subject to change
+ ## qmake puts a space if done otherwise
+ !isEmpty(QT_WASM_EXTRA_EXPORTED_METHODS): {
+ EXPORTED_METHODS = UTF16ToString,stringToUTF16,$$QT_WASM_EXTRA_EXPORTED_METHODS
+ } else {
+ EXPORTED_METHODS = UTF16ToString,stringToUTF16
+ }
+ EMCC_LFLAGS += -s EXPORTED_RUNTIME_METHODS=$$EXPORTED_METHODS
+
qtConfig(thread) {
EMCC_LFLAGS += -pthread
diff --git a/mkspecs/features/win32/separate_debug_info.prf b/mkspecs/features/win32/separate_debug_info.prf
index 2838020f01..8550fdda15 100644
--- a/mkspecs/features/win32/separate_debug_info.prf
+++ b/mkspecs/features/win32/separate_debug_info.prf
@@ -13,6 +13,10 @@ have_target:!static:!isEmpty(QMAKE_OBJCOPY) {
QMAKE_POST_LINK = $$copy_debug_info && $$strip_debug_info && $$link_debug_info $$QMAKE_POST_LINK
silent:QMAKE_POST_LINK = @echo creating $@.debug && $$QMAKE_POST_LINK
- target.targets += $$QMAKE_TARGET_DEBUG_INFO
+ contains(TEMPLATE, lib$):!plugin {
+ dlltarget.targets += $$QMAKE_TARGET_DEBUG_INFO
+ } else {
+ target.targets += $$QMAKE_TARGET_DEBUG_INFO
+ }
QMAKE_DISTCLEAN += $$QMAKE_TARGET_DEBUG_INFO
}
diff --git a/mkspecs/wasm-emscripten/qmake.conf b/mkspecs/wasm-emscripten/qmake.conf
index 140f2b4801..6bb99d49b6 100644
--- a/mkspecs/wasm-emscripten/qmake.conf
+++ b/mkspecs/wasm-emscripten/qmake.conf
@@ -22,19 +22,16 @@ load(emcc_ver)
# (with "wasm validation error: too many locals" type errors) if optimizations
# are omitted. Enable optimizations also for debug builds.
QMAKE_LFLAGS_DEBUG += -Os
-
- # Declare all async functions
- QMAKE_LFLAGS += -s \'ASYNCIFY_IMPORTS=[\"qt_asyncify_suspend_js\", \"qt_asyncify_resume_js\", \"emscripten_sleep\"]\'
}
}
+# Declare async functions
+QMAKE_LFLAGS += -s \'ASYNCIFY_IMPORTS=qt_asyncify_suspend_js,qt_asyncify_resume_js\'
+
EMCC_COMMON_LFLAGS += \
-s WASM=1 \
- -s FULL_ES2=1 \
- -s FULL_ES3=1 \
- -s USE_WEBGL2=1 \
+ -s MAX_WEBGL_VERSION=2 \
-s ERROR_ON_UNDEFINED_SYMBOLS=1 \
- -s EXPORTED_RUNTIME_METHODS=[UTF16ToString,stringToUTF16,specialHTMLTargets] \
--bind \
-s FETCH=1 \
-s MODULARIZE=1 \