alright im getting started on my C compiler project today.
i'm planning to write that in C itself, does anyone have a recommendation on what compiler/C version I should use to have a sane bootstrap?
0 Boosts
0 Likes
@ArneBab honestly i really want to use GCC because that means i get to use all the c23 goodies.
but i dunno if using c23 would be "cheating" in terms of learning and stuff
@valorzard c99 or so is probably the easiest for a direct bootstrapping (so not going through another c compiler that is also in c or c++)
@navi aw man i wanted to use c11 (or, god forbid, c32) lol.
ah well, c99 seems like the baseline these days
@valorzard it should be fine, imo; cproc and qbe are c99 and implement c17 and a lot of c23; gcc itself isn't that hard to bootstrap
stick to c99 if you want to avoid needing another step on top of the "barebones c compiler written in asm"
stick to c99 if you want to avoid needing another step on top of the "barebones c compiler written in asm"
@navi @valorzard Yeah, plus tcc seems to have okay support for c11/c17, and that's typically the compiler used once the bootstrap steps are at least at the first stages of a posix environment.
@valorzard for bootstrapping you could set up a mesCC → tinyCC → gcc4.7 → gcc pipeline:
https://www.gnu.org/software/mes/
(means: just use gcc on guix – or tinyCC for compatibility?)