reduce the size of busybox

Bernhard Fischer rep.nop at aon.at
Tue Jun 13 08:36:20 PDT 2006


On Tue, Jun 13, 2006 at 08:06:34AM -0700, Dan Nicolaescu wrote:
>Bernhard Fischer <rep.nop at aon.at> writes:
>
>  > On Mon, Jun 12, 2006 at 10:17:11AM -0400, Rob Landley wrote:
>  > >Hey everybody!
>  > >
>  > >On Saturday 10 June 2006 3:02 am, Dan Nicolaescu wrote:
>  > >> Hi!
>  > >>
>  > >> The size of busybox can be reduced a lot by using a new compilation
>  > >> flag in gcc-4.1
>  > >>
>  > >> I did a make menuconfig (on a x86 Fedora Core 5 machine) and turned on
>  > >> these options:
>  > >>
>  > >>        [*] Build BusyBox as a static binary (no shared libs)
>  > >>        [*] Compile all sources at once
>  > >>
>  > >> The adding "-fwhole-program --combine" to the do_link command for the
>  > >> "busybox_unstripped" rule in Makefile.
>  > 
>  > You shouldn't need to specify these two flags manually, i'm doing this
>  > for you if your compiler supports it.
>
>It does not seem to work right then, the compiler supports these
>options, but they don't seem to be used by default i.e. adding them
>the way I said does make a difference.

What version are you using?
trunk does that properly, IIRC i disabled it for the 1.1.x stable branch
since it doesn't work right in all situations and the feature was quite
new back then. I didn't want to introduce possibly hazardous stuff
during a stable minor update. For the bug, see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25795

Let me note that the stable release has these flags in Rules.mak,
commented out with the gcc bug URL above them.

PS: .. and thanks for the other info.
PPS: If you see you passing these flags manually changes _anything_ with
trunk then please holler; for me, they don't since they are already
passed properly.


More information about the busybox mailing list