c++/4511: Link option -shared-libgcc option REQUIRED on Solaris?
david.keegan@marconi.com
david.keegan@marconi.com
Tue Oct 9 05:16:00 GMT 2001
>Number: 4511
>Category: c++
>Synopsis: Link option -shared-libgcc option REQUIRED on Solaris?
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 09 05:16:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: David Keegan
>Release: gcc-3.0.1
>Organization:
>Environment:
Solaris 5.7
>Description:
Info says the effect of -shared-gcclib should be the
default when linking a C++ main program (only the shared
version libgcc_s.so is installed by gmake-install).
Sometimes I find I have to specify -shared-libgcc
explicitly to avoid undefined symbols in libstdc++
at link time
gcc -v indicates that -lgcc is passed to collect2 unless
I specify -shared-libgcc. But no libgcc.a is installed,
only libgcc_s.so.
>How-To-Repeat:
Simple HelloWorld C++ program using cout. Compile with
gcc -v. Note that "-lgcc" is passed to collect2 rather
than "-lgcc_s" unless -shared-ligcc is passed. It results
in undefined symbol errors at link time in some cases.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list