8a165db0c0
2008-02-10 Benjamin Kosnik <bkoz@redhat.com> Convert documentation to DocBook. * doc/Makefile.am (doc-doxygen-html): Changed to doc-html-doxygen. (doc-doxygen-man): Changed to doc-man-doxygen. (doc-performance): Changed to doc-html-performance. (doc-xml-doxygen): New. (doc-xml-single): New. (doc-xml-validate): New. (doc-html): New. (doc-html-single): New. (doc-fo): New. (doc-pdf): New. (doc-pdf-fop-xml): New. (doc-pdf-fop-fo): New. (doc-pdf-xmlto): New. (doc-pdf-xmlroff): New. (doc-pdf-prince): New. * doc/xml: New directory. * doc/xml/authors.xml: New. * doc/xml/images: New directory. * doc/xml/images/confdeps.png: Add. * doc/xml/images/confdeps.dot: Add. * doc/xml/faq.xml: New. * doc/xml/api.xml: New. * doc/xml/gnu: New directory. * doc/xml/gnu/gpl-3.0.xml: New. * doc/xml/gnu/fdl-1.2.xml: New. * doc/xml/gnu/gpl-2.0.xml: New. * doc/xml/manual: New directory. * doc/xml/manual/mt_allocator.xml: New. * doc/xml/manual/allocator.xml: New. * doc/xml/manual/ctype.xml: New. * doc/xml/manual/numerics.xml: New. * doc/xml/manual/codecvt.xml: New. * doc/xml/manual/concurrency.xml: New. * doc/xml/manual/backwards_compatibility.xml: New. * doc/xml/manual/intro.xml: New. * doc/xml/manual/shared_ptr.xml: New. * doc/xml/manual/abi.xml: New. * doc/xml/manual/status_cxxtr1.xml: New. * doc/xml/manual/auto_ptr.xml: New. * doc/xml/manual/build.xml: New. * doc/xml/manual/internals.xml: New. * doc/xml/manual/parallel_mode.xml: New. * doc/xml/manual/status_cxx1998.xml: New. * doc/xml/manual/containers.xml: New. * doc/xml/manual/io.xml: New. * doc/xml/manual/appendix_porting.xml: New. * doc/xml/manual/utilities.xml: New. * doc/xml/manual/bitmap_allocator.xml: New. * doc/xml/manual/support.xml: New. * doc/xml/manual/configure.xml: New. * doc/xml/manual/build_hacking.xml: New. * doc/xml/manual/evolution.xml: New. * doc/xml/manual/using.xml: New. * doc/xml/manual/debug.xml: New. * doc/xml/manual/localization.xml: New. * doc/xml/manual/strings.xml: New. * doc/xml/manual/debug_mode.xml: New. * doc/xml/manual/locale.xml: New. * doc/xml/manual/extensions.xml: New. * doc/xml/manual/appendix_contributing.xml: New. * doc/xml/manual/messages.xml: New. * doc/xml/manual/diagnostics.xml: New. * doc/xml/manual/appendix_free.xml: New. * doc/xml/manual/algorithms.xml: New. * doc/xml/manual/iterators.xml: New. * doc/xml/manual/spine.xml: New. * doc/xml/manual/test.xml: New. * doc/xml/manual/status_cxx200x.xml: New. * doc/xml/spine.xml: New. * doc/xml/book.txml: New. Template file. * doc/xml/chapter.txml: Same. * doc/xml/class.txml: Same. * doc/doxygen/guide.html: Removed, integrated into other docs. * doc/doxygen/user.cfg.in: Clean up XML generation. * doc/doxygen/run_doxygen: Move to.. * scripts/run_doxygen: ...here. * configure: Regenerate. * Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * libmath/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * aclocal.m4: Regenerate. From-SVN: r132226
318 lines
14 KiB
XML
318 lines
14 KiB
XML
<sect1 id="manual.intro.setup.configure" xreflabel="Configuring">
|
|
<?dbhtml filename="configure.html"?>
|
|
|
|
<sect1info>
|
|
<keywordset>
|
|
<keyword>
|
|
ISO C++
|
|
</keyword>
|
|
<keyword>
|
|
configure
|
|
</keyword>
|
|
<keyword>
|
|
options
|
|
</keyword>
|
|
</keywordset>
|
|
</sect1info>
|
|
|
|
<title>Configure</title>
|
|
|
|
<para>
|
|
Here are some of the non-obvious options to libstdc++'s configure.
|
|
Keep in mind that
|
|
<!-- This SECnn should be the "Choosing Package Options" section. -->
|
|
<ulink url="http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_131.html#SEC131">they
|
|
all have opposite forms as well</ulink>
|
|
(enable/disable and with/without). The defaults are for <emphasis>current
|
|
development sources</emphasis>, which may be different than those for
|
|
released versions.
|
|
</para>
|
|
<para>The canonical way to find out the configure options that are
|
|
available for a given set of libstdc++ sources is to go to the
|
|
source directory and then type:<code> ./configure --help</code>
|
|
</para>
|
|
|
|
<variablelist>
|
|
<varlistentry><term><code>--enable-multilib</code>[default]</term>
|
|
<listitem><para>This is part of the generic multilib support for building cross
|
|
compilers. As such, targets like "powerpc-elf" will have
|
|
libstdc++ built many different ways: "-msoft-float"
|
|
and not, etc. A different libstdc++ will be built for each of
|
|
the different multilib versions. This option is on by default.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-sjlj-exceptions</code></term>
|
|
<listitem><para>Forces old, set-jump/long-jump exception handling model. If
|
|
at all possible, the new, frame unwinding exception handling routines
|
|
should be used instead, as they significantly reduce both
|
|
runtime memory usage and executable size. This option can
|
|
change the library ABI.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-version-specific-runtime-libs</code></term>
|
|
<listitem><para>Specify that run-time libraries should be installed in the
|
|
compiler-specific subdirectory (i.e.,
|
|
<code>${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
|
|
instead of <code>${libdir}</code>. This option is useful if you
|
|
intend to use several versions of gcc in parallel. In addition,
|
|
libstdc++'s include files will be installed in
|
|
<code>${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
|
|
unless you also specify
|
|
<literal>--with-gxx-include-dir=<filename class="directory">dirname</filename></literal> during configuration.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--with-gxx-include-dir=<include-files dir></code></term>
|
|
<listitem><para>Adds support for named libstdc++ include directory. For instance,
|
|
the following puts all the libstdc++ headers into a directory
|
|
called "2.97-20001008" instead of the usual
|
|
"c++/(version)".
|
|
</para>
|
|
<programlisting>
|
|
--with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</programlisting> </listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-cstdio</code></term>
|
|
<listitem><para>This is an abbreviated form of <code>'--enable-cstdio=stdio'</code>
|
|
(described next). This option can change the library ABI.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-cstdio=OPTION</code></term>
|
|
<listitem><para>Select a target-specific I/O package. At the moment, the only
|
|
choice is to use 'stdio', a generic "C" abstraction.
|
|
The default is 'stdio'.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-clocale</code></term>
|
|
<listitem><para>This is an abbreviated form of <code>'--enable-clocale=generic'</code>
|
|
(described next). This option can change the library ABI.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-clocale=OPTION</code></term>
|
|
<listitem><para>Select a target-specific underlying locale package. The
|
|
choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix
|
|
(IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets,
|
|
'gnu' to specify a model based on functionality from the GNU C
|
|
library (langinfo/iconv/gettext) (from <ulink url="http://sources.redhat.com/glibc/">glibc</ulink>, the GNU C
|
|
library), or 'generic' to use a generic "C"
|
|
abstraction which consists of "C" locale info.
|
|
</para>
|
|
|
|
<para>As part of the configuration process, the "C" library is
|
|
probed both for sufficient vintage, and installed locale
|
|
data. If either of these elements are not present, the C++
|
|
locale model default to 'generic.' On glibc-based systems of
|
|
version 2.2.5 and above with installed locale files, 'gnu' is
|
|
automatically selected.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-libstdcxx-allocator</code></term>
|
|
<listitem><para>This is an abbreviated form of
|
|
<code>'--enable-libstdcxx-allocator=auto'</code> (described
|
|
next). This option can change the library ABI.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-libstdcxx-allocator=OPTION </code></term>
|
|
<listitem><para>Select a target-specific underlying std::allocator. The
|
|
choices are 'new' to specify a wrapper for new, 'malloc' to
|
|
specify a wrapper for malloc, 'mt' for a fixed power of two allocator
|
|
(<ulink url="ext/mt_allocator.html">documented</ulink> under extensions),
|
|
'pool' for the SGI pooled allocator or 'bitmap' for a bitmap allocator.
|
|
This option can change the library ABI.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-cheaders=OPTION</code></term>
|
|
<listitem><para>This allows the user to define the approach taken for C header
|
|
compatibility with C++. Options are c, c_std, and c_global.
|
|
These correspond to the source directory's include/c,
|
|
include/c_std, and include/c_global, and may also include
|
|
include/c_compatibility. The default is c_global.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-threads</code></term>
|
|
<listitem><para>This is an abbreviated form of <code>'--enable-threads=yes'</code>
|
|
(described next). This option can change the library ABI.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-threads=OPTION</code></term>
|
|
<listitem><para>Select a threading library. A full description is given in the
|
|
general <ulink url="http://gcc.gnu.org/install/configure.html">compiler
|
|
configuration instructions</ulink>.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-libstdcxx-debug</code></term>
|
|
<listitem><para>Build separate debug libraries in addition to what is normally built.
|
|
By default, the debug libraries are compiled with
|
|
<code> CXXFLAGS='-g3 -O0'</code>
|
|
, are installed in <code>${libdir}/debug</code>, and have the
|
|
same names and versioning information as the non-debug
|
|
libraries. This option is off by default.
|
|
</para>
|
|
<para>Note this make command, executed in
|
|
the build directory, will do much the same thing, without the
|
|
configuration difference and without building everything twice:
|
|
<code>make CXXFLAGS='-g3 -O0' all</code>
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-libstdcxx-debug-flags=FLAGS</code></term>
|
|
|
|
<listitem><para>This option is only valid when <code> --enable-debug </code>
|
|
is also specified, and applies to the debug builds only. With
|
|
this option, you can pass a specific string of flags to the
|
|
compiler to use when building the debug versions of libstdc++.
|
|
FLAGS is a quoted string of options, like
|
|
</para>
|
|
<programlisting>
|
|
--enable-libstdcxx-debug-flags='-g3 -O1 -gdwarf-2'</programlisting>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-cxx-flags=FLAGS</code></term>
|
|
<listitem><para>With this option, you can pass a string of -f (functionality)
|
|
flags to the compiler to use when building libstdc++. This
|
|
option can change the library ABI. FLAGS is a quoted string of
|
|
options, like
|
|
</para>
|
|
<programlisting>
|
|
--enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</programlisting>
|
|
<para>
|
|
Note that the flags don't necessarily have to all be -f flags,
|
|
as shown, but usually those are the ones that will make sense
|
|
for experimentation and configure-time overriding.
|
|
</para>
|
|
<para>The advantage of --enable-cxx-flags over setting CXXFLAGS in
|
|
the 'make' environment is that, if files are automatically
|
|
rebuilt, the same flags will be used when compiling those files
|
|
as well, so that everything matches.
|
|
</para>
|
|
<para>Fun flags to try might include combinations of
|
|
</para>
|
|
<programlisting>
|
|
-fstrict-aliasing
|
|
-fno-exceptions
|
|
-ffunction-sections
|
|
-fvtable-gc</programlisting>
|
|
<para>and opposite forms (-fno-) of the same. Tell us (the libstdc++
|
|
mailing list) if you discover more!
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-c99</code></term>
|
|
<listitem><para>The "long long" type was introduced in C99, along
|
|
with many other functions for wide characters, and math
|
|
classification macros, etc. If enabled, all C99 functions not
|
|
specified by the C++ standard will be put into <code>namespace
|
|
__gnu_cxx</code>, and then all these names will
|
|
be injected into namespace std, so that C99 functions can be
|
|
used "as if" they were in the C++ standard (as they
|
|
will eventually be in some future revision of the standard,
|
|
without a doubt). By default, C99 support is on, assuming the
|
|
configure probes find all the necessary functions and bits
|
|
necessary. This option can change the library ABI.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-wchar_t</code>[default]</term>
|
|
<listitem><para>Template specializations for the "wchar_t" type are
|
|
required for wide character conversion support. Disabling
|
|
wide character specializations may be expedient for initial
|
|
porting efforts, but builds only a subset of what is required by
|
|
ISO, and is not recommended. By default, this option is on.
|
|
This option can change the library ABI.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-long-long </code></term>
|
|
<listitem><para>The "long long" type was introduced in C99. It is
|
|
provided as a GNU extension to C++98 in g++. This flag builds
|
|
support for "long long" into the library (specialized
|
|
templates and the like for iostreams). This option is on by default:
|
|
if enabled, users will have to either use the new-style "C"
|
|
headers by default (i.e., <cmath> not <math.h>)
|
|
or add appropriate compile-time flags to all compile lines to
|
|
allow "C" visibility of this feature (on GNU/Linux,
|
|
the flag is -D_ISOC99_SOURCE, which is added automatically via
|
|
CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE).
|
|
This option can change the library ABI.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-fully-dynamic-string</code></term>
|
|
<listitem><para>This option enables a special version of basic_string avoiding
|
|
the optimization that allocates empty objects in static memory.
|
|
Mostly useful together with shared memory allocators, see PR
|
|
libstdc++/16612 for details.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-concept-checks</code></term>
|
|
<listitem><para>This turns on additional compile-time checks for instantiated
|
|
library templates, in the form of specialized templates,
|
|
<ulink url="19_diagnostics/howto.html#3">described here</ulink>. They
|
|
can help users discover when they break the rules of the STL, before
|
|
their programs run.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-symvers[=style]</code></term>
|
|
|
|
<listitem><para>In 3.1 and later, tries to turn on symbol versioning in the
|
|
shared library (if a shared library has been
|
|
requested). Values for 'style' that are currently supported
|
|
are 'gnu', 'gnu-versioned-namespace', 'darwin', and
|
|
'darwin-export'. Both gnu- options require that a recent
|
|
version of the GNU linker be in use. Both darwin options are
|
|
equivalent. With no style given, the configure script will try
|
|
to guess correct defaults for the host system, probe to see if
|
|
additional requirements are necessary and present for
|
|
activation, and if so, will turn symbol versioning on. This
|
|
option can change the library ABI.
|
|
</para>
|
|
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-visibility</code></term>
|
|
<listitem><para> In 4.2 and later, enables or disables visibility attributes.
|
|
If enabled (as by default), and the compiler seems capable of
|
|
passing the simple sanity checks thrown at it, adjusts items
|
|
in namespace std, namespace std::tr1, and namespace __gnu_cxx
|
|
so that -fvisibility options work.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--enable-libstdcxx-pch</code></term>
|
|
<listitem><para>In 3.4 and later, tries to turn on the generation of
|
|
stdc++.h.gch, a pre-compiled file including all the standard
|
|
C++ includes. If enabled (as by default), and the compiler
|
|
seems capable of passing the simple sanity checks thrown at
|
|
it, try to build stdc++.h.gch as part of the make process.
|
|
In addition, this generated file is used later on (by appending <code>
|
|
--include bits/stdc++.h </code> to CXXFLAGS) when running the
|
|
testsuite.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
|
|
<varlistentry><term><code>--disable-hosted-libstdcxx</code></term>
|
|
<listitem>
|
|
<para>
|
|
By default, a complete <emphasis>hosted</emphasis> C++ library is
|
|
built. The C++ Standard also describes a
|
|
<emphasis>freestanding</emphasis> environment, in which only a
|
|
minimal set of headers are provided. This option builds such an
|
|
environment.
|
|
</para>
|
|
</listitem></varlistentry>
|
|
</variablelist>
|
|
|
|
|
|
</sect1> |