v1.0 completion
The original self-hosting ladder has shipped: Makar builds its kernel with
TCC on the host and from inside the running OS. The remaining v1.0 compiler
milestone is narrower: make the shipped /apps/tcc.elf rebuild itself
reliably during the in-kernel regression run.
Current blocker
src/userspace/libc-tcc.sh leaves the TCC self-rebuild command disabled.
The compile is slow, and after it exits the in-kernel script interpreter
stops processing later script lines in the same boot. The current suspicion
is stale file-descriptor or wait4 state after the large compiler process
exits.
Manual reproduction:
tcc -DONE_SOURCE=1 -DCONFIG_TCC_STATIC \
-DCONFIG_TCCDIR="/usr/lib/tcc" \
-DCONFIG_TCC_SYSINCLUDEPATHS="/usr/include:/usr/lib/tcc/include" \
-I/src/tinycc -I/src/tinycc/build-stubs -I/src/userspace \
/src/tinycc/tcc.c -o /tmp/tcc-rebuilt.elf
Work plan
- Reproduce the post-TCC script stall with a minimal script that runs the compiler and then prints a marker.
- Inspect the parent shell task’s FD table and
wait4return path before and after the compiler exits. - Fix the lifecycle bug, then enable the self-rebuild command in
src/userspace/libc-tcc.sh. - Run the rebuilt
/tmp/tcc-rebuilt.elfagainst a small source file to prove the output compiler works. - Keep the full matrix under
./run.sh iso test; do not restore the retired host-driven rebuild scenarios — the in-guest script drivers replace them.
Release gate
Before bumping to v1.0:
./run.sh iso test
The deterministic boot-time matrix must emit LIBC-TCC: ALL PASS, including
the enabled TCC self-rebuild case.