http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60348

--- Comment #12 from Nach <nachms+gcc at gmail dot com> ---
Isn't the whole point of -static-libstdc++ is to remove the dependency of
libstdc++ from the binary? Even without the option, it does indeed work fine on
the system it was compiled on. However, -static-libstdc++ currently does not
appear to be doing its job, and I would NOT define it as *working*.

For nearly 8 years I've been able to provide ready made binaries for
practically any system (as long as glibc wasn't ancient). Now after a recent
upgrade of build utilities, I can't seem to provide binaries for anyone who
isn't using a distro from the past year or so. Even though these are large
projects and make use of many statically linked binaries, the culprit as
reported is missing libstdc++ symbols which in theory should not be happening
if -static-libstdc++ is used, and the two aforementioned symbols are the only
libstdc++ I see listed in the binary. Using older build utilities, I've never
seen any libstdc++ symbols appear in a binary when -static-libstdc++ was used.

Adding -fuse-ld=gold appears to be a *workaround* which works for the sample
test case I used above. But if I try using -fuse-ld=gold with more complicated
projects, the binary never even ends up linking, with a whole spew of missing
symbols, which I know for a fact are contained in libraries which are being
specified.

If this in fact a bug with binutils and not libstdc++ or GCC, then fine, I
don't mind reporting it elsewhere, just please assist me in understanding the
issue so I can effectively do so.

Reply via email to