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

  1. Reproduce the post-TCC script stall with a minimal script that runs the compiler and then prints a marker.
  2. Inspect the parent shell task’s FD table and wait4 return path before and after the compiler exits.
  3. Fix the lifecycle bug, then enable the self-rebuild command in src/userspace/libc-tcc.sh.
  4. Run the rebuilt /tmp/tcc-rebuilt.elf against a small source file to prove the output compiler works.
  5. Keep the full matrix under ./run.sh iso test; do not restore the retired HMP-driven rebuild scenarios.

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.