What "from scratch" actually means.
A source distro that seeds its compiler is a lie wearing a costume. Keru's stage 0 builds the toolchain from nothing — the assembler, the compiler, the C library, then a self-hosted toolchain package — before a single package in your system tree is compiled.
| Step | What runs | Why first |
|---|---|---|
| 1 | binutils | as, ld, ar — you can't compile without an assembler and linker. |
| 2 | a bare gcc | The C compiler, built against nothing but binutils. |
| 3 | your libc | glibc, musl, or uclibc-ng. Everything userspace depends on it. |
| 4 | a full gcc | Re-built now that the target libc exists (self-hosting). |
| 5 | toolchain package | Freezes the whole toolchain as a kama package for the rest of the build. |
[ keru ] stage 0: bootstrap toolchain [ keru ] binutils 2.42 ... ok [ keru ] gcc 13.2 (bare) ... ok [ keru ] glibc 2.39 ... ok [ keru ] gcc 13.2 (self) ... ok [ keru ] toolchain → ROOT ... ok [ keru ] stage 1: base system
--host/--target and CC/CFLAGS so nothing sneaks in.