This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: groff dependancy on libstdc++
- From: Phil Edwards <phil at jaj dot com>
- To: Werner LEMBERG <wl at gnu dot org>
- Cc: chs at baltic-online dot de, bug-gcc at gnu dot org
- Date: Tue, 7 May 2002 22:41:54 -0400
- Subject: Re: groff dependancy on libstdc++
- References: <20020502170429.GA13325@baltic-online.de> <20020507.074043.66153229.wl@gnu.org> <20020507144622.GA18824@baltic-online.de> <20020508.010446.77028956.wl@gnu.org>
On Wed, May 08, 2002 at 01:04:46AM +0200, Werner LEMBERG wrote:
> > > > When groff is compiled, a dependency on libstdc++ can be
> > > > observed in the resulting executable. This is not desirable;
> > > > while the machine that groff is being built on has this library
> > > > installed, other machines on which groff is intended to be used
> > > > do not.
> >
> > > It's not clear to me what you expect; compiling with
> > > `-nodefaultlib' doesn't work. You must add -lc and -lg++, and the
> > > latter depends on libstdc++.
> >
> > I'm just wondering if there's a way of compiling groff that avoids
> > the dependancy on libstdc++.
>
> Can someone from the GCC people answer this? groff uses the C++
> language with home-brown classes only.
According to the second paragraph above, it is libg++, not groff, that has
the dependancies. You may need to investigate what libg++ actually needs.
If those dependancies are on language support routines only, then see
http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#2_5
and use libsupc++ instead.
Alternatively, you can link against the static libstdc++ library instead
of the shared one. The resulting executable will be larger, but there
will be no runtime dependancy.
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams