This project is a continuation of the hex2asm bootstrapping project. In that project, we developed a working an x86 assembler and linker from as small a binary seed as possible. Here, we use the assembler and linker produced in that project to build up to a C89 complient C compiler.
This programs produced in this project are 32-bit ELF executables for a Linux kernel running on an Intel x86 processor. They run fine on modern 64-bit systems.
We start by building a startup file (crt0.o) and a simple C library, all written in assembly.
The project's first compiler is added at this stage. Its input language is a typeless subset of C similar to B, and it emits assembly language.
The B compiler is used to replace and add to certain functions in our libc.
The compiler is rewritten in its source language, and a type system added.
We use the C compiler to implement a fairly standards-compliant C preprocessor, and a compiler driver that spawns the cpp, ccx (the compiler proper), as and ld.
The code in this project is copyright (C) Richard Smith, 2009-2020, and is licensed for use under version 3 or later of the GNU General Public License, a copy of which can be found in the file LICENCE.txt. The documentation in these README.txt files is licensed under the Creative Commons BY-NC-SA licence, version 4.