[PATCH 05/19] buildsystem: remove the -static-libgcc flag, saves a few Kb
Florian Fainelli
florian at alphacore.org
Thu Sep 27 08:19:04 UTC 2012
On Tuesday 25 September 2012 18:42:05 Rich Felker wrote:
> On Tue, Sep 25, 2012 at 02:06:04PM +0200, Florian Fainelli wrote:
> > From: Felix Fietkau <nbd at openwrt.org>
> >
> > Signed-off-by: Felix Fietkau <nbd at openwrt.org>
> > ---
> > Makefile.flags | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Makefile.flags b/Makefile.flags
> > index e77c0e5..f129cef 100644
> > --- a/Makefile.flags
> > +++ b/Makefile.flags
> > @@ -51,7 +51,7 @@ CFLAGS += $(call cc-option,-fno-builtin-strlen -finline-
limit=0 -fomit-frame-poi
> > # -fno-guess-branch-probability: prohibit pseudo-random guessing
> > # of branch probabilities (hopefully makes bloatcheck more stable):
> > CFLAGS += $(call cc-option,-fno-guess-branch-probability,)
> > -CFLAGS += $(call cc-option,-funsigned-char -static-libgcc,)
> > +CFLAGS += $(call cc-option,-funsigned-char,)
>
> On most systems this flag should be a no-op, but when it's not, you
> definitely want it. Using shared libgcc might save a tiny amount of
> space in the binary, but it will add 4-8k of memory usage to each
> instance of busybox at runtime. This is not a reasonable tradeoff.
Ok, so maybe we should make this available via some configuration knob? For
sure, we'd like to save the space involved by using a statically linked libgcc
to busybox. What do you think?
--
Florian
More information about the busybox
mailing list