Posted by
timothy
on from the count-to-ten-very-slowly dept.
An anonymous reader writes "TCCBOOT is the first boot loader able to compile and boot a Linux kernel directly from its source code. It can compile and start booting a typical Linux kernel in less than 15 seconds on a 2.4 GHz Pentium 4. TCCBOOT uses the latest version of the TinyCC C compiler."
TCC is an incredibly tiny compiler with practically no dependencies on the environment. It's based on a cleaned up entry to the obfuscated C contest. So you can safely assume it's using every dirty trick in the book and then some. It still sounds incredible though.
Re:TCC compiler
by
TheRaven64
·
· Score: 5, Informative
TCC has a few significant drawbacks.
It is not portable (well, technically it is portable, but currently only has an i386 back end).
It only supports C (not a drawback if you are just compiling C, but a lot of projects use C++/Objective-C/Whatever).
It produces fairly sub-optimal code. The register allocation done by TCC is not very clever, and it performs no serious optimisation steps.
On the other hand, TCC has two huge advantages:
It is not GCC. Compiling your code using two or more compilers and ideally for 2 or more CPU architectures is a good way of finding some more obscure bugs.
It is very fast. The less time you spend compiling, the more time you can spend testing / debugging.
Actually the TinyCC site lists a speedchart at http://fabrice.bellard.free.fr/tcc/#speed measurements are done on a 500 MHz K6. That should give you a better idea than just estimating based on Turbo C 2.0
The README says it needs some of the binaries and headers on the linux kernel, so you have to pre-compile these first.
I guess this could have some limited use somewhere, perhaps, but I can't really see how if you need some precompiled stuff.
- It's not the Macs I hate. It's Digg users. -
TCC is an incredibly tiny compiler with practically no dependencies on the environment. It's based on a cleaned up entry to the obfuscated C contest. So you can safely assume it's using every dirty trick in the book and then some. It still sounds incredible though.
- It is not portable (well, technically it is portable, but currently only has an i386 back end).
- It only supports C (not a drawback if you are just compiling C, but a lot of projects use C++/Objective-C/Whatever).
- It produces fairly sub-optimal code. The register allocation done by TCC is not very clever, and it performs no serious optimisation steps.
On the other hand, TCC has two huge advantages:I am TheRaven on Soylent News
Actually the TinyCC site lists a speedchart at http://fabrice.bellard.free.fr/tcc/#speed measurements are done on a 500 MHz K6. That should give you a better idea than just estimating based on Turbo C 2.0