13 ms·
This was here just 3 days ago: https://news.ycombinator.com/item?id=8558822 https://news.ycombinator.com/item?id=8558822 ; Now, YOU just need to write those as
by beagle3 12y ago
This was here just 3 days ago: https://news.ycombinator.com/item?id=8558822 https://news.ycombinator.com/item?id=8558822 ; Now, YOU just need to write those assumbler macros. But why? Are you in some shortage of working compilers?
- progman 12y ago> 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.
- qznc 12y agoDo you know the "portable c compiler" PCC? http://pcc.ludd.ltu.se/ http://pcc.ludd.ltu.se/
- progman 12y agoThanks! I will study it.
- MatzeBraun 12y agoMaybe cparser: https://github.com/MatzeB/cparser https://github.com/MatzeB/cparser
- beagle3 12y agoFabrice 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 http://bellard.org/tinycc