code-yeongyu / code-yeongyu/c11-compiler-zig-omo
[Sisyphus] phase-3 / verify / Wave C — Cross-compile macOS↔Linux x86_64↔arm64
- Dominant language
- C
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Scope
Validate cross-compilation across all four host↔target cells using Zig's built-in cross-compilation capabilities.
## Deliverables
- `phase3/scripts/cross-compile.sh` — script exercising all 4 cells:
1. macOS x86_64 → Linux x86_64
2. macOS x86_64 → Linux ARM64
3. Linux x86_64 → macOS ARM64
4. Linux x86_64 → Linux ARM64
- Uses `zig targets` and `zig build` with `-Dtarget=...`.
- Executes cross-compiled binaries under `qemu-aarch64` or `qemu-x86_64` in Docker where the host arch differs.
## Success Criteria
1. All 4 cells compile `phase1/c11-ref/001..023.c` successfully.
2. Cross-compiled binaries execute under QEMU and produce identical stdout/exit-code to native gcc-built references.
3. Script runs end-to-end in CI without manual intervention.
## Dependencies
- Phase 2 Wave 7 (x86_64 codegen) and Wave 8 (ARM64 codegen) must be complete.
- Phase 2 Wave 10 (driver) must be complete.
## Suggested Role Assignment
`cross-compile-engineer`
## Test Corpus Expectations
- `001..023` compiled and executed for all 4 cells.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with phase3/scripts/cross-compile.sh and inspect the phase1/c11-ref/001..023.c corpus, then verify the available targets with `zig targets` and the stated `zig build -Dtarget=...` commands. Check how QEMU is used in Docker for differing host and target architectures. Done means all four cells compile and execute under the specified conditions with matching stdout and exit codes, including in CI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, docker, zig
- Domain
- build-system, ci-cd, compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100