NOTES ON BUILDING LIBG++ AS A SHARED LIBRARY

A shared library version of libg++-2.7.2 can be built using gcc-2.7.2 or
above on the following platforms:

x86 Linux (using the ELF toolchain)
Sparc running SunOS 4.x
Alpha running OSF/1
SGI running IRIX 5.x and up
HPPA running HPUX 9.x and up
All SVR4 targets (tested on Sparc Solaris and i486 UnixWare)
RS/6000 or PowerPC running AIX (requires GNU ld 2.7 or newer)

To build a shared version of libg++ on one of these platforms, pass the
--enable-shared flag to configure, and be sure to compile with gcc.

In order to run a program built with your new shared library (including
gperf and the tests), you may have to set the environment variable
LD_LIBRARY_PATH to include the directory where it lives.

Discussion:
----------

Many shared library implementations have an idiosyncracy [bug ???] which
requires anything that is declared in a shared library to be defined even
if it isn't used.  libstdc++.so and libg++.so contain a number of classes
which use the math library.  Consequently, if a shared libm does not exist
(it does under Linux, OSF/1, IRIX, HPUX and Solaris, but not the others),
either the math library must to added to the link command or you must
compile with a flag that tells the linker to ignore unresolved references
(-Wl,-assert,nodefinitions for SunOS, -Wl,-z,nodefs for SVR4).

The `g++' program now adds -lm by default, so you may not have to worry
about this.

Jason Merrill (jason@cygnus.com)
Thanks to Dr. Joseph E. Sacco (jsacco@ssl.com) for the original version of
this note.
