This is the mail archive of the
mailing list for the GCC project.
Statically linking libstdc++ and libgcc_s
- From: John Carter <john dot carter at tait dot co dot nz>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 06 Aug 2002 11:12:56 +1200 (NZST)
- Subject: Statically linking libstdc++ and libgcc_s
Alas, other forums do not seem to have the answer to this one, perhaps the
developers can assist....
I'm trying to statically link an app to libstdc++ and libgcc_s to permit
easier distribution of the resulting binary.
I'm doing this on Solaris 2.5.1 using gcc-3.1.1 and binutils 2.12.1
Alas, my best attempt links without complaint, error or warning, but
then seg faults's on running...
collect2 -V -G -z text -Y P,/usr/ccs/lib:/usr/lib -Qy -o myprogram -L..
....many user .o's and -l...a's...
-dn -lstdc++ -lgcc_eh -dy -lsocket -lnsl -lrx -ldb
Curiously enough the linux RH7.3 using same toolsuite versions doesn't
Any suggestions as to which is the right part of TFM to R?
Gcc was configured as so..
--with-ld=/usr/local/gcc1541A/bin/ld --with-gnu-as --with-gnu-ld
--disable-threads --enable-languages=c,c++ --norecursion --
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : firstname.lastname@example.org
This email message is intended only for the addressee(s) and contains
information which may be confidential and/or copyright. If you are not
the intended recipient please do not read, save, forward, disclose, or
copy the contents of this email. If this email has been sent to you in
error, please notify the sender by reply email and he will be
along to delete you, this email and any copies or links to this email.
No representation is made that this email, you, or the sender are free of
viruses. Virus scanning and prevention is recommended and is the
responsibility of consenting adults.