Daily bump.
[official-gcc.git] / libstdc++-v3 / docs / html / configopts.html
blob204aba5113618fa0d1d76a5f7d833404f5218ee4
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2 <html>
3 <head>
4 <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)">
5 <meta name="KEYWORDS" content="libstdc++, libstdc++-v3, GCC, g++">
6 <meta name="DESCRIPTION" content="Configuration options for libstdc++-v3.">
7 <meta name="GENERATOR" content="vi and eight fingers">
8 <title>libstdc++-v3 configure options</title>
9 <link rel="StyleSheet" href="lib3styles.css">
10 </head>
11 <body>
13 <h1 class="centered"><a name="top">Interesting <code>configure</code>
14 options</a></h1>
16 <p>The latest version of this document is always available at
17 <a href="http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html">
18 http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html</a>.
19 </p>
21 <p>To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
24 <!-- ####################################################### -->
25 <hr>
26 <p>Here are some of the non-obvious options to libstdc++'s configure.
27 Keep in mind that
28 <!-- This SECnn should be the "Choosing Package Options" section. -->
29 <a href="http://www.gnu.org/manual/autoconf/html_node/Package-Options.html#Package%20Options">they
30 all have opposite forms as well</a>
31 (enable/disable and with/without). The defaults are for current
32 development sources.
33 </p>
34 <p>The canonical way to find out the configure options that are
35 available for a given set of libstdc++ sources is to go to the
36 source directory and then type:<code> ./configure --help</code>
38 <dl>
39 <dt><code>--enable-multilib </code>[default]
40 <dd><p>This is part of the generic multilib support for building cross
41 compilers. As such, targets like &quot;powerpc-elf&quot; will have
42 libstdc++ built many different ways: &quot;-msoft-float&quot;
43 and not, etc. A different libstdc++ will be built for each of
44 the different multilib versions. This option is on by default.
45 </p>
47 <dt><code>--enable-debug </code>
48 <dd><p>The configure script will automatically detect the highest
49 level of optimization that the compiler in use can use.
50 This --enable flag will disable all optimizations and instruct
51 the compiler to emit as much extra debugging information as it
52 can, for use inside GDB. Note this make command, executed in
53 the build directory, will do much the same thing, without the
54 configuration difference:
55 <code>make CXXFLAGS='-g -O0' all</code>
56 </p>
58 <dt><code>--enable-cstdio </code>
59 <dd><p>This is an abbreviated form of <code>'--enable-cstdio=stdio'</code>
60 (described next).
61 </p>
63 <dt><code>--enable-cstdio=LIB </code>
64 <dd><p>Select a target-specific I/O package. As of libstdc++-v3
65 snapshot 3.0.96, the choices are 'libio' to specify the GNU
66 I/O package (from
67 <a href="http://sources.redhat.com/glibc/">glibc</a>, the
68 GNU C library), or 'stdio' to use a generic &quot;C&quot;
69 abstraction. The default is 'stdio'. A longer explanation
70 is <a href="explanations.html#cstdio">here</a>.
71 </p>
73 <dt><code>--enable-sjlj-exceptions </code>
74 <dd><p>Forces old, set-jump/long-jump exception handling model. If
75 at all possible, the new, frame unwinding exception handling routines
76 should be used instead, as they significantly reduce both runtime
77 memory usage and executable size.
78 </p>
80 <dt><code>--enable-clocale </code>
81 <dd><p>This is an abbreviated form of <code>'--enable-clocale=generic'</code>
82 (described next).
83 </p>
85 <dt><code>--enable-clocale=MODEL </code>
86 <dd><p>Select a target-specific underlying locale package. The
87 choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix
88 (IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets,
89 'gnu' to specify a model based on functionality from the GNU C
90 library (langinfo/iconv/gettext) (from <A
91 href="http://sources.redhat.com/glibc/">glibc</a>, the GNU C
92 library), or 'generic' to use a generic &quot;C&quot;
93 abstraction which consists of &quot;C&quot; locale info. The
94 default is 'generic'.
95 </p>
97 <dt><code>--enable-c99 </code>
98 <dd><p>The &quot;long long&quot; type was introduced in C99, along
99 with many other functions for wide characters, and math
100 classification macros, etc. If enabled, all C99 functions not
101 specified by the C++ standard will be put into <code>namespace
102 __gnu_cxx</code>, and then all these names will
103 be injected into namespace std, so that C99 functions can be
104 used &quot;as if&quot; they were in the C++ standard (as they
105 will eventually be in some future revision of the standard,
106 without a doubt). By default, C99 support is on, assuming the
107 configure probes find all the necessary functions and bits
108 necessary.
109 </p>
111 <dt><code>--enable-long-long </code>
112 <dd><p>The &quot;long long&quot; type was introduced in C99. It is
113 provided as a GNU extension to C++98 in g++. This flag builds
114 support for &quot;long long&quot; into the library (specialized
115 templates and the like for iostreams). This option is on by default:
116 if enabled, users will have to either use the new-style &quot;C&quot;
117 headers by default (i.e., &lt;cmath&gt; not &lt;math.h&gt;)
118 or add appropriate compile-time flags to all compile lines to
119 allow &quot;C&quot; visibility of this feature (on GNU/Linux,
120 the flag is -D_ISOC99_SOURCE, which is added automatically via
121 CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE).
122 </p>
124 <dt><code>--enable-cheaders=OPTION </code>
125 <dd><p>This allows the user to define what kind of C headers are
126 used. Options are: c, c_std, and c_shadow. These correspond
127 to the source directory's include/c, include/c_std, and
128 include/c_shadow directories. The default is c_std.
129 </p>
131 <dt><code>--enable-threads </code>
132 <dd><p>This is an abbreviated form of <code>'--enable-threads=yes'</code>
133 (described next).
134 </p>
136 <dt><code>--enable-threads=LIB </code>
137 <dd><p>Select a threading library. A full description is given in the
138 general <a href="http://gcc.gnu.org/install/configure.html">compiler
139 configuration instructions</a>.
140 </p>
142 <dt><code>--enable-version-specific-runtime-libs </code>
143 <dd><p>Specify that run-time libraries should be installed in the
144 compiler-specific subdirectory (i.e.,
145 <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
146 instead of <code>${libdir}</code>. This option is useful if you
147 intend to use several versions of gcc in parallel. In addition,
148 libstdc++'s include files will be installed in
149 <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
150 unless you also specify
151 <code>--with-gxx-include-dir=<em>dirname</em></code> during configuration.
152 </p>
154 <dt><code>--with-gxx-include-dir=&lt;include-files dir&gt;</code>
155 <dd><p>Adds support for named libstdc++ include directory. For instance,
156 the following puts all the libstdc++ headers into a directory
157 called &quot;2.97-20001008&quot; instead of the usual
158 &quot;g++-v3&quot;.
159 <pre>
160 --with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</pre>
161 </p>
163 <dt><code>--enable-cxx-flags=FLAGS</code>
164 <dd><p>With this option, you can pass a string of -f (functionality)
165 flags to the compiler to use when building libstdc++. FLAGS
166 is a quoted string of options, like
167 <pre>
168 --enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</pre>
169 Note that the flags don't necessarily have to all be -f flags,
170 as shown, but usually those are the ones that will make sense
171 for experimentation and configure-time overriding.
172 </p>
173 <p>The advantage of --enable-cxx-flags over setting CXXFLAGS in
174 the 'make' environment is that, if files are automatically
175 rebuilt, the same flags will be used when compiling those files
176 as well, so that everything matches.
177 </p>
178 <p>Fun flags to try might include combinations of
179 <pre>
180 -fstrict-aliasing
181 -fno-exceptions
182 -ffunction-sections
183 -fvtable-gc</pre>
184 and opposite forms (-fno-) of the same. Tell us (the libstdc++
185 mailing list) if you discover more!
186 </p>
188 <dt><code>--enable-c-mbchar </code>[default]
189 <dd><p>Certain template specializations are required for wide
190 character conversion support. This is tricky and currently
191 changing rapidly, and can cause problems on new platforms.
192 Disabling wide character specializations is useful for initial
193 porting steps, but builds only a subset of what is required by
194 ISO. By default, this option is on.
195 </p>
197 <dt><code>--enable-concept-checks </code>
198 <dd><p>This turns on additional compile-time checks for instantiated
199 library templates, in the form of specialized templates,
200 <a href="19_diagnostics/howto.html#3">described here</a>. They
201 can help users discover when they break the rules of the STL, before
202 their programs run.
203 </p>
205 <dt><code>--enable-symvers[=style] </code>
206 <dd><p>In 3.1, tries to turn on symbol versioning in the shared library (if a
207 shared library has been requested). The only 'style' currently
208 supported is 'gnu' which requires that a recent version of the GNU
209 linker be in use. With no style given, the configure script will
210 try to guess if the 'gnu' style can be used, and if so, will turn it
211 on. Hopefully people will volunteer to do other 'style' options.
212 </p>
213 </dl>
214 </p>
215 <p>Return <a href="#top">to the top of the page</a> or
216 <a href="http://gcc.gnu.org/libstdc++/">to the libstdc++ homepage</a>.
217 </p>
220 <!-- ####################################################### -->
222 <hr>
223 <p class="fineprint"><em>
224 See <a href="17_intro/license.html">license.html</a> for copying conditions.
225 Comments and suggestions are welcome, and may be sent to
226 <a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
227 </em></p>
230 </body>
231 </html>