Skip to content

Commit c517fea

Browse files
gijzelaerrclaude
andcommitted
Add x86_64 cross-compile makefile for ARM64 runners
The macos-14 runner is ARM64, so we need cross-compile flags to build x86_64 binaries for the universal binary. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 29a23b6 commit c517fea

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
TargetCPU :=x86_64
2+
OS :=osx
3+
CXXFLAGS := -O3 -fPIC -pedantic -target x86_64-apple-darwin
4+
5+
# Standard part
6+
7+
include common.mk
8+
9+
# Override the variable to add a target flag
10+
SharedObjectLinkerName :=g++ -shared -fPIC --target=x86_64-apple-darwin

.github/workflows/osx-build-test-amd64.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- name: Prepare files
2121
run: |
2222
cp .github/build_scripts/arm64_osx.mk snap7-full-1.4.2/build/osx/
23+
cp .github/build_scripts/x86_64_osx.mk snap7-full-1.4.2/build/osx/
2324
pushd snap7-full-1.4.2/build/osx/
2425
make -f x86_64_osx.mk all
2526
make -f arm64_osx.mk all

0 commit comments

Comments
 (0)