This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Static linking to libgcc_s and libstdc++
- From: bjorn rohde jensen <bjensen at fastmail dot fm>
- To: John Carter <john dot carter at tait dot co dot nz>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 05 Aug 2002 07:41:33 +0200
- Subject: Re: Static linking to libgcc_s and libstdc++
- References: <Pine.LNX.4.44.0208051217520.21447-100000@parore>
- Reply-to: bjensen at fastmail dot fm
Hi John,
In the past i have passed link options through gcc/g++
to the platform linker to do this sort of thing by means
of -Wl,option1,option2.... The idea is to switch to static
linking before the -l option for the lib, you want to link
to statically, and back to shared linking after it.
Depending on what combination of shared/static libs you
want to use, you might need to tell gcc not to implicitly
link with its libs with the -nostdlib and do that manually.
Yours sincerely,
Bjorn