feat: ship native dev tools and target sysroot at 0:/usr
The devkit target in programs/GNUmakefile stages the native binutils (as, ld, ar, nm, objcopy, objdump, readelf, ranlib, strip, size, strings, addr2line, c++filt, elfedit as *.elf) into the image at 0:/usr/bin, plus a target-side sysroot: libc headers, montauk/ and Api/ SDK headers and the freestanding C++ set at 0:/usr/include, and libc.a + crt1/crti/crtn objects (with empty libm/libstdc++ stand-ins) at 0:/usr/lib. ld's ldscripts ship under 0:/usr/x86_64-montauk. The /usr prefix matches the binutils configure prefix, and the kernel already resolves driveless absolute paths against the cwd drive, so compiled-in /usr/lib search paths work natively on drive 0. The shell resolves commands from 0:/usr/bin (after 0:/os) and tab completion lists it. When toolchain/native/ has not been built, the devkit step skips cleanly and the image builds as before. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
+8
-3
@@ -91,6 +91,11 @@ Notes:
|
||||
the tools themselves never spawn, and real process plumbing is the
|
||||
posix_spawn milestone that needs kernel support (exit codes in
|
||||
SYS_WAITPID, fd redirection wiring).
|
||||
- The staged tree in toolchain/native/ is not yet integrated into the
|
||||
OS image; that needs a target-side sysroot layout decision (where
|
||||
headers, libc.a and crt objects live on 0:/).
|
||||
- The `devkit` target in programs/GNUmakefile ships the staged tools
|
||||
into the OS image at 0:/usr/bin (as.elf, ld.elf, ar.elf, ...) with a
|
||||
target-side sysroot at 0:/usr/include + 0:/usr/lib (libc.a, crt
|
||||
objects, empty libm/libstdc++). The kernel resolves driveless
|
||||
absolute paths ("/usr/lib") against the cwd drive, so the binutils
|
||||
--prefix=/usr layout works natively. The shell searches 0:/usr/bin
|
||||
and tab-completes it. If toolchain/native/ has not been built the
|
||||
devkit step is skipped and the image builds without it.
|
||||
|
||||
Reference in New Issue
Block a user