Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Are you in some shortage of working compilers?

I am just interested in a small maintainable C compiler which can easily be adopted to bootstrap a new platform or cpu (on FPGA). I consider such a tiny C compiler just a convenient assembler to implement basic things on new platforms.

I know GCC and Clang/LLVM but those tool chains are really big, and I guess it requires a lot of work to support a new platform and to polish all things so that everything works properly.

A portable tiny GCC/LLVM replacement for small embedded systems would be really nice. GCC and Clang are great for powerful systems but I consider them overkill for small systems.



Do you know the "portable c compiler" PCC?

http://pcc.ludd.ltu.se/


Thanks! I will study it.


Fabrice Bellard's "tiny cc"[0] is a great sweet spot between "not even a portable assembler" like CC500 and C4, and GCC/LLVM:

It is a full-blown C compiler with enough extensions to compile the Linux kernel (and boot to it directly - look at the "tccboot" project). But it's also small enough and simple enough to retarget in a few days work (make that a few month if you want optimizations ... but you don't seem to).

[0] http://bellard.org/tinycc





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: