5 ms·
If you like a hobby C compiler, check nwcc(Nils Weller's C Compiler) too. http://nwcc.sourceforge.net/ http://nwcc.sourceforge.net/ nwcc is a bit more mature.
by sanxiyn 12y ago
If you like a hobby C compiler, check nwcc(Nils Weller's C Compiler) too.
http://nwcc.sourceforge.net/ http://nwcc.sourceforge.net/
nwcc is a bit more mature. It supports multiple architectures, multiple OSes, and it can bootstrap GCC.
- fit2rule 12y agoDoesn't build out of the box for me on Darwin 14.1.0, gcc-4.9. Does it need clang? configure script doesn't let you use anything but gcc ..
- andrewchambers 12y agoIt says specificially in the readme is only supports linux currently. Also, CC=clang works fine on ubuntu. I have tested on both Ubuntu and arch linux.
- justincormack 12y agopcc[1] is in a pretty good state, it can compile most of NetBSD, and is under active development. [1] http://pcc.ludd.ltu.se/ http://pcc.ludd.ltu.se/
- swah 12y agoThere is also http://bellard.org/tcc/ http://bellard.org/tcc/
- ackalker 12y ago...which can compile a(n older, preprocessed, but none the less) Linux kernel "on the fly", while booting: http://bellard.org/tcc/tccboot.html http://bellard.org/tcc/tccboot.html
- swah 12y agoAnd Rob Landley wants to plug his fork of tcc into qemu code generator http://www.landley.net/qcc/ http://www.landley.net/qcc/ to do something that I do not completely understand but sounds awesome!
- andrewchambers 12y agoThe source code for tcc is terrible compared to 8cc. I don't find its code readable at all. Fabrice Bellards brain is incredible at getting functionality in a small amounts of code, but the code is not great for teaching.
- sitkack 12y agoSee http://people.cs.uchicago.edu/~varmaa/mini_c/ http://people.cs.uchicago.edu/~varmaa/mini_c/ for a toy C compiler written in Python.