Reputation: 528
I am making an embedded linux system and for the hell of it trying to fit my secondary boot loader (AT91), U-Boot, the linux Kernel, and the rootfs onto an 8 MB data flash chip. Busybox takes up roughly 2 MB though I can probably get it down to roughly 1 MB, and U-Boot takes roughly 512 KB and that too I bet I can get smaller.
Can I decrease the size of these larger compilers by cross compiling on my desktop and take out code like things meant for optimization passes and building code for handling all architectures except armv5te? Or am I stuck with the 50+ MB binaries for gcc? If there is no hope of getting it in under 6 MB, what's the smallest I can get?
Upvotes: 0
Views: 1427
Reputation: 62106
Check out Smaller C. It's comparable to TCC, though supports less of the language. We run it on RetroBSD in 96KB of RAM.
Upvotes: 1
Reputation:
You may want to take a look at some alternative compilers; gcc isn't known for being small. In particular, you may be interested in TCC, the Tiny C Compiler. :)
Upvotes: 1