Changeset View
Changeset View
Standalone View
Standalone View
depends/patches/qt/dont_hardcode_x86_64.patch
macOS: Don't hard-code x86_64 as the architecture when using qmake | macOS: Don't hard-code x86_64 as the architecture when using qmake | ||||
Upstream commit: | Upstream commit: | ||||
- Qt 6.1: 9082cc8e8d5a6441dabe5e7a95bc0cd9085b95fe | - Qt 6.1: 9082cc8e8d5a6441dabe5e7a95bc0cd9085b95fe | ||||
For other Qt branches see | For other Qt branches see | ||||
https://codereview.qt-project.org/q/I70db7e4c27f0d3da5d0af33cb491d72c312d3fa8 | https://codereview.qt-project.org/q/I70db7e4c27f0d3da5d0af33cb491d72c312d3fa8 | ||||
--- old/qtbase/configure.json | --- old/qtbase/configure.json | ||||
+++ new/qtbase/configure.json | +++ new/qtbase/configure.json | ||||
@@ -208,11 +208,18 @@ | @@ -244,11 +244,18 @@ | ||||
"testTypeDependencies": { | "testTypeDependencies": { | ||||
"linkerSupportsFlag": [ "use_gold_linker" ], | "linkerSupportsFlag": [ "use_bfd_linker", "use_gold_linker", "use_lld_linker" ], | ||||
- "verifySpec": [ "shared", "use_gold_linker", "compiler-flags", "qmakeargs", "commit" ], | - "verifySpec": [ "shared", "use_bfd_linker", "use_gold_linker", "use_lld_linker", "compiler-flags", "qmakeargs", "commit" ], | ||||
+ "verifySpec": [ | + "verifySpec": [ | ||||
+ "shared", | + "shared", | ||||
+ "use_gold_linker", | + "use_bfd_linker", "use_gold_linker", "use_lld_linker", | ||||
+ "compiler-flags", "qmakeargs", | + "compiler-flags", "qmakeargs", | ||||
+ "simulator_and_device", | + "simulator_and_device", | ||||
+ "thread", | + "thread", | ||||
+ "commit" ], | + "commit" ], | ||||
"compile": [ "verifyspec" ], | "compile": [ "verifyspec" ], | ||||
"detectPkgConfig": [ "cross_compile", "machineTuple" ], | "detectPkgConfig": [ "cross_compile", "machineTuple" ], | ||||
"library": [ "pkg-config", "compiler-flags" ], | "library": [ "pkg-config", "compiler-flags" ], | ||||
- "getPkgConfigVariable": [ "pkg-config" ] | - "getPkgConfigVariable": [ "pkg-config" ] | ||||
+ "getPkgConfigVariable": [ "pkg-config" ], | + "getPkgConfigVariable": [ "pkg-config" ], | ||||
+ "architecture" : [ "verifyspec" ] | + "architecture" : [ "verifyspec" ] | ||||
}, | }, | ||||
"testTypeAliases": { | "testTypeAliases": { | ||||
@@ -653,7 +660,7 @@ | @@ -762,7 +769,7 @@ | ||||
}, | }, | ||||
"architecture": { | "architecture": { | ||||
"label": "Architecture", | "label": "Architecture", | ||||
- "output": [ "architecture" ] | - "output": [ "architecture" ] | ||||
+ "output": [ "architecture", "commitConfig" ] | + "output": [ "architecture", "commitConfig" ] | ||||
}, | }, | ||||
"pkg-config": { | "pkg-config": { | ||||
"label": "Using pkg-config", | "label": "Using pkg-config", | ||||
diff --git a/configure.pri b/configure.pri | diff --git a/configure.pri b/configure.pri | ||||
index 33c90a8c2f..71767e29d6 100644 | index 49755f7abfd..8be9b10d7d4 100644 | ||||
--- old/qtbase/configure.pri | --- old/qtbase/configure.pri | ||||
+++ new/qtbase/configure.pri | +++ new/qtbase/configure.pri | ||||
@@ -642,6 +642,13 @@ defineTest(qtConfOutput_commitOptions) { | @@ -662,6 +662,13 @@ defineTest(qtConfOutput_commitOptions) { | ||||
write_file($$QT_BUILD_TREE/mkspecs/qdevice.pri, $${currentConfig}.output.devicePro)|error() | write_file($$QT_BUILD_TREE/mkspecs/qdevice.pri, $${currentConfig}.output.devicePro)|error() | ||||
} | } | ||||
+# Output is written after configuring each Qt module, | +# Output is written after configuring each Qt module, | ||||
+# but some tests within a module might depend on the | +# but some tests within a module might depend on the | ||||
+# configuration output of previous tests. | +# configuration output of previous tests. | ||||
+defineTest(qtConfOutput_commitConfig) { | +defineTest(qtConfOutput_commitConfig) { | ||||
+ qtConfProcessOutput() | + qtConfProcessOutput() | ||||
+} | +} | ||||
+ | + | ||||
# type (empty or 'host'), option name, default value | # type (empty or 'host'), option name, default value | ||||
defineTest(processQtPath) { | defineTest(processQtPath) { | ||||
out_var = config.rel_input.$${2} | out_var = config.rel_input.$${2} | ||||
diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf | diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf | ||||
index 7d4a406134..de96c12fc9 100644 | index d16b77acb8e..4ba0a8eaa36 100644 | ||||
--- old/qtbase/mkspecs/common/macx.conf | --- old/qtbase/mkspecs/common/macx.conf | ||||
+++ new/qtbase/mkspecs/common/macx.conf | +++ new/qtbase/mkspecs/common/macx.conf | ||||
@@ -6,7 +6,6 @@ QMAKE_PLATFORM += macos osx macx | @@ -6,7 +6,6 @@ QMAKE_PLATFORM += macos osx macx | ||||
QMAKE_MAC_SDK = macosx | QMAKE_MAC_SDK = macosx | ||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12 | QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13 | ||||
-QMAKE_APPLE_DEVICE_ARCHS = x86_64 | -QMAKE_APPLE_DEVICE_ARCHS = x86_64 | ||||
QT_MAC_SDK_VERSION_MIN = 10.13 | # Should be 10.15, but as long as the CI builds with | ||||
QT_MAC_SDK_VERSION_MAX = 11.0 | # older SDKs we have to keep this. | ||||
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf | diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf | ||||
index d052808c14..0a89effe87 100644 | index 92a9112bca6..d888731ec8d 100644 | ||||
--- old/qtbase/mkspecs/features/mac/default_post.prf | --- old/qtbase/mkspecs/features/mac/default_post.prf | ||||
+++ new/qtbase/mkspecs/features/mac/default_post.prf | +++ new/qtbase/mkspecs/features/mac/default_post.prf | ||||
@@ -89,6 +89,11 @@ app_extension_api_only { | @@ -90,6 +90,11 @@ app_extension_api_only { | ||||
QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION | QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION | ||||
} | } | ||||
+# Non-universal builds do not set QMAKE_APPLE_DEVICE_ARCHS, | +# Non-universal builds do not set QMAKE_APPLE_DEVICE_ARCHS, | ||||
+# so we pick it up from what the arch test resolved instead. | +# so we pick it up from what the arch test resolved instead. | ||||
+isEmpty(QMAKE_APPLE_DEVICE_ARCHS): \ | +isEmpty(QMAKE_APPLE_DEVICE_ARCHS): \ | ||||
+ QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCH | + QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCH | ||||
+ | + | ||||
macx-xcode { | macx-xcode { | ||||
qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO | qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO | ||||
!isEmpty(QMAKE_PKGINFO_TYPEINFO): \ | !isEmpty(QMAKE_PKGINFO_TYPEINFO): \ | ||||
@@ -144,9 +149,6 @@ macx-xcode { | @@ -145,9 +150,6 @@ macx-xcode { | ||||
simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS | simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS | ||||
VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS | VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS | ||||
- isEmpty(VALID_ARCHS): \ | - isEmpty(VALID_ARCHS): \ | ||||
- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture") | - error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture") | ||||
- | - | ||||
single_arch: VALID_ARCHS = $$first(VALID_ARCHS) | single_arch: VALID_ARCHS = $$first(VALID_ARCHS) | ||||
ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS)) | ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS)) | ||||
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf | diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf | ||||
index 5003679bd0..c7c080cb07 100644 | index efbe7c1e55b..8add6dc8043 100644 | ||||
--- old/qtbase/mkspecs/features/toolchain.prf | --- old/qtbase/mkspecs/features/toolchain.prf | ||||
+++ new/qtbase/mkspecs/features/toolchain.prf | +++ new/qtbase/mkspecs/features/toolchain.prf | ||||
@@ -182,9 +182,14 @@ isEmpty($${target_prefix}.INCDIRS) { | @@ -182,9 +182,14 @@ isEmpty($${target_prefix}.INCDIRS) { | ||||
# UIKit simulator platforms will see the device SDK's sysroot in | # UIKit simulator platforms will see the device SDK's sysroot in | ||||
# QMAKE_DEFAULT_*DIRS, because they're handled in a single build pass. | # QMAKE_DEFAULT_*DIRS, because they're handled in a single build pass. | ||||
darwin { | darwin { | ||||
- # Clang doesn't pick up the architecture from the sysroot, and will | - # Clang doesn't pick up the architecture from the sysroot, and will | ||||
- # default to the host architecture, so we need to manually set it. | - # default to the host architecture, so we need to manually set it. | ||||
Show All 12 Lines |