4 ms·
If you really want to blow your mind you can go all the way back to stage0[0]. A more practical depth would be to bootstrap with GNU Mes, which is a source bas
by spudlyo 5y ago
If you really want to blow your mind you can go all the way back to stage0[0].
A more practical depth would be to bootstrap with GNU Mes, which is a source based bootstrapping path, that begins with a tiny scheme interpreter (~5000 LOC of simple C) and a C compiler written in scheme that are mutually self-hosting.
These tools can compile a slightly patched version of TinyCC that is self-hosting. Using this C compiler you can bootstrap a bunch of gnutools (glibc, binutils, gcc) and using these tools you can bootstrap a full Guix Linux distro.
[0]: https://github.com/oriansj/stage0 https://github.com/oriansj/stage0
- not2b 5y agoThe bootstrapping process that GCC uses is as follows: stage 1: build from source using your existing compiler stage 2: build again from source using the compiler you just built stage 3: (just for checking): build a stage 3 compiler from the stage 2 compiler. Verify that it is byte-for-byte identical. extra stages for the paranoid: repeat the process with a different starting compiler, as unrelated as possible. Again, verify that the output is bit-for-bit identical. You then know either that you're good, that the compiler reflects the source, or both starting compilers have the same devious hidden hack, perhaps courtesy of Ken Thompson himself. GNU Mes achieves that paranoid step: once you verify with GNU Mes that you get the same bits, you don't really have to do this ever again, because you can certify that the compiler you get is reproducible from source and has no tricks.