It's kind of fun thinking of "bootstrapping" a trusted compiler from some old sources. Like some sort of master handing down their tools to the apprentice.
"Now, I bestow upon you my most trusted C compiler...artisanally compiled from ancient scrolls using only an 8088 chip"
The oldest thing I have is also the first C compiler I ever used, the ECO-C88 on 5.25" floppy.
p.s. Also I just looked up that Ken Thompson paper, and it credits "[4] Unknown Air Force Document" for the idea (!!)
@meejah Have you looked at @janneke's work?
https://gitlab.com/janneke/mes
(This is being integrated into GNU Guix)
@vu3rdd Hmm, I think maybe I have (or something like it). Great stuff! I didn't know Guix was using it, cool.
@meejah I'm pretty sure YACC is an assembly-only compiler that's very easy to manually audit and is used to build a copy of GCC that's then used to build a GCC-built GCC, eliminating the Thompson issue.
@meejah Also, this: http://bootstrappable.org/projects.html
(The one I am interested the most is this one, which unfortunately is going to be hard - https://elephly.net/posts/2017-01-09-bootstrapping-haskell-part-1.html)
@vu3rdd Oooo, dang, bootstrap a Haskell compiler. That's the bonus question after the "C compiler" part, right? ;)
@meejah :-) GHC is written in GHC itself. Early GHC was written in LazyML, I think. Some sources of LazyML are available, but I don't know if a version of GHC that can compile with LazyML is available. I haven't been able to dig out very old versions of GHC. Most of the ftp sites are dead. Internet Archive does not have anything from them.. so it is a dead end there.
@meejah A better technical answer is here on the GHC situation: https://www.joachim-breitner.de/blog/748-Thoughts_on_bootstrapping_GHC
"Fun" in the sense that I'd probably rather try to build a really old GCC than determine why "some unit test" is overwriting a global in #Python's tempdir so that it's unicode not "str" and then everything is sad. Because there's still Python2 code.