feat: x86_64-montauk userspace cross toolchain

Add build-montauk-toolchain.sh: builds an OS-aware cross GCC/binutils
(same versions and prefix as the bare-metal x86_64-elf toolchain) whose
x86_64-montauk target links static ET_EXEC binaries against the Montauk
libc sysroot with no special flags: 4 KiB max page size for the kernel
ELF loader, -mno-red-zone by default, crt1/crti/crtn + -lc from the
sysroot, __montauk__ defined. Target patches are checked into
toolchain/patches/, the GCC target header into toolchain/files/.

sys/types.h now includes <stdint.h> so hosted code (libgcov and
friends) sees intptr_t via the stdio include chain.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
2026-07-14 10:19:35 +02:00
co-authored by Claude Fable 5
parent 182520a585
commit 778f897f1a
7 changed files with 404 additions and 0 deletions
+1
View File
@@ -7,6 +7,7 @@ qemu.log
toolchain/local/
toolchain/build/
toolchain/src/
toolchain/sysroot/
programs/bin/
programs/obj/
programs/src/*/obj/