On Thu, Sep 27, 2012 at 10:19:04AM +0200, Florian Fainelli wrote: > 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 <n...@openwrt.org> > > > > > > Signed-off-by: Felix Fietkau <n...@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?
No. If you use shared libgcc, you'll need a >100k .so file lying around, and each instance of busybox will use an extra 4k of unsharable memory for libgcc_s.so's GOT. If you static link libgcc, which is what should always be done, you'll only add a few hundred bytes to the busybox binary for 64-bit division and such (and maybe nothing at all if you're on a 64-bit arch where libgcc is mostly useless). Rich _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox