fix: enable arm64 macOS cross-compilation on Intel runners #49

Merged
gronod merged 1 commits from fix/macos-arm64-cross-compile into development 2026-09-05 19:52:53 +01:00
Owner

Summary

Fixes macOS release build failure in the universal binary job where the arm64 build was producing x86_64 binaries on Intel macOS runners.

Changes

  • Jambase: Added architecture detection for macOS (OS = MACOSX) mapping arm64 and x86_64 to -arch arm64 and -arch x86_64 compiler and linker flags.
  • tiff/Jamfile & imdi/Jamfile: Conditionalized code-generator utilities (mkg3states and imdi_make) so Jam skips them when outputs (tif_fax3sm.c, imdi_k.h, imdi_k.c) already exist.
  • .gitea/workflows/build-macos.yml:
    • Pre-generates code-generator outputs with host compiler before cross-compilation.
    • Verifies all binaries in bin/ match the expected target architecture in smoke tests.
    • Verifies all output binaries are fat universal binaries before packaging.
### Summary Fixes macOS release build failure in the `universal` binary job where the `arm64` build was producing `x86_64` binaries on Intel macOS runners. ### Changes - **Jambase**: Added architecture detection for macOS (`OS = MACOSX`) mapping `arm64` and `x86_64` to `-arch arm64` and `-arch x86_64` compiler and linker flags. - **tiff/Jamfile & imdi/Jamfile**: Conditionalized code-generator utilities (`mkg3states` and `imdi_make`) so Jam skips them when outputs (`tif_fax3sm.c`, `imdi_k.h`, `imdi_k.c`) already exist. - **.gitea/workflows/build-macos.yml**: - Pre-generates code-generator outputs with host compiler before cross-compilation. - Verifies all binaries in `bin/` match the expected target architecture in smoke tests. - Verifies all output binaries are fat universal binaries before packaging.
gronod added 1 commit 2026-09-05 19:52:42 +01:00
- Add -arch arm64 / -arch x86_64 compiler and linker flags to Jambase for macOS
- Pre-generate mkg3states and imdi_make outputs using host compiler before cross-compilation
- Conditionalize code-generator execution in tiff/Jamfile and imdi/Jamfile when outputs exist
- Add architecture verification in workflow smoke tests and universal packaging steps
gronod merged commit 0005cc61bf into development 2026-09-05 19:52:53 +01:00
Sign in to join this conversation.