Skip to content

use x86_64h for macos targets >= 12.0#1461

Open
tsteven4 wants to merge 3 commits into
GPSBabel:masterfrom
tsteven4:macos_haswell
Open

use x86_64h for macos targets >= 12.0#1461
tsteven4 wants to merge 3 commits into
GPSBabel:masterfrom
tsteven4:macos_haswell

Conversation

@tsteven4
Copy link
Copy Markdown
Collaborator

I believe macOS 12.0 or later does not run on pre-Haswell Intel CPUs. So when our minimum target is >= 12.0 we should use x86_64h instead of x86_64.

@tsteven4 tsteven4 requested a review from robertlipe September 16, 2025 22:14
@tsteven4
Copy link
Copy Markdown
Collaborator Author

This was suggested at godotengine/godot-proposals#11150

@tsteven4
Copy link
Copy Markdown
Collaborator Author

@robertlipe can you confirm macos >= 12.0 requires haswell on intel cpus?

@tsteven4
Copy link
Copy Markdown
Collaborator Author

The above reasoning makes one question why Qt 6.10.0 even supports x86_64 (actually >= 6.8.0).
https://doc-snapshots.qt.io/qt6-6.10/supported-platforms.html

macOS
Build Environment	Target Platform	Architecture
Xcode 15 (macOS 14 SDK) or higher	macOS 13 or higher (including macOS 26)	x86_64, x86_64h, arm64

@tsteven4
Copy link
Copy Markdown
Collaborator Author

This suggests pre-haswell cpus were dropped with ventura, not monterey.
https://github.com/dortania/OpenCore-Install-Guide/blob/master/extras/ventura.md

@tsteven4
Copy link
Copy Markdown
Collaborator Author

It seems like Qt distributes macos binaries for x86_64 and arm64 and not x86_64h. From 6.10.0-0-202509051021qtbase-MacOS-MacOS_15-Clang-MacOS-MacOS_15-X86_64-ARM64.7z we see X86_64 ALL and ARM64 ALL.

otool -hv -arch all QtCore
QtCore (architecture x86_64):
Mach header
      magic  cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64   X86_64        ALL  0x00       DYLIB    29       4256   NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK NO_REEXPORTED_DYLIBS MH_HAS_TLV_DESCRIPTORS APP_EXTENSION_SAFE
QtCore (architecture arm64):
Mach header
      magic  cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64    ARM64        ALL  0x00       DYLIB    29       4416   NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK NO_REEXPORTED_DYLIBS MH_HAS_TLV_DESCRIPTORS APP_EXTENSION_SAFE

OTOH if we build for x86_64 and x86_64h we see that the cpusubtype distinguishes the two:

otool -hv -arch all gpsbabel
gpsbabel (architecture x86_64):
Mach header
      magic  cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64   X86_64        ALL  0x00     EXECUTE    27       2904   NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK PIE MH_HAS_TLV_DESCRIPTORS
gpsbabel (architecture x86_64h):
Mach header
      magic  cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64   X86_64    Haswell  0x00     EXECUTE    27       2904   NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK PIE MH_HAS_TLV_DESCRIPTORS

@GPSBabelDeveloper
Copy link
Copy Markdown
Collaborator

GPSBabelDeveloper commented Sep 17, 2025 via email

@tsteven4
Copy link
Copy Markdown
Collaborator Author

@robertlipe thanks for you comments.

Regarding the DEPLOY_TARGETS, I have been matching the minimum for the corresponding version of Qt. I don't see a benefit to a stricter requirement that what the Qt version we are using imposes.

I am cooling off on x86_64h given that the distributed Qt libraries aren't available for it. I think the action runs here shows we could build for x86_64h and link with x86_64 Qt libs, but I am not sure it's worth it.

We will have to pick versions of Qt for an upcoming release. I have been working on using the yet to be released 6.10.0 for Windows arm64 (WoA) builds (miurahr/aqtinstall#941, https://github.com/tsteven4/gpsbabel/tree/qt610test1). 6.10.0 is the first Qt release with QtWebEngine for WoA.
The window amd64 release is set to use 6.8.3.
The macos amd64 release is set to use 6.5.3, but I think we should move it up to 6.8.3 (macos min moves from 11.0 big sur to 12.0 monterey).
The snap builds use Qt from Ubuntu 24.04 (6.4.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants