Small patch to "clear" to add flush

Denys Vlasenko vda.linux at googlemail.com
Thu Dec 27 03:48:53 UTC 2007


On Thursday 27 December 2007 02:43, JoSH Lehan wrote:
> On Dec 26, 2007 1:21 PM, Denys Vlasenko <vda.linux at googlemail.com> wrote:
> > This is not a bug in busybox. You cannot even build busybox statically
> > against glibc without getting a warning. Did you *read* a warning?
> > Hint: it says what you need to do...
>
> Thanks.  I saw the warning (had to comment it out in order to build).
> Unfortunately, my situation requires both glibc and static, so using
> uClibc or dynamic is not an option.
> So, I thought this patch might come in handy for others facing a
> similar problem.

Too bad #warning directives cannot print big blinking
***SHOUTING LETTERS***.

#warning Static linking against glibc produces buggy executables
#warning (glibc does not cope well with ld --gc-sections).
#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
#warning Note that glibc is unsuitable for static linking anyway.
#warning If you still want to do it, remove -Wl,--gc-sections
#warning from scripts/trylink and remove this warning.
#error Aborting compilation.
#endif

IT SAYS "REMOVE -Wl,--gc-sections FROM scripts/trylink" STUPID!

try $CC $LDFLAGS \
        -o $EXE \
        -Wl,--sort-common \
        $SORT_SECTION \
===>    -Wl,--gc-sections \        <======================= HERE!
        -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
        $l_list \

How can I make it MORE OBVIOUS to you?

[I'd be glad to make it happen automatically, but so far I didn't
 find a way to figure out that we are building against glibc]
--
vda



More information about the busybox mailing list