From mboxrd@z Thu Jan 1 00:00:00 1970 From: david.keegan@marconi.com To: gcc-gnats@gcc.gnu.org Subject: c++/4511: Link option -shared-libgcc option REQUIRED on Solaris? Date: Tue, 09 Oct 2001 05:16:00 -0000 Message-id: <20011009121540.16703.qmail@sourceware.cygnus.com> X-SW-Source: 2001-10/msg00174.html List-Id: >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: