This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: groff dependancy on libstdc++


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]