• by er4hn on 8/27/2024, 4:26:01 PM

    The big issue with bootstrappable builds is how to get started and have good examples. This is an ambitious goal, like landing on the moon, and takes a lot to get there. My understanding of this has been you need to (a) Be able to have a compiler that can be compiled from understandable code, which itself may require a set of increasingly complex compilers. I've heard this referred to before as a "compiler pilgrimage" but I can't find where I heard that term. (b) Then you need to be able to build the code with that compiler / dependencies. This is a pretty well solved problem these days assuming you can pin all your dependencies and transitive dependencies. (c) Then this all needs to be reproducible so that you can actually trust the output and that is a pretty hard problem today.

  • by mikewarot on 8/27/2024, 5:43:56 PM

    The story referenced as part of the motivation for the project[1] is pretty chilling. The laws of physics can put a lower limit on things for you if you have an old school analog oscilloscope handy to watch for network packets.

    If you have old school TTL, EPROMs, RAM, and time, you could built a CPU you can test all the parts of, and trust. You could even work your way up to floppy disks, and an analog CRT display.

    Once you want to ramp up the speed and complexity, things get dicey. I have ideas that would help, but nothing provably secure.

    [1] https://www.teamten.com/lawrence/writings/coding-machines/

  • by transpute on 8/27/2024, 6:23:21 PM

    > Current versions of GCC are written in C++, which means that a C++ compiler is needed to build it from source. GCC 4.7 was the last version of the collection that could be built with a plain C compiler, a much simpler task.

    Which C++ compiler was used to build GCC 4.8?

  • by andy_xor_andrew on 8/27/2024, 4:38:23 PM

    regarding the "security" aspect, I'm interested in what an attack vector would look like against a build system

    like, say you are building code, and all the below functions are compilers, and * denotes an evil compiler. Every link in the chain is a compiler building another compiler, until the last node which builds the code.

    A() -> B() -> Evil*() -> D() -> E(code) -> binary

    how in the world would the evil compiler in this situation inject something malicious into the final binary?

  • by mcosta on 8/28/2024, 7:18:05 AM

    Then the trust is in your silicon. Not only the CPU. The network card, hard drive, memory controller, PCI bus...