Prepare for libstdc++-2.92.
[gcc.git] / libstdc++-v3 / docs / html / configopts.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2 <HTML>
3 <HEAD>
4 <META NAME="AUTHOR" CONTENT="pme@sources.redhat.com (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 <!-- $Id: configopts.html,v 1.8 2001/04/02 19:00:13 bkoz Exp $ -->
11 </HEAD>
12 <BODY>
13
14 <H1 CLASS="centered"><A NAME="top">Interesting <TT>configure</TT>
15 options</A></H1>
16
17 <P>The latest version of this document is always available at
18 <A HREF="http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html">
19 http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html</A>.
20 </P>
21
22 <P>To the <A HREF="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</A>.
23
24
25 <!-- ####################################################### -->
26 <HR>
27 <P>Here are some of the non-obvious options to libstdc++'s configure.
28 Keep in mind that
29 <!-- This SECnn should be the "Choosing Package Options" section. -->
30 <A HREF="http://sources.redhat.com/autoconf/autoconf.html#SEC74">they
31 all have opposite forms as well</A>
32 (enable/disable and with/without). The defaults are for current
33 development sources.
34 </P>
35 <P>The canonical way to find out the configure options that are
36 available for a given set of libstdc++ sources is to go to the
37 source directory and then type:<TT> ./configure --help</TT>
38
39 <DL>
40 <DT><TT>--enable-multilib </TT>[default]
41 <DD><P>This is part of the generic multilib support for building cross
42 compilers. As such, targets like &quot;powerpc-elf&quot; will have
43 libstdc++ built many different ways: &quot;-msoft-float&quot;
44 and not, etc. A different libstdc++ will be built for each of
45 the different multilib versions. This option is on by default.
46 </P>
47
48 <DT><TT>--enable-debug </TT>
49 <DD><P>The configure script will automatically detect the highest level
50 of optimization that the compiler in use can use (certain
51 versions of g++ will ICE if given the <TT>-O2</TT> option, but
52 this is fixed in later versions of the compiler). This --enable
53 flag will disable all optimizations and instruct the compiler to
54 emit as much extra debugging information as it can, for use
55 inside GDB.
56 </P>
57
58 <DT><TT>--enable-cstdio </TT>
59 <DD><P>This is an abbreviated form of <TT>'--enable-cstdio=stdio'</TT>
60 (described next).
61 </P>
62
63 <DT><TT>--enable-cstdio=LIB </TT>
64 <DD><P>Select a target-specific I/O package. As of libstdc++-v3
65 snapshot 2.91, 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'.
70 </P>
71
72 <DT><TT>--enable-sjlj-exceptions </TT>
73 <DD><P> Forces old, short-jump/long-jump exception handling model. If
74 at all possible, the new, frame unwinding exception handling routines
75 should be used instead, as they significantly reduce both runtime
76 memory usage and executable size.
77 </P>
78
79
80 <DT><TT>--enable-clocale </TT>
81 <DD><P>This is an abbreviated form of <TT>'--enable-clocale=generic'</TT>
82 (described next).
83 </P>
84
85 <DT><TT>--enable-clocale=MODEL </TT> <DD><P>Select a target-specific
86 underlying locale package. The choices are 'gnu' to specify an X/Open
87 (IEEE Std. 1003.1-200x) model based on langinfo/iconv (from <A
88 HREF="http://sources.redhat.com/glibc/">glibc</A>, the GNU C
89 library), or 'generic' to use a generic &quot;C&quot; abstraction
90 which consists of &quot;C&quot; locale info. The default is
91 'generic'.
92 </P>
93
94 <DT><TT>--enable-long-long </TT>
95 <DD><P>The &quot;long long&quot; type was introduced in C99. It is
96 provided as a GNU extension to C++98 in g++. This flag builds
97 support for &quot;long long&quot; into the library
98 (specialized templates and the like). This option is off by
99 default: if enabled, users will have to either use the
100 new-style &quot;C&quot; headers by default (ie cmath not math.h)
101 or add appropriate compile-time flags to all compile lines to
102 allow &quot;C&quot; visibility of this feature (on GNU/Linux,
103 the flag is -D_ISOC99_SOURCE).
104 </P>
105
106 <DT><TT>--enable-cheaders=OPTION </TT>
107 <DD><P>This allows the user to define what kind of C headers are
108 used. Options are: c, c_std, and c_shadow. These correspond
109 to the source directory's include/c, include/c_std, and
110 include/c_shadow directories. The default is c_std.
111 </P>
112
113 <DT><TT>--enable-threads </TT>
114 <DD><P>This is an abbreviated form of <TT>'--enable-threads=yes'</TT>
115 (described next).
116 </P>
117
118 <DT><TT>--enable-threads=LIB </TT>
119 <DD><P>Select a threading library. As of libstdc++-v3 snapshot 2.91,
120 the choices are:
121 'yes' for some kind of default (hmmmmm);
122 'decosf1', 'irix', 'mach', 'os2', 'posix'/'pthreads'
123 (same thing),
124 'solaris', 'win32', 'dce', or 'vxworks' to select the
125 corresponding interface;
126 and 'single', 'no', or 'none' for the null-case,
127 single-threaded library.
128 </P>
129 <P>All of this is currently undergoing a lot of changes. As of
130 2.91, 'single' and 'posix' are the only implemented
131 models. Default is single.
132 </P>
133
134 <DT><TT>--enable-version-specific-runtime-libs </TT>
135 <DD><P>Specify that run-time libraries should be installed in the
136 compiler-specific subdirectory (i.e.,
137 <TT>$(libdir)/gcc-lib/$(target_alias)/$(gcc_version)</TT>)
138 instead of <TT>$(libdir)</TT>. This option is useful if you
139 intend to use several versions of gcc in parallel. In addition,
140 libstdc++'s include files will be installed in
141 <TT>$(libdir)/gcc-lib/$(target_alias)/$(gcc_version)/include/g++</TT>,
142 unless you also specify
143 <TT>--with-gxx-include-dir=_dirname_</TT> during configuration.
144 </P>
145
146 <DT><TT>--with-gxx-include-dir=&lt;include-files dir&gt;</TT>
147 <DD><P>Adds support for named libstdc++ include directory. For instance,
148 the following puts all the libstdc++ headers into a directory
149 called &quot;2.97-20001008&quot; instead of the usual
150 &quot;g++-v3&quot;.
151 <PRE>
152 --with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</PRE>
153 </P>
154
155 <DT><TT>--enable-cxx-flags=FLAGS</TT>
156 <DD><P>With this option, you can pass a string of -f (functionality)
157 flags to the compiler to use when building libstdc++. FLAGS
158 is a quoted string of options, like
159 <PRE>
160 --enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</PRE>
161 Note that the flags don't necessarily have to all be -f flags,
162 as shown, but usually those are the ones that will make sense
163 for experimentation and configure-time overriding.
164 </P>
165 <P>The advantage of --enable-cxx-flags over setting CXXFLAGS in
166 the 'make' environment is that, if files are automatically
167 rebuilt, the same flags will be used when compiling those files
168 as well, so that everything matches.
169 </P>
170 <P>Fun flags to try might include combinations of
171 <PRE>
172 -fstrict-aliasing
173 -fno-exceptions
174 -ffunction-sections
175 -fvtable-gc</PRE>
176 and opposite forms (-fno-) of the same. Tell us (the mailing
177 list) if you discover more!
178 </P>
179
180 <DT><TT>--enable-c-mbchar </TT>[default]
181 <DD><P>Certain template specializations are required for wide
182 character conversion support. This is tricky and currently
183 changing rapidly, and can cause problems on new platforms.
184 Disabling wide character specializations is useful for initial
185 porting steps, but builds only a subset of what is required by
186 ISO. Default is on, but the <TT>--enable-cstdio=stdio </TT>
187 option currently turns it off.
188 </P>
189 </DL>
190 </P>
191 <P>Return <A HREF="#top">to the top of the page</A> or
192 <A HREF="http://gcc.gnu.org/libstdc++/">to the homepage</A>.
193 </P>
194
195
196 <!-- ####################################################### -->
197
198 <HR>
199 <P CLASS="fineprint"><EM>
200 $Id: configopts.html,v 1.8 2001/04/02 19:00:13 bkoz Exp $
201 </EM></P>
202
203
204 </BODY>
205 </HTML>