Also on -funit-at-a-time...

David Daney ddaney at avtrex.com
Thu Oct 6 19:47:04 UTC 2005


Rob Landley wrote:
> To get the most out of recent gcc's, it's best to compile more than one c file 
> at a time:
> 
> http://gccsdk.riscos.info/mail-archive/gcc/2004/2797.html
> 
> More or less having gcc create the .a files straight from the .c files in one 
> gulp.  I've done this and even with gcc 3.3 it produces smaller resulting 
> binaries.

If there are any unused functions or data, you can win by using 
-ffunction-sections -fdata-sections -Wl,--gc-sections as well.  This 
allows the linker to eliminate any unreferenced code or data.  However 
you need very recent binutils to make it work.

David Daney.



More information about the busybox mailing list