2000-04-22 04:33:34 +08:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
2001-09-18 07:24:40 +08:00
|
|
|
<html>
|
|
|
|
<head>
|
2001-10-10 04:18:14 +08:00
|
|
|
<meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)">
|
|
|
|
<meta name="KEYWORDS" content="libstdc++, libstdc++-v3, GCC, g++">
|
|
|
|
<meta name="DESCRIPTION" content="Configuration options for libstdc++-v3.">
|
|
|
|
<meta name="GENERATOR" content="vi and eight fingers">
|
2001-09-18 07:24:40 +08:00
|
|
|
<title>libstdc++-v3 configure options</title>
|
2001-10-12 02:41:47 +08:00
|
|
|
<link rel="StyleSheet" href="lib3styles.css">
|
2001-09-18 07:24:40 +08:00
|
|
|
</head>
|
|
|
|
<body>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2001-10-10 04:18:14 +08:00
|
|
|
<h1 class="centered"><a name="top">Interesting <code>configure</code>
|
2001-09-18 07:24:40 +08:00
|
|
|
options</a></h1>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<p>The latest version of this document is always available at
|
|
|
|
<a href="http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html">
|
|
|
|
http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html</a>.
|
|
|
|
</p>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<p>To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
|
2000-04-22 04:33:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ####################################################### -->
|
2001-09-18 07:24:40 +08:00
|
|
|
<hr>
|
|
|
|
<p>Here are some of the non-obvious options to libstdc++'s configure.
|
2000-04-22 04:33:34 +08:00
|
|
|
Keep in mind that
|
2000-05-10 04:25:13 +08:00
|
|
|
<!-- This SECnn should be the "Choosing Package Options" section. -->
|
2001-09-18 07:24:40 +08:00
|
|
|
<a href="http://sources.redhat.com/autoconf/autoconf.html#SEC74">they
|
|
|
|
all have opposite forms as well</a>
|
2000-12-10 12:04:56 +08:00
|
|
|
(enable/disable and with/without). The defaults are for current
|
|
|
|
development sources.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
|
|
|
<p>The canonical way to find out the configure options that are
|
2000-08-09 15:33:39 +08:00
|
|
|
available for a given set of libstdc++ sources is to go to the
|
2001-09-18 07:24:40 +08:00
|
|
|
source directory and then type:<code> ./configure --help</code>
|
2000-08-09 15:33:39 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dl>
|
|
|
|
<dt><code>--enable-multilib </code>[default]
|
|
|
|
<dd><p>This is part of the generic multilib support for building cross
|
2000-10-16 08:20:42 +08:00
|
|
|
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.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-debug </code>
|
|
|
|
<dd><p>The configure script will automatically detect the highest
|
2001-08-08 10:49:01 +08:00
|
|
|
level of optimization that the compiler in use can use
|
2001-09-18 07:24:40 +08:00
|
|
|
(certain versions of g++ will ICE if given the <code>-O2</code>
|
2001-08-08 10:49:01 +08:00
|
|
|
option, but this is fixed in later versions of the compiler).
|
|
|
|
This --enable flag will disable all optimizations and instruct
|
|
|
|
the compiler to emit as much extra debugging information as it
|
|
|
|
can, for use inside GDB. Note this make command, executed in
|
|
|
|
the build directory, will do much the same thing, without the
|
2001-09-18 07:24:40 +08:00
|
|
|
configuration difference:<code>make CXXFLAGS='-g -O0' all</code>
|
|
|
|
</p>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-cstdio </code>
|
|
|
|
<dd><p>This is an abbreviated form of <code>'--enable-cstdio=stdio'</code>
|
2000-04-22 04:33:34 +08:00
|
|
|
(described next).
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-cstdio=LIB </code>
|
|
|
|
<dd><p>Select a target-specific I/O package. As of libstdc++-v3
|
2001-01-03 23:53:28 +08:00
|
|
|
snapshot 2.91, the choices are 'libio' to specify the GNU
|
2000-04-22 04:33:34 +08:00
|
|
|
I/O package (from
|
2001-09-18 07:24:40 +08:00
|
|
|
<a href="http://sources.redhat.com/glibc/">glibc</a>, the
|
2001-01-21 17:36:09 +08:00
|
|
|
GNU C library), or 'stdio' to use a generic "C"
|
2001-07-10 03:37:01 +08:00
|
|
|
abstraction. The default is 'stdio'. A longer explanation
|
2001-09-18 07:24:40 +08:00
|
|
|
is <a href="explanations.html#cstdio">here</a>.
|
|
|
|
</p>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-sjlj-exceptions </code>
|
|
|
|
<dd><p>Forces old, set-jump/long-jump exception handling model. If
|
2001-07-10 03:37:01 +08:00
|
|
|
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.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2001-04-03 03:00:13 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-clocale </code>
|
|
|
|
<dd><p>This is an abbreviated form of <code>'--enable-clocale=generic'</code>
|
2001-04-06 09:47:11 +08:00
|
|
|
(described next).
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2001-04-06 09:47:11 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-clocale=MODEL </code>
|
|
|
|
<dd><p>Select a target-specific underlying locale package. The
|
2001-08-08 10:49:01 +08:00
|
|
|
choices are 'ieee_1003.1' to specify an X/Open, Standard Unix
|
|
|
|
(IEEE Std. 1003.1-200x) model based on langinfo/iconv/catgets,
|
|
|
|
'gnu' to specify a model based on functionality from the GNU C
|
|
|
|
library (langinfo/iconv/gettext) (from <A
|
2001-10-10 04:18:14 +08:00
|
|
|
href="http://sources.redhat.com/glibc/">glibc</a>, the GNU C
|
2001-08-08 10:49:01 +08:00
|
|
|
library), or 'generic' to use a generic "C"
|
|
|
|
abstraction which consists of "C" locale info. The
|
|
|
|
default is 'generic'.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
Preliminary named locales.
2001-01-29 Benjamin Kosnik <bkoz@redhat.com>
Preliminary named locales.
* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): New macro.
* aclocal.m4: Regenerate.
* configure.in: Use it.
* configure: Regerate.
* src/Makefile.am (sources): Add c++locale.cc.
(build_headers): Add c++locale.h.
* src/Makefile.in: Regenerate.
* config/c_locale_gnu.h: New file.
* config/c_locale_gnu.cc: New file. Non-inline member functions
for named locales, gnu-specific.
* config/c_locale_generic.h: New file.
* config/c_locale_generic.cc: New file. Non-inline member
functions for named locales, generic version.
* docs/html/configopts.html: Add documentation on new options.
* include/bits/locale_facets.h (class _Messages): Remove.
(class _Moneypunct): Remove.
* src/locale-inst.cc: Remove.
* include/bits/locale_facets.h (class _Collate): Remove.
* src/locale-inst.cc (std): Remove.
* src/locale.cc: And here.
* include/bits/localefwd.h (locale::_M_coalesce): New
function. Correctly put together multi-name locales.
(_Impl(const _Impl&, category, size_t)): Remove.
* include/bits/localefwd.h (locale::_Impl): Remove _M_construct_*
member functions.
(_M_normalize_category_names): Remove.
(_M_replace_categories): Fix.
* src/localename.cc (locale::_Impl::_M_construct_collate): Remove.
(locale::_Impl::_M_construct_ctype): Remove.
(locale::_Impl::_M_construct_monetary): Remove.
(locale::_Impl::_M_construct_numeric): Remove.
(locale::_Impl::_M_construct_time): Remove.
(locale::_Impl::_M_construct_messages): Remove.
* include/bits/locale_facets.h (_Bad_use_facet): Remove.
(_Use_facet_failure_handle): Remove.
* src/locale.cc: Remove definitions.
* src/locale-inst.cc: And here.
* testsuite/22_locale/ctor_copy_dtor.cc (test01): Fixup. Add tests.
* src/localename.cc (locale::facet::_S_create_c_locale): Properly
create and error-check underlying locale object.
(locale::facet::_S_destroy_c_locale): Add, take care of properly
tearing down underlying locale object.
* include/bits/localefwd.h (locale::facet): Declare.
* testsuite/22_locale/members.cc: Don't test "fr_FR" locale for
correctness, as glibc apparently has incorrect info in it. Test
with it when it works again.....
* include/bits/localefwd.h (locale::_Impl::__vec_string):
Remove. Number of categories is fixed at six, so just simplify and
make this an array of strings.
(locale::_Impl::_M_has_name): Remove.
(locale::_Impl::_M_name): Remove.
(locale::_Impl::_M_category_names): Turns into...
(locale::_Impl::_M_names): ...this.
(locale::_Impl::_M_has_same_name()): New function.
* src/localename.cc (locale::_Impl::~_Impl()): Remove here.
(locale::_Impl::_Impl(size_t __refs, string __str)): Simplify
signature.
* src/locale.cc (locale::name()): Construct mangled name
accurately reflecting combined locale categories.
* src/locale.cc (locale::classic()): Don't initialize here.
* src/localename.cc (locale::_Impl::_Impl(size_t __num, size_t
__refs, bool __has_name, string __str): Do it here.
* include/bits/localefwd.h: _S_categories_num to
_S_num_categories. _S_facets_num to _S_num_facets.
(locale::id::id()): Explicitly set _M_index to zero.
* src/locale.cc: Same.
* src/locale.cc: (locale::locale(const char*)): Construct named
locales uniquely.
* src/locale.cc: Remove numpunct_byname ctors.
* testsuite/22_locale/numpunct_byname.cc: New file.
* testsuite/22_locale/numpunct.cc: New file.
* include/bits/localefwd.h (class locale): Change data members to
protected, from private.
(_Impl::_M_get_c_locale): Add member function.
(locale::facet::_M_get_global_impl()): Add member function.
* include/bits/locale_facets.h (numpunct::_M_init): Change to take
a __c_locale pointer.
(numpunct::numpunct( __c_locale*, size_t)): Add additonal ctor for
named locales.
* testsuite/22_locale/members.cc: New file, test name and combine.
* include/bits/locale_facets.h (class numpunct): Remove class
_Punct and _Numpunct. Rewrite class numpunct to be correct for
named locales.
* include/bits/localefwd.h (locale::_Imp::_M_c_locale): Add.
* src/localename.cc (_Impl::~_Impl()): Call __frelocale.
(_Imp::_Impl(size_t, size_t, bool, string)) Initialize _M_c_locale.
* src/locale-inst.cc: Remove _Numpunct, _Punct instantiations.
* testsuite/22_locale/numpunct_char_members.cc: New file.
From-SVN: r39347
2001-01-30 17:18:51 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-c99 </code>
|
|
|
|
<dd><p>The "long long" type was introduced in C99, along
|
2001-08-08 10:49:01 +08:00
|
|
|
with many other functions for wide characters, and math
|
2001-07-10 03:37:01 +08:00
|
|
|
classification macros, etc. If enabled, all C99 functions not
|
2001-09-18 07:24:40 +08:00
|
|
|
specified by the C++ standard will be put into <code>namespace
|
|
|
|
__gnu_cxx</code>, and then all these names will
|
2001-08-08 10:49:01 +08:00
|
|
|
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.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2001-04-20 16:59:25 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-long-long </code>
|
|
|
|
<dd><p>The "long long" type was introduced in C99. It is
|
2000-04-22 04:33:34 +08:00
|
|
|
provided as a GNU extension to C++98 in g++. This flag builds
|
2001-07-10 03:37:01 +08:00
|
|
|
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).
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-cheaders=OPTION </code>
|
|
|
|
<dd><p>This allows the user to define what kind of C headers are
|
2001-02-16 06:21:12 +08:00
|
|
|
used. Options are: c, c_std, and c_shadow. These correspond
|
|
|
|
to the source directory's include/c, include/c_std, and
|
|
|
|
include/c_shadow directories. The default is c_std.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2000-05-17 01:06:39 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-threads </code>
|
|
|
|
<dd><p>This is an abbreviated form of <code>'--enable-threads=yes'</code>
|
2000-04-22 04:33:34 +08:00
|
|
|
(described next).
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-threads=LIB </code>
|
|
|
|
<dd><p>Select a threading library. As of libstdc++-v3 snapshot 2.91,
|
2000-04-22 04:33:34 +08:00
|
|
|
the choices are:
|
|
|
|
'yes' for some kind of default (hmmmmm);
|
|
|
|
'decosf1', 'irix', 'mach', 'os2', 'posix'/'pthreads'
|
|
|
|
(same thing),
|
|
|
|
'solaris', 'win32', 'dce', or 'vxworks' to select the
|
|
|
|
corresponding interface;
|
|
|
|
and 'single', 'no', or 'none' for the null-case,
|
|
|
|
single-threaded library.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
|
|
|
<p>All of this is currently undergoing a lot of changes. As of
|
2001-01-03 23:53:28 +08:00
|
|
|
2.91, 'single' and 'posix' are the only implemented
|
2001-01-21 17:36:09 +08:00
|
|
|
models. Default is single.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-version-specific-runtime-libs </code>
|
|
|
|
<dd><p>Specify that run-time libraries should be installed in the
|
2001-07-10 03:37:01 +08:00
|
|
|
compiler-specific subdirectory (i.e.,
|
2001-09-18 07:24:40 +08:00
|
|
|
<code>${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
|
|
|
|
instead of <code>${libdir}</code>. This option is useful if you
|
2001-07-10 03:37:01 +08:00
|
|
|
intend to use several versions of gcc in parallel. In addition,
|
|
|
|
libstdc++'s include files will be installed in
|
2001-09-18 07:24:40 +08:00
|
|
|
<code>${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
|
2001-07-10 03:37:01 +08:00
|
|
|
unless you also specify
|
2001-09-18 07:24:40 +08:00
|
|
|
<code>--with-gxx-include-dir=<em>dirname</em></code> during configuration.
|
|
|
|
</p>
|
2000-10-15 16:45:33 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--with-gxx-include-dir=<include-files dir></code>
|
|
|
|
<dd><p>Adds support for named libstdc++ include directory. For instance,
|
2000-10-16 08:20:42 +08:00
|
|
|
the following puts all the libstdc++ headers into a directory
|
|
|
|
called "2.97-20001008" instead of the usual
|
|
|
|
"g++-v3".
|
2001-10-10 04:18:14 +08:00
|
|
|
<pre>
|
|
|
|
--with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</pre>
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2000-10-15 16:45:33 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-cxx-flags=FLAGS</code>
|
|
|
|
<dd><p>With this option, you can pass a string of -f (functionality)
|
2000-04-22 04:33:34 +08:00
|
|
|
flags to the compiler to use when building libstdc++. FLAGS
|
|
|
|
is a quoted string of options, like
|
2001-10-10 04:18:14 +08:00
|
|
|
<pre>
|
|
|
|
--enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</pre>
|
2000-04-22 04:33:34 +08:00
|
|
|
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.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
|
|
|
<p>The advantage of --enable-cxx-flags over setting CXXFLAGS in
|
2001-02-16 06:21:12 +08:00
|
|
|
the 'make' environment is that, if files are automatically
|
2000-04-22 04:33:34 +08:00
|
|
|
rebuilt, the same flags will be used when compiling those files
|
|
|
|
as well, so that everything matches.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
|
|
|
<p>Fun flags to try might include combinations of
|
2001-10-10 04:18:14 +08:00
|
|
|
<pre>
|
2000-04-22 04:33:34 +08:00
|
|
|
-fstrict-aliasing
|
2001-02-16 06:21:12 +08:00
|
|
|
-fno-exceptions
|
2000-04-22 04:33:34 +08:00
|
|
|
-ffunction-sections
|
2001-10-10 04:18:14 +08:00
|
|
|
-fvtable-gc</pre>
|
|
|
|
and opposite forms (-fno-) of the same. Tell us (the libstdc++
|
|
|
|
mailing list) if you discover more!
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2000-08-29 02:41:24 +08:00
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<dt><code>--enable-c-mbchar </code>[default]
|
|
|
|
<dd><p>Certain template specializations are required for wide
|
2001-01-03 23:53:28 +08:00
|
|
|
character conversion support. This is tricky and currently
|
|
|
|
changing rapidly, and can cause problems on new platforms.
|
|
|
|
Disabling wide character specializations is useful for initial
|
|
|
|
porting steps, but builds only a subset of what is required by
|
2001-08-08 10:49:01 +08:00
|
|
|
ISO. By default, this option is on.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
|
|
<p>Return <a href="#top">to the top of the page</a> or
|
2001-10-10 04:18:14 +08:00
|
|
|
<a href="http://gcc.gnu.org/libstdc++/">to the libstdc++ homepage</a>.
|
2001-09-18 07:24:40 +08:00
|
|
|
</p>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ####################################################### -->
|
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
<hr>
|
2001-10-10 04:18:14 +08:00
|
|
|
<p class="fineprint"><em>
|
2001-10-05 04:03:22 +08:00
|
|
|
See <a href="17_intro/license.html">license.html</a> for copying conditions.
|
2001-09-27 08:48:01 +08:00
|
|
|
Comments and suggestions are welcome, and may be sent to
|
2001-10-10 04:18:14 +08:00
|
|
|
<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
|
2001-09-18 07:24:40 +08:00
|
|
|
</em></p>
|
2000-04-22 04:33:34 +08:00
|
|
|
|
|
|
|
|
2001-09-18 07:24:40 +08:00
|
|
|
</body>
|
|
|
|
</html>
|