GNU Mes replacement The goal of this project is to simplify stage0 of live-bootstrap, which involves implementing a replacement for the GNU Mes compiler by implementing a C-compiler in C that can compile the Tiny C Compiler version 0.9.26. The motivation for this project is given in the presentation Reviewing live-bootstrap. For blog article related to reviewing the live bootstrap project and this project see the section 'Live-bootstrap' on this page. Stage 1 The first stage of this project is to implement said C-compiler for i386. The source of the C-compiler is the file tcc_cc.c . This compiler produces intermediate code for a stack based language called Stack-C. The compiler also includes the file stdlib.c , that contains a minimal version of the C standard library. The intermediage code can be compiled with the program stack_c.c to M1 assembly or interpreted with the program stack_c_interpreter.c . This stage depends on a number of executables from stage0. Namely: hex2 M1 blood-elf catm match sha256sum These need to be present in the directory of the repository. Furthermore it requires the usual Linux commands and the GNU C compiler. A makefile is included to build and test the C-compiler tcc_cc . The sources of the Tiny C Compiler should be placed in a directory with the name tcc_sources that should also have sub directory lib . There should also be a directory mes with the contents of the GNU Mes compiler, which is needed to build the standard library that the Tiny C Compiler needs. To build and test the Tiny C Compiler, the test.sh shell script is provided. This script first compiles the Tiny C Compiler with GNU C-compiler, resulting in tcc_g and with tcc_cc compiler, resulting in tcc_s . Next is uses these to bootstrap the Tiny C Compiler from the sources. The script compares the results for the various steps using tcc_g and tcc_c . Remark: The test.sh script assumes that this repository is cloned in the git directory in the home directory. Please update the...
First seen: 2025-12-23 00:36
Last seen: 2025-12-23 12:40