feat: build userspace programs with the x86_64-montauk toolchain
Switch all program and library Makefiles from host g++ (or the bare-metal x86_64-elf compiler) to x86_64-montauk-g++/gcc and drop the flags the target now owns: -nostdinc + kernel freestanding -isystem paths, -m64/-march, -fno-PIC, -mno-red-zone, -mcmodel=small, -static, -Wl,-m,elf_x86_64, -z max-page-size, --build-id=none. Deliberate policy flags stay (-ffreestanding, per-app SSE, -nostdlib + link.ld). Program builds now require the montauk toolchain and fail with a pointer to build-montauk-toolchain.sh; lib/ and libs/ keep the host fallback since the toolchain script bootstraps libc through it. Userspace is also now pinned to the cross GCC instead of drifting with the distro compiler. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
MAKEFLAGS += -rR
|
||||
.SUFFIXES:
|
||||
|
||||
TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-elf-
|
||||
TOOLCHAIN_PREFIX := $(shell cd ../../.. && pwd)/toolchain/local/bin/x86_64-montauk-
|
||||
ifneq ($(wildcard $(TOOLCHAIN_PREFIX)gcc),)
|
||||
CXX := $(TOOLCHAIN_PREFIX)g++
|
||||
LD := $(TOOLCHAIN_PREFIX)ld
|
||||
|
||||
Reference in New Issue
Block a user