The various discussions about what compilers fit inside small computers got me wondering about just how minimal the earliest releases of GCC were. Someone kindly posted to GitHub Stallman’s 1987 initial 0.9 version, which could successfully compile itself and target the VAX and the 68000, but undoubtedly had bugs. (GitHub - huangguiyang/gcc-0.9: The first available release, on March 22, 1987.)
Has anyone looked at this in detail? Are any slightly better “pre-bloat” versions floating around? Do these early versions even compile in a modern C? (I remember trying to resurrect a pre-ANSI C computer music program, and it involved a maddening “whack-a-mole” process.)
I think your best bet would be to get BSD or SunOS running on an emulator, and get GCC 0.9 working there first. Of those two, BSD on a VAX is the easier option.
I have done something similar with early Emacs versions. I got Gosling Emacs, GNU Emacs 13.8, and 16.56 running on BSD quite easily. I also tried to port the latter to Linux, and that was difficult.
gcc has never been small. Up to gcc 3 or so was usable on 68K systems with plenty of RAM. PCC was (and is) a lot tighter.
A friend of mine successfully ported gcc 1.30 to the 68000 based Atari ST, and it was quite usable. (Hmm… Maybe I misunderstood the “never been small” comment.)
Besides the ability to operate within a small memory footprint, I’m partly interested in the size of the code base for teachability purposes. It is a lot easier to study non-bloated software.
PCC ran in 128K or so, I don’t think gcc has ever been under a Mbyte ?
Yeah, maybe I’m barking up the wrong tree. There are a few C subset compilers for study purposes. One is Fabrice Bellard’s Tiny C Compiler.
Interesting to note that in 1987 there was DRAM shortage, and many Suns shipped with only 1MB of RAM. Of course there was virtual memory back then, but still…