]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libstdc++-v3/contrib/libstdc++-v3-4.3.3/doc/xml/manual/configure.xml
update
[l4.git] / l4 / pkg / libstdc++-v3 / contrib / libstdc++-v3-4.3.3 / doc / xml / manual / configure.xml
1 <sect1 id="manual.intro.setup.configure" xreflabel="Configuring">
2 <?dbhtml filename="configure.html"?>
3  
4 <sect1info>
5   <keywordset>
6     <keyword>
7       ISO C++
8     </keyword>
9     <keyword>
10       configure
11     </keyword>
12     <keyword>
13       options
14     </keyword>
15   </keywordset>
16 </sect1info>
17
18 <title>Configure</title>
19
20 <para>
21   Here are some of the non-obvious options to libstdc++'s configure.
22   Keep in mind that
23    <!-- This SECnn should be the "Choosing Package Options" section. -->
24    <ulink url="http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_131.html#SEC131">they
25    all have opposite forms as well</ulink>
26    (enable/disable and with/without).  The defaults are for <emphasis>current
27    development sources</emphasis>, which may be different than those for
28    released versions.
29 </para>
30 <para>The canonical way to find out the configure options that are
31    available for a given set of libstdc++ sources is to go to the
32    source directory and then type:<code>  ./configure --help</code>
33 </para>
34
35 <variablelist>
36  <varlistentry><term><code>--enable-multilib</code>[default]</term>
37  <listitem><para>This is part of the generic multilib support for building cross
38         compilers.  As such, targets like &quot;powerpc-elf&quot; will have
39         libstdc++ built many different ways:  &quot;-msoft-float&quot;
40         and not, etc.  A different libstdc++ will be built for each of
41         the different multilib versions.  This option is on by default.
42      </para>
43  </listitem></varlistentry>
44
45  <varlistentry><term><code>--enable-sjlj-exceptions</code></term>
46  <listitem><para>Forces old, set-jump/long-jump exception handling model.  If
47         at all possible, the new, frame unwinding exception handling routines
48         should be used instead, as they significantly reduce both
49         runtime memory usage and executable size. This option can
50         change the library ABI.
51      </para>
52  </listitem></varlistentry>
53
54  <varlistentry><term><code>--enable-version-specific-runtime-libs</code></term>
55  <listitem><para>Specify that run-time libraries should be installed in the
56         compiler-specific subdirectory (i.e.,
57         <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
58         instead of <code>${libdir}</code>.  This option is useful if you
59         intend to use several versions of gcc in parallel.  In addition,
60         libstdc++'s include files will be installed in
61         <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
62         unless you also specify
63        <literal>--with-gxx-include-dir=<filename class="directory">dirname</filename></literal> during configuration.
64      </para>
65  </listitem></varlistentry>
66
67  <varlistentry><term><code>--with-gxx-include-dir=&lt;include-files dir&gt;</code></term>
68  <listitem><para>Adds support for named libstdc++ include directory.  For instance,
69         the following puts all the libstdc++ headers into a directory
70         called &quot;2.97-20001008&quot; instead of the usual
71         &quot;c++/(version)&quot;.
72      </para>
73         <programlisting>
74    --with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</programlisting> </listitem></varlistentry>
75
76  <varlistentry><term><code>--enable-cstdio</code></term>
77  <listitem><para>This is an abbreviated form of <code>'--enable-cstdio=stdio'</code>
78         (described next). This option can change the library ABI.
79      </para>
80  </listitem></varlistentry>
81
82  <varlistentry><term><code>--enable-cstdio=OPTION</code></term>
83  <listitem><para>Select a target-specific I/O package. At the moment, the only
84         choice is to use 'stdio', a generic &quot;C&quot; abstraction.
85         The default is 'stdio'. 
86      </para>
87  </listitem></varlistentry>
88
89  <varlistentry><term><code>--enable-clocale</code></term>
90  <listitem><para>This is an abbreviated form of <code>'--enable-clocale=generic'</code>
91         (described next). This option can change the library ABI.
92      </para>
93  </listitem></varlistentry>
94
95  <varlistentry><term><code>--enable-clocale=OPTION</code></term>
96  <listitem><para>Select a target-specific underlying locale package.  The
97         choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix
98         (IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets,
99         'gnu' to specify a model based on functionality from the GNU C
100         library (langinfo/iconv/gettext) (from <ulink url="http://sources.redhat.com/glibc/">glibc</ulink>, the GNU C
101         library), or 'generic' to use a generic &quot;C&quot;
102         abstraction which consists of &quot;C&quot; locale info.
103      </para>
104
105      <para>As part of the configuration process, the "C" library is
106       probed both for sufficient vintage, and installed locale
107       data. If either of these elements are not present, the C++
108       locale model default to 'generic.' On glibc-based systems of
109       version 2.2.5 and above with installed locale files, 'gnu' is
110       automatically selected.
111      </para>
112  </listitem></varlistentry>
113
114  <varlistentry><term><code>--enable-libstdcxx-allocator</code></term>
115  <listitem><para>This is an abbreviated form of
116         <code>'--enable-libstdcxx-allocator=auto'</code> (described
117         next). This option can change the library ABI.
118      </para>
119  </listitem></varlistentry>
120
121  <varlistentry><term><code>--enable-libstdcxx-allocator=OPTION  </code></term>
122  <listitem><para>Select a target-specific underlying std::allocator.  The
123         choices are 'new' to specify a wrapper for new, 'malloc' to
124         specify a wrapper for malloc, 'mt' for a fixed power of two allocator
125         (<ulink url="ext/mt_allocator.html">documented</ulink> under extensions),
126         'pool' for the SGI pooled allocator or 'bitmap' for a bitmap allocator.
127         This option can change the library ABI.
128      </para>
129  </listitem></varlistentry>
130
131  <varlistentry><term><code>--enable-cheaders=OPTION</code></term>
132  <listitem><para>This allows the user to define the approach taken for C header
133         compatibility with C++. Options are c, c_std, and c_global.
134         These correspond to the source directory's include/c,
135         include/c_std, and include/c_global, and may also include
136         include/c_compatibility.  The default is c_global.
137      </para>
138  </listitem></varlistentry>
139
140  <varlistentry><term><code>--enable-threads</code></term>
141  <listitem><para>This is an abbreviated form of <code>'--enable-threads=yes'</code>
142         (described next). This option can change the library ABI.
143      </para>
144  </listitem></varlistentry>
145
146  <varlistentry><term><code>--enable-threads=OPTION</code></term>
147  <listitem><para>Select a threading library.  A full description is given in the
148         general <ulink url="http://gcc.gnu.org/install/configure.html">compiler
149         configuration instructions</ulink>.
150      </para>
151  </listitem></varlistentry>
152
153  <varlistentry><term><code>--enable-libstdcxx-debug</code></term>
154  <listitem><para>Build separate debug libraries in addition to what is normally built.
155         By default, the debug libraries are compiled with 
156         <code> CXXFLAGS='-g3 -O0'</code>
157         , are installed in <code>${libdir}/debug</code>, and have the
158         same names and versioning information as the non-debug
159         libraries. This option is off by default.
160      </para>
161      <para>Note this make command, executed in
162         the build directory, will do much the same thing, without the
163         configuration difference and without building everything twice: 
164         <code>make CXXFLAGS='-g3 -O0' all</code>
165      </para>
166  </listitem></varlistentry>
167
168  <varlistentry><term><code>--enable-libstdcxx-debug-flags=FLAGS</code></term>
169
170  <listitem><para>This option is only valid when <code> --enable-debug </code>
171         is also specified, and applies to the debug builds only. With
172         this option, you can pass a specific string of flags to the
173         compiler to use when building the debug versions of libstdc++.
174         FLAGS is a quoted string of options, like
175      </para>
176         <programlisting>
177   --enable-libstdcxx-debug-flags='-g3 -O1 -gdwarf-2'</programlisting>
178  </listitem></varlistentry>
179
180  <varlistentry><term><code>--enable-cxx-flags=FLAGS</code></term>
181  <listitem><para>With this option, you can pass a string of -f (functionality)
182         flags to the compiler to use when building libstdc++. This
183         option can change the library ABI. FLAGS is a quoted string of
184         options, like
185      </para>
186         <programlisting>
187   --enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</programlisting>
188      <para>
189         Note that the flags don't necessarily have to all be -f flags,
190         as shown, but usually those are the ones that will make sense
191         for experimentation and configure-time overriding.
192      </para>
193      <para>The advantage of --enable-cxx-flags over setting CXXFLAGS in
194         the 'make' environment is that, if files are automatically
195         rebuilt, the same flags will be used when compiling those files
196         as well, so that everything matches.
197      </para>
198      <para>Fun flags to try might include combinations of
199      </para>
200         <programlisting>
201   -fstrict-aliasing
202   -fno-exceptions
203   -ffunction-sections
204   -fvtable-gc</programlisting>
205      <para>and opposite forms (-fno-) of the same.  Tell us (the libstdc++
206         mailing list) if you discover more!
207      </para>
208  </listitem></varlistentry>
209
210  <varlistentry><term><code>--enable-c99</code></term>
211  <listitem><para>The &quot;long long&quot; type was introduced in C99, along
212         with many other functions for wide characters, and math
213         classification macros, etc.  If enabled, all C99 functions not
214         specified by the C++ standard will be put into <code>namespace
215         __gnu_cxx</code>, and then all these names will
216         be injected into namespace std, so that C99 functions can be
217         used &quot;as if&quot; they were in the C++ standard (as they
218         will eventually be in some future revision of the standard,
219         without a doubt).  By default, C99 support is on, assuming the
220         configure probes find all the necessary functions and bits
221         necessary. This option can change the library ABI.
222     </para>
223  </listitem></varlistentry>
224
225  <varlistentry><term><code>--enable-wchar_t</code>[default]</term>
226  <listitem><para>Template specializations for the &quot;wchar_t&quot; type are
227         required for wide character conversion support.  Disabling
228         wide character specializations may be expedient for initial
229         porting efforts, but builds only a subset of what is required by
230         ISO, and is not recommended.  By default, this option is on.
231         This option can change the library ABI.
232      </para>
233  </listitem></varlistentry>
234
235  <varlistentry><term><code>--enable-long-long  </code></term>
236  <listitem><para>The &quot;long long&quot; type was introduced in C99.  It is
237         provided as a GNU extension to C++98 in g++.  This flag builds
238         support for &quot;long long&quot; into the library (specialized
239         templates and the like for iostreams).  This option is on by default:
240         if enabled, users will have to either use the new-style &quot;C&quot;
241         headers by default (i.e., &lt;cmath&gt; not &lt;math.h&gt;)
242         or add appropriate compile-time flags to all compile lines to
243         allow &quot;C&quot; visibility of this feature (on GNU/Linux,
244         the flag is -D_ISOC99_SOURCE, which is added automatically via
245         CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE).
246         This option can change the library ABI. 
247      </para>
248  </listitem></varlistentry>
249
250  <varlistentry><term><code>--enable-fully-dynamic-string</code></term>
251  <listitem><para>This option enables a special version of basic_string avoiding
252         the optimization that allocates empty objects in static memory.
253         Mostly useful together with shared memory allocators, see PR
254         libstdc++/16612 for details.
255      </para>
256  </listitem></varlistentry>
257
258  <varlistentry><term><code>--enable-concept-checks</code></term>
259  <listitem><para>This turns on additional compile-time checks for instantiated
260         library templates, in the form of specialized templates,
261         <ulink url="19_diagnostics/howto.html#3">described here</ulink>.  They
262         can help users discover when they break the rules of the STL, before
263         their programs run.
264      </para>
265  </listitem></varlistentry>
266
267  <varlistentry><term><code>--enable-symvers[=style]</code></term>
268
269  <listitem><para>In 3.1 and later, tries to turn on symbol versioning in the
270         shared library (if a shared library has been
271         requested). Values for 'style' that are currently supported
272         are 'gnu', 'gnu-versioned-namespace', 'darwin', and
273         'darwin-export'. Both gnu- options require that a recent
274         version of the GNU linker be in use. Both darwin options are
275         equivalent. With no style given, the configure script will try
276         to guess correct defaults for the host system, probe to see if
277         additional requirements are necessary and present for
278         activation, and if so, will turn symbol versioning on. This
279         option can change the library ABI.
280      </para>
281
282  </listitem></varlistentry>
283
284  <varlistentry><term><code>--enable-visibility</code></term>
285  <listitem><para> In 4.2 and later, enables or disables visibility attributes.
286         If enabled (as by default), and the compiler seems capable of
287         passing the simple sanity checks thrown at it, adjusts items
288         in namespace std, namespace std::tr1, and namespace __gnu_cxx
289         so that -fvisibility options work.
290     </para>
291  </listitem></varlistentry>
292
293  <varlistentry><term><code>--enable-libstdcxx-pch</code></term>
294  <listitem><para>In 3.4 and later, tries to turn on the generation of
295         stdc++.h.gch, a pre-compiled file including all the standard
296         C++ includes. If enabled (as by default), and the compiler
297         seems capable of passing the simple sanity checks thrown at
298         it, try to build stdc++.h.gch as part of the make process. 
299         In addition, this generated file is used later on (by appending <code>
300         --include bits/stdc++.h </code> to CXXFLAGS) when running the
301         testsuite.
302      </para>
303  </listitem></varlistentry>
304
305  <varlistentry><term><code>--disable-hosted-libstdcxx</code></term>
306  <listitem>
307    <para>
308      By default, a complete <emphasis>hosted</emphasis> C++ library is
309      built.  The C++ Standard also describes a
310      <emphasis>freestanding</emphasis> environment, in which only a
311      minimal set of headers are provided.  This option builds such an
312      environment.
313      </para>
314  </listitem></varlistentry>
315 </variablelist>
316
317
318 </sect1>