[Bug 8471] find+sort regression (no output after sort)
bugzilla at busybox.net
bugzilla at busybox.net
Wed Mar 16 20:01:03 UTC 2016
https://bugs.busybox.net/show_bug.cgi?id=8471
--- Comment #7 from Denys Vlasenko <vda.linux at googlemail.com> ---
Reproduced in qemu.
This looks like a reappearance of an old glibc bug where stdout wasn't flushed
on exit, because glibc uses some linker magic to achieve that and --gc-sections
was breaking it. The symptom was that "CMD" which outputs a lew lines of text
was working, but "CMD | cat" was printing nothing.
scripts/trylink has a workaround:
# Static linking against glibc produces buggy executables
# (glibc does not cope well with ld --gc-sections).
# See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
# Note that glibc is unsuitable for static linking anyway.
# We are removing -Wl,--gc-sections from link command line.
GC_SECTIONS="-Wl,--gc-sections"
if (. ./.config && test x"$CONFIG_STATIC" = x"y") then
if check_libc_is_glibc; then
echo "Static linking against glibc, can't use --gc-sections"
GC_SECTIONS=""
fi
fi
(1) Do you see the "Static linking against glibc, can't use --gc-sections"
message when you build the buggy executable?
(2) If you switch CONFIG_STATIC=y to off, change nothing else, and rebuild
bbox, does resulting binary still show the bug?
If both answers are "yes", then glibc is now broken wrt static linking in a
different way than before...
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list