This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: c++ libraries
- From: Nix <nix at esperi dot org dot uk>
- To: Roopesh Kohad <roopesh dot kohad at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 10 Dec 2004 15:51:50 +0000
- Subject: Re: c++ libraries
- References: <1a223dc604121003014020a739@mail.gmail.com>
On 10 Dec 2004, Roopesh Kohad moaned:
> Hi,
> I understand that libstdc++ is standard C++ library implementing
> functions in 32 standard headers. But then what are libsupc++ and
> libsupc++convenience for?
libsupc++ implements the parts of the C++ runtime specified by the
non-library parts of the C++ Standard: the runtime implementations of
things like the default new and delete operators, exception handling,
the demangler, and the typeinfo infrastructure, as well as things like
the __cxa_guard_*() and EH personality functions required by the G++
ABI.
Its purpose is to let you build tiny statically linked C++ programs
without any of the overheads required by the full C++ standard library;
e.g., you don't pay for construction of the default iostreams if you
just link with -lsupc++.
It's especially useful for embedded work, but can be useful anywhere
where space is tight.
libsupc++convenience is what libtool calls a `convenience library'; that
is, it's a temporary static library whose ultimate purpose is to be
linked into some other library: namely, libstdc++ itself. It is not
installed or distributed in tarballs. It's a bit of a kludge: libtool's
support for multiple-directory projects is, er, perhaps not as elegant
as it could be.
(There's a comment about this in src/libstdc++-v3/libsupc++/Makefile.am,
just above the noinst_LTLIBRARIES line.)
--
`The sword we forged has turned upon us
Only now, at the end of all things do we see
The lamp-bearer dies; only the lamp burns on.'