feat: port gcc to MontaukOS

This commit is contained in:
2026-07-17 15:47:45 +02:00
parent 324b18edda
commit 8e6b619b02
14 changed files with 493 additions and 19 deletions
+14
View File
@@ -64,6 +64,20 @@ toolchain/
## Native binutils (runs on MontaukOS)
The whole native SDK (binutils + GCC below, staged for the OS image) is
built by one idempotent script — this is what a fresh clone should run:
```bash
make sdk # from the repo root; wraps toolchain/build-native-sdk.sh
```
It invokes build-montauk-toolchain.sh first (cross compiler + sysroot),
applies the host-build fix-ups listed under "Host-build gotchas", and
strips the staged binaries. To force a rebuild after libc changes:
`rm -rf toolchain/native toolchain/native-gcc toolchain/build/binutils-native
toolchain/build/gcc-native` and re-run. The manual steps below are kept
as a reference for what the script does.
Binutils can be cross-compiled to run *on* MontaukOS itself
(`--host=x86_64-montauk`), the first step toward a self-hosted GCC: