Subject: Re: libtool and sparc/1.4
To: Paul Kranenburg <>
From: Nick Hudson <>
List: tech-pkg
Date: 08/25/2000 16:35:22
Paul Kranenburg wrote:
> > > and
> > >         o neither non-C++ libraries, nor any other code should
> > >           include c++rt0.o
> >
> > Do you mean that g++ should be relied on to include c++rt0.o when
> > necessary? If not I don't understand what you mean here - sorry for
> > being thick.
> You only need c++rt0.o when building a (a.out) shared library from C++ code.
> It takes care of calling static constructors/destructors in that library
> when it is loaded into a program.

Right. I understood that to be the case its just your statement above
confused me.

What I've put into libtool (on Todd's suggestion) is a check for c++rt0
in $(CC) -dumpspecs. If it exists then the compiler is used to link
(shared) libraries, if not the linker is used and is always passed
c++rt0. My fear is that this will (continue to) not work for

Do cc/c++ include c++rt0 only if necessary? How does it make this
decision? Or does c++ include it and cc not.