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?
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. :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.