Building and using a 29-year-old compiler on a modern system
miyuki.github.io
miyuki.github.io
A small example is that the test cases only work right if English, German, Finnish and French locales are available and if the system timezone is set to "America/Los_Angeles".
https://gcc.gnu.org/pub/gcc/old-releases/gcc-1/gcc-0.9.tar.b...
It's actually a little surprising just how much code is already there even in such an early pre-ISO-C version --- it feels like GCC was rather overengineered from the beginning.
GCC is still around and kicking and competes well with the much more modern Clang that has substantial investment from Apple and other industry giants. That's an amazing achievement for a 30-year-old open source project.
This industry is constantly reinventing. Clang takes a different tack in both licensing and implementation, and that’s great for everyone.
For the later: An important driver in clang are Apple and BSD communities who don't want to have GNU software (especially GPLv3) in their systems.
Also parts of gcc's architecture are created for political reasons to make it harder to decouple, while clang's primary design was to build a library which understands C/C++ and also can be used as a compiler.
The purely technical arguments (i.e. gcc has bad diagnostics and clang gives better errors) are minor (gcc, due to the competition, became way better, if equal time would have gone to gcc instead of clang it might be even better)
All that said: I really love this cooperative competition which benefits everybody, where you have different options try out ideas and where for large parts contributors discuss ideas between competing solutions.
This was a major, long standing gripe about GCC, and it materially affected its quality and usability. This was not an orthogonal matter: bad technical decisions were made in the interest of political goals.
> if equal time would have gone to gcc instead of clang it might be even better
I don't think so. GCC's position as the de facto choice for a free/open compiler, coupled with some of the political/organizational decisions of the project, made it easy for developers to say "it's good enough!" on such things. Viable competition is one of the few things that will shake a team out of that.
But using bits and pieces of your compiler is exactly what you'd want to be doing when you want to have good editor integration: eg syntax highlighting _should_ actually use the compiler instead of duplicating logic. Especially with a language that's Turing complete to even parse like C++; the logic just to figure out whether something is a type to be coloured eg blue or a variable name to be coloured eg green.
(See http://blog.reverberate.org/2013/08/parsing-c-is-literally-u...)
One of the key features of gcc was its portability across many architectures. Cygnus was one of the first companies to support free software. Among other things, they received income from companies who wanted gcc to run on new chipsets.
Another was that gcc was designed with multi-language support from the start. The original release only supported C, but C++ support can shortly afterwards. (Originally added by Tiemann, one of the founders of Cygnus.)
TCC is not designed with the same portability or multi-language support in mind.
gcc had the advantage of the same compiler everywhere.
Without gcc, you were using your Unix vendor's in-house compiler, which was usually a half-assed PCC port that was declared "done" as soon as AT&T's sources compiled.
gcc was both higher quality and had the same frontend quirks regardless of the platform. Particularly before 1989, the standard was "Work like K&R's compiler" rather than anything formal, so there were a lot of nooks and crannies where each compiler did its own thing.
I remember when we updated our Fortran compilers (because of other tooling) and they had problems with our 80s/early 90s code. That was joy to debug.
Example cool article: https://virtuallyfun.com/2015/10/09/building-linux-0-11-on-w...
In addition I've built and did some minor tyre kicking with GCC 0.9
https://virtuallyfun.com/2016/12/01/building-using-gcc-0-90-...
I've done minor shuffling to get DooM to compile with GCC 1.39 on MS-DOS/x68000 & OS/2
https://virtuallyfun.com/2017/07/29/null-doom-gcc-1-39-go32-...
GCC 1.37 on MacOS
https://virtuallyfun.com/2016/05/24/gcc-1-37-on-macos/
And of course using RSXNT / EMX to get GCC 1.40 targeting Windows NT