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.
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
wait4 return path before
and after the compiler exits.src/userspace/libc-tcc.sh./tmp/tcc-rebuilt.elf against a small source file to
prove the output compiler works../run.sh iso test; do not restore the retired
HMP-driven rebuild scenarios.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.