* config/avr/avr.md ("mcu_enhanced"): New attribute.
[official-gcc.git] / libstdc++-v3 / docs / configopts.html
blobb25b3248c1769747c0302fa359a9d0ff16569982
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2 <HTML>
3 <HEAD>
4 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
5 <META NAME="AUTHOR" CONTENT="pme@sources.redhat.com (Phil Edwards)">
6 <META NAME="KEYWORDS" CONTENT="libstdc++, libstdc++-v3, egcs, g++">
7 <META NAME="DESCRIPTION" CONTENT="Configuration options for libstdc++-v3.">
8 <META NAME="GENERATOR" CONTENT="vi and eight fingers">
9 <TITLE>libstdc++-v3 configure options</TITLE>
10 <LINK REL="home" HREF="http://sources.redhat.com/libstdc++/">
11 <LINK REL=StyleSheet HREF="lib3styles.css">
12 <!-- $Id: configopts.html,v 1.7 2000/08/09 07:33:39 bkoz Exp $ -->
13 </HEAD>
14 <BODY>
16 <H1 CLASS="centered"><A NAME="top">Interesting <TT>configure</TT>
17 options</A></H1>
19 <P>The latest version of this document is always available at
20 <A HREF="http://sources.redhat.com/libstdc++/configopts.html">
21 http://sources.redhat.com/libstdc++/configopts.html</A>.
22 </P>
24 <P>To the <A HREF="index.html">libstdc++-v3 homepage</A>.
27 <!-- ####################################################### -->
28 <HR>
29 <P>Here are some of the non-obvious options to libstdc++'s configure.
30 Keep in mind that
31 <!-- This SECnn should be the "Choosing Package Options" section. -->
32 <A HREF="http://sources.redhat.com/autoconf/autoconf.html#SEC74">they
33 all have opposite forms as well</A>
34 (enable/disable and with/without). The defaults are for the latest
35 snapshot, 2.90.8.
36 <P>
37 The canonical way to find out the configure options that are
38 available for a given set of libstdc++ sources is to go to the
39 source directory and then type: <TT> ./config --help </TT>
41 <DL>
42 <DT><TT>--enable-multilib </TT>[default]
43 <DD><P>This is part of the generic multilib support for building
44 cross compilers. As such, targets like "powerpc-elf" will
45 have libstdc++ built many different ways: "-msoft-float" and
46 not, etc. A different libstdc++ will be built for each of the
47 different multilib versions. This option is on by default.
48 </P>
50 <DT><TT>--enable-debug </TT>
51 <DD><P>The configure script will automatically detect the highest level
52 of optimization that the compiler in use can use (certain
53 versions of g++ will ICE if given the <TT>-O2</TT> option, but
54 this is fixed in later versions of the compiler). This --enable
55 flag will disable all optimizations and instruct the compiler to
56 emit as much extra debugging information as it can, for use
57 inside GDB.
58 </P>
60 <DT><TT>--enable-cstdio </TT>[default]
61 <DD><P>This is an abbreviated form of <TT>'--enable-cstdio=libio'</TT>
62 (described next).
63 </P>
65 <DT><TT>--enable-cstdio=LIB </TT>
66 <DD><P>Select a target-specific I/O package. As of libstdc++-v3
67 snapshot 2.90.8, the choices are 'libio' to specify the GNU
68 I/O package (from
69 <A HREF="http://sources.redhat.com/glibc/">glibc</A>, the
70 GNU C library), or 'wince' to specify the Microsoft Windows CE
71 library. Eventually a generic cstdio interface will be added
72 so that people who want to use libstdc++-v3 with say, the Palm
73 Pilot, will be able to use libstdc++-v3 without libio.
74 </P>
76 <DT><TT>--enable-long-long </TT>
77 <DD><P>The &quot;long long&quot; type was introduced in C99. It is
78 provided as a GNU extension to C++98 in g++. This flag builds
79 support for &quot;long long&quot; into the library (specialized
80 templates and the like).
81 </P>
83 <DT><TT>--enable-namespaces </TT>[default]
84 <DD><P>By default, g++ currently ignores namespace <TT>std</TT> for
85 backwards compatibility. It can be turned on with the
86 <TT> -fhonor-std </TT> flag to the compiler. As of libstdc++-v3
87 snapshot 2.90.8, that flag is passed to g++ when building the
88 library. (In g++ 2.96 and later, this flag is on by default if
89 libstdc++-v3 is used.) The --disable variant will put all std::
90 symbols into the global namespace.
91 </P>
93 <DT><TT>--enable-cshadow-headers </TT>
94 <DD><P>This turns on the code to construct shadowed C headers. Very
95 experimental as of this writing.
96 </P>
98 <DT><TT>--enable-threads </TT>
99 <DD><P>This is an abbreviated form of <TT>'--enable-threads=yes'</TT>
100 (described next).
101 </P>
103 <DT><TT>--enable-threads=LIB </TT>
104 <DD><P>Select a threading library. As of libstdc++-v3 snapshot 2.90.8,
105 the choices are:
106 'yes' for some kind of default (hmmmmm);
107 'decosf1', 'irix', 'mach', 'os2', 'posix'/'pthreads'
108 (same thing),
109 'solaris', 'win32', 'dce', or 'vxworks' to select the
110 corresponding interface;
111 and 'single', 'no', or 'none' for the null-case,
112 single-threaded library.
113 </P>
114 <P>All of this is currently undergoing a lot of changes. As of
115 2.90.8, 'single' and 'posix' are the only implemented models.
116 </P>
118 <DT><TT>--enable-libgcc-rebuild=DIR / --disable-libgcc-rebuild</TT>
119 <DD><P>This is a grueling temporary hack no matter which way you look
120 at it. It's described in <A HREF="gccrebuild.html">its own
121 little page</A>. Note that other --enable flags will
122 interact with this one. In libstdc++-v3 snapshot 2.90.8,
123 this is enabled by default, with DIR set to
124 <TT> '../..' </TT>, so that building the complete GCC sources
125 with libstdc++-v3 in place works transparently. Since then,
126 library sources have been merged into the compiler sources,
127 and this option has been removed.
128 </P>
130 <DT><TT>--enable-cxx-flags=FLAGS</TT>
131 <DD><P>With this option, you can pass a string of -f (functionality)
132 flags to the compiler to use when building libstdc++. FLAGS
133 is a quoted string of options, like
134 <PRE>
135 --enable-cxx-flags='-fsquangle -fvtable-gc -ansi'</PRE>
136 Note that the flags don't necessarily have to all be -f flags,
137 as shown, but usually those are the ones that will make sense
138 for experimentation and configure-time overriding.
139 </P>
140 <P>The advantage of --enable-cxx-flags over setting CXXFLAGS in
141 the 'make' environment is that, if libgcc is automatically
142 rebuilt, the same flags will be used when compiling those files
143 as well, so that everything matches.
144 </P>
145 <P>Fun flags to try might include combinations of
146 <PRE>
147 -fstrict-aliasing
148 -fnew-abi
149 -fnew-exceptions
150 -ffunction-sections
151 -fvtable-gc</PRE>
152 and -fno- forms of the same. Tell us (the mailing list) if
153 you discover more!
154 </P>
156 <DT><TT>--enable-wchar </TT>[default]
157 <DD><P>Certain template specializations are required for wide character
158 conversion support. This is tricky and currently changing rapidly,
159 and can cause problems on new platforms. Disabling wide character
160 specializations is useful for initial porting steps, but builds
161 only a subset of what is required by ISO.
162 </P>
163 </DL>
164 </P>
165 <P>Return <A HREF="#top">to the top of the page</A> or
166 <A HREF="index.html">to the homepage</A>.
167 </P>
170 <!-- ####################################################### -->
172 <HR>
173 <P CLASS="fineprint"><EM>
174 $Id: configopts.html,v 1.7 2000/08/09 07:33:39 bkoz Exp $
175 </EM></P>
178 </BODY>
179 </HTML>