1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
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.2 2001/01/02 22:52:51 bkoz Exp $ -->
14 <H1 CLASS="centered"><A NAME="top">Interesting <TT>configure</TT>
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>.
22 <P>To the <A HREF="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</A>.
25 <!-- ####################################################### -->
27 <P>Here are some of the non-obvious options to libstdc++'s configure.
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
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>
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 "powerpc-elf" will have
43 libstdc++ built many different ways: "-msoft-float"
44 and not, etc. A different libstdc++ will be built for each of
45 the different multilib versions. This option is on by default.
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
58 <DT><TT>--enable-cstdio </TT>[default]
59 <DD><P>This is an abbreviated form of <TT>'--enable-cstdio=stdio'</TT>
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
67 <A HREF="http://sources.redhat.com/glibc/">glibc</A>, the
68 GNU C library), or 'stdio' to use a generic "C" abstraction.
71 <DT><TT>--enable-long-long </TT>
72 <DD><P>The "long long" type was introduced in C99. It is
73 provided as a GNU extension to C++98 in g++. This flag builds
74 support for "long long" into the library
75 (specialized templates and the like). This option is off by
76 default: if enabled, users will have to either use the
77 new-style "C" headers by default (ie cmath not math.h) or add
78 appropriate compile-time flags to all compile lines to allow
79 "C" visibility of this feature (on gnu-linux, the flag is
83 <DT><TT>--enable-cheaders=OPTION </TT>
84 <DD><P>This allows the user to define what kind of C headers are
85 used. Options are: c, c_std, and c_shadow. These correspond
86 to the source directory's include/c, include/c_std, and
87 include/c_shadow directories.
91 <DT><TT>--enable-threads </TT>
92 <DD><P>This is an abbreviated form of <TT>'--enable-threads=yes'</TT>
96 <DT><TT>--enable-threads=LIB </TT>
97 <DD><P>Select a threading library. As of libstdc++-v3 snapshot 2.91,
99 'yes' for some kind of default (hmmmmm);
100 'decosf1', 'irix', 'mach', 'os2', 'posix'/'pthreads'
102 'solaris', 'win32', 'dce', or 'vxworks' to select the
103 corresponding interface;
104 and 'single', 'no', or 'none' for the null-case,
105 single-threaded library.
107 <P>All of this is currently undergoing a lot of changes. As of
108 2.91, 'single' and 'posix' are the only implemented
109 models. Default is off.
112 <DT><TT>--enable-version-specific-runtime-libs </TT>
113 <DD><P>Specify that run-time libraries should be installed in the
114 compiler-specific subdirectory (i.e.,
115 <TT>$(libdir)/gcc-lib/$(target_alias)/$(gcc_version)</TT>)
116 instead of <TT>$(libdir)</TT>. This option is useful if you
117 intend to use several versions of gcc in parallel. In addition,
118 libstdc++'s include files will be installed in
119 <TT>$(libdir)/gcc-lib/$(target_alias)/$(gcc_version)/include/g++</TT>,
120 unless you also specify
121 <TT>--with-gxx-include-dir=_dirname_</TT> during configuration.
125 <DT><TT>--with-gxx-include-dir=<include-files dir></TT>
126 <DD><P>Adds support for named libstdc++ include directory. For instance,
127 the following puts all the libstdc++ headers into a directory
128 called "2.97-20001008" instead of the usual
131 --with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</PRE>
134 <DT><TT>--enable-cxx-flags=FLAGS</TT>
135 <DD><P>With this option, you can pass a string of -f (functionality)
136 flags to the compiler to use when building libstdc++. FLAGS
137 is a quoted string of options, like
139 --enable-cxx-flags='-fsquangle -fvtable-gc -ansi'</PRE>
140 Note that the flags don't necessarily have to all be -f flags,
141 as shown, but usually those are the ones that will make sense
142 for experimentation and configure-time overriding.
144 <P>The advantage of --enable-cxx-flags over setting CXXFLAGS in
145 the 'make' environment is that, if libgcc is automatically
146 rebuilt, the same flags will be used when compiling those files
147 as well, so that everything matches.
149 <P>Fun flags to try might include combinations of
156 and -fno- forms of the same. Tell us (the mailing list) if
160 <DT><TT>--enable-c-mbchar </TT>[default]
161 <DD><P>Certain template specializations are required for wide
162 character conversion support. This is tricky and currently
163 changing rapidly, and can cause problems on new platforms.
164 Disabling wide character specializations is useful for initial
165 porting steps, but builds only a subset of what is required by
166 ISO. Default is on, but the <TT>--enable-c_stdio=stdio </TT>
167 option currently turns it off.
171 <P>Return <A HREF="#top">to the top of the page</A> or
172 <A HREF="http://gcc.gnu.org/libstdc++/">to the homepage</A>.
176 <!-- ####################################################### -->
179 <P CLASS="fineprint"><EM>
180 $Id: configopts.html,v 1.2 2000/12/21 22:52:51 bkoz Exp $