#20641 made building of the qt package in depends more structured, and, particularly, fixed cross-compiling detection on Intel-based macOS (x86_64).
However, a similar issue still present on M1-based macOS (arm64):
% make -C depends qt_configured
...
Configure summary:
Building on: macx-clang (x86_64, CPU features: cx16 mmx sse sse2 sse3 ssse3 sse4.1)
Building for: macx-clang (arm64, CPU features: neon crc32)
Target compiler: clang (Apple) 12.0.5
Configuration: cross_compile largefile neon precompile_header silent release c++11 c++14 c++1z reduce_exports static stl
...
Note an unexpected cross_compile.
% make -C depends qt_configured HOST=x86_64-apple-darwin18
...
Configure summary:
Build type: macx-clang (x86_64, CPU features: cx16 mmx sse sse2 sse3 ssse3 sse4.1)
Compiler: clang (Apple) 12.0.5
Configuration: sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl f16c largefile precompile_header rdrnd shani silent x86SimdAlways release c++11 c++14 c++1z reduce_exports static stl
...
Note that the build system failed to detect cross compiling.
In both cases building the configured qt package fails without installed Rosetta 2 (see #22402).
This PR:
- fixes both cases above
- makes #22402 no longer required, and reverts it
- does not change the build system behavior on Intel-based macOS (x86_64)
- does not touch the code for cross-compiling on Linux builder, see a dedicated #21851
With this PR:
% make -j 9 -C depends qt_configured
...
Configure summary:
Build type: macx-clang (arm64, CPU features: neon crc32)
Compiler: clang (Apple) 12.0.5
Configuration: largefile neon precompile_header silent release c++11 c++14 c++1z reduce_exports static stl
...
% make -j 9 -C depends qt_configured HOST=x86_64-apple-darwin18
...
Configure summary:
Building on: macx-clang (arm64, CPU features: neon crc32)
Building for: macx-clang (x86_64, CPU features: cx16 mmx sse sse2 sse3 ssse3 sse4.1)
Target compiler: clang (Apple) 12.0.5
Configuration: cross_compile sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl f16c largefile precompile_header rdrnd shani silent x86SimdAlways release c++11 c++14 c++1z reduce_exports static stl
...
This PR is based on #22506.