11debfc3dSmrg<section xmlns="http://docbook.org/ns/docbook" version="5.0" 21debfc3dSmrg xml:id="manual.intro.setup.configure" xreflabel="Configuring"> 31debfc3dSmrg<?dbhtml filename="configure.html"?> 41debfc3dSmrg 51debfc3dSmrg<info><title>Configure</title> 61debfc3dSmrg <keywordset> 71debfc3dSmrg <keyword>ISO C++</keyword> 81debfc3dSmrg <keyword>configure</keyword> 91debfc3dSmrg <keyword>options</keyword> 101debfc3dSmrg </keywordset> 111debfc3dSmrg</info> 121debfc3dSmrg 131debfc3dSmrg 141debfc3dSmrg 151debfc3dSmrg<para> 161debfc3dSmrg When configuring libstdc++, you'll have to configure the entire 171debfc3dSmrg <emphasis>gccsrcdir</emphasis> directory. Consider using the 181debfc3dSmrg toplevel gcc configuration option 191debfc3dSmrg <literal>--enable-languages=c++</literal>, which saves time by only 201debfc3dSmrg building the C++ toolchain. 211debfc3dSmrg</para> 221debfc3dSmrg 231debfc3dSmrg<para> 241debfc3dSmrg Here are all of the configure options specific to libstdc++. Keep 251debfc3dSmrg in mind that 261debfc3dSmrg <!-- This SECnn should be the "Choosing Package Options" section. --> 271debfc3dSmrg <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://sourceware.org/autobook/autobook/autobook_14.html">they 281debfc3dSmrg all have opposite forms as well</link> (enable/disable and 291debfc3dSmrg with/without). The defaults are for the <emphasis>current 301debfc3dSmrg development sources</emphasis>, which may be different than those 311debfc3dSmrg for released versions. 321debfc3dSmrg</para> 331debfc3dSmrg<para>The canonical way to find out the configure options that are 341debfc3dSmrg available for a given set of libstdc++ sources is to go to the 351debfc3dSmrg source directory and then type: <command>./configure --help</command>. 361debfc3dSmrg</para> 371debfc3dSmrg 381debfc3dSmrg<variablelist> 391debfc3dSmrg <varlistentry><term><code>--enable-multilib</code>[default]</term> 401debfc3dSmrg <listitem><para>This is part of the generic multilib support for building cross 411debfc3dSmrg compilers. As such, targets like "powerpc-elf" will have 421debfc3dSmrg libstdc++ built many different ways: "-msoft-float" 431debfc3dSmrg and not, etc. A different libstdc++ will be built for each of 441debfc3dSmrg the different multilib versions. This option is on by default. 451debfc3dSmrg </para> 461debfc3dSmrg </listitem></varlistentry> 471debfc3dSmrg 481debfc3dSmrg <varlistentry><term><code>--enable-version-specific-runtime-libs</code></term> 491debfc3dSmrg <listitem><para>Specify that run-time libraries should be installed in the 501debfc3dSmrg compiler-specific subdirectory (i.e., 511debfc3dSmrg <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>) 521debfc3dSmrg instead of <code>${libdir}</code>. This option is useful if you 531debfc3dSmrg intend to use several versions of gcc in parallel. In addition, 541debfc3dSmrg libstdc++'s include files will be installed in 551debfc3dSmrg <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>, 561debfc3dSmrg unless you also specify 571debfc3dSmrg <literal>--with-gxx-include-dir=</literal><filename class="directory">dirname</filename> during configuration. 581debfc3dSmrg </para> 591debfc3dSmrg </listitem></varlistentry> 601debfc3dSmrg 611debfc3dSmrg <varlistentry><term><code>--with-gxx-include-dir=<include-files dir></code></term> 621debfc3dSmrg <listitem><para>Adds support for named libstdc++ include directory. For instance, 631debfc3dSmrg the following puts all the libstdc++ headers into a directory 641debfc3dSmrg called "4.4-20090404" instead of the usual 651debfc3dSmrg "c++/(version)". 661debfc3dSmrg </para> 671debfc3dSmrg <programlisting> 681debfc3dSmrg --with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/4.4-20090404</programlisting> </listitem></varlistentry> 691debfc3dSmrg 701debfc3dSmrg <varlistentry><term><code>--enable-cstdio</code></term> 711debfc3dSmrg <listitem><para>This is an abbreviated form of <code>'--enable-cstdio=stdio'</code> 721debfc3dSmrg (described next). 731debfc3dSmrg </para> 741debfc3dSmrg </listitem></varlistentry> 751debfc3dSmrg 761debfc3dSmrg <varlistentry><term><code>--enable-cstdio=OPTION</code></term> 771debfc3dSmrg <listitem><para>Select a target-specific I/O package. At the moment, the only 781debfc3dSmrg choice is to use 'stdio', a generic "C" abstraction. 791debfc3dSmrg The default is 'stdio'. This option can change the library ABI. 801debfc3dSmrg </para> 811debfc3dSmrg </listitem></varlistentry> 821debfc3dSmrg 831debfc3dSmrg <varlistentry><term><code>--enable-clocale</code></term> 841debfc3dSmrg <listitem><para>This is an abbreviated form of <code>'--enable-clocale=generic'</code> 851debfc3dSmrg (described next). 861debfc3dSmrg </para> 871debfc3dSmrg </listitem></varlistentry> 881debfc3dSmrg 891debfc3dSmrg <varlistentry><term><code>--enable-clocale=OPTION</code></term> 901debfc3dSmrg <listitem><para>Select a target-specific underlying locale package. The 911debfc3dSmrg choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix 921debfc3dSmrg (IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets, 931debfc3dSmrg 'gnu' to specify a model based on functionality from the GNU C 941debfc3dSmrg library (langinfo/iconv/gettext) (from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.gnu.org/software/libc/">glibc</link>, the GNU C 951debfc3dSmrg library), 'generic' to use a generic "C" abstraction which consists 961debfc3dSmrg of "C" locale info, 'newlib' to specify the Newlib C library model 971debfc3dSmrg which only differs from the 'generic' model in the handling of 981debfc3dSmrg ctype, or 'darwin' which omits the <type>wchar_t</type> specializations 991debfc3dSmrg needed by the 'generic' model. 1001debfc3dSmrg </para> 1011debfc3dSmrg 1021debfc3dSmrg <para>If not explicitly specified, the configure process tries 1031debfc3dSmrg to guess the most suitable package from the choices above. The 1041debfc3dSmrg default is 'generic'. On glibc-based systems of sufficient 1051debfc3dSmrg vintage (2.3 and newer), 'gnu' is automatically selected. On newlib-based 1061debfc3dSmrg systems (<code>'--with_newlib=yes'</code>) and OpenBSD, 'newlib' is 1071debfc3dSmrg automatically selected. On Mac OS X 'darwin' is automatically selected. 1081debfc3dSmrg This option can change the library ABI. 1091debfc3dSmrg </para> 1101debfc3dSmrg </listitem></varlistentry> 1111debfc3dSmrg 1121debfc3dSmrg <varlistentry><term><code>--enable-libstdcxx-allocator</code></term> 1131debfc3dSmrg <listitem><para>This is an abbreviated form of 1141debfc3dSmrg <code>'--enable-libstdcxx-allocator=auto'</code> (described 1151debfc3dSmrg next). 1161debfc3dSmrg </para> 1171debfc3dSmrg </listitem></varlistentry> 1181debfc3dSmrg 1191debfc3dSmrg <varlistentry><term><code>--enable-libstdcxx-allocator=OPTION </code></term> 1201debfc3dSmrg <listitem><para>Select a target-specific underlying std::allocator. The 1211debfc3dSmrg choices are 'new' to specify a wrapper for new, 'malloc' to 1221debfc3dSmrg specify a wrapper for malloc, 'mt' for a fixed power of two allocator, 1231debfc3dSmrg 'pool' for the SGI pooled allocator or 'bitmap' for a bitmap allocator. 1241debfc3dSmrg See this page for more information on allocator 1251debfc3dSmrg <link linkend="allocator.ext">extensions</link>. This option 1261debfc3dSmrg can change the library ABI. 1271debfc3dSmrg </para> 1281debfc3dSmrg </listitem></varlistentry> 1291debfc3dSmrg 1301debfc3dSmrg <varlistentry><term><code>--enable-cheaders=OPTION</code></term> 1311debfc3dSmrg <listitem><para>This allows the user to define the approach taken for C header 1321debfc3dSmrg compatibility with C++. Options are c, c_std, and c_global. 1331debfc3dSmrg These correspond to the source directory's include/c, 1341debfc3dSmrg include/c_std, and include/c_global, and may also include 1351debfc3dSmrg include/c_compatibility. The default is 'c_global'. 1361debfc3dSmrg </para> 1371debfc3dSmrg </listitem></varlistentry> 1381debfc3dSmrg 1391debfc3dSmrg <varlistentry><term><code>--enable-threads</code></term> 1401debfc3dSmrg <listitem><para>This is an abbreviated form of <code>'--enable-threads=yes'</code> 1411debfc3dSmrg (described next). 1421debfc3dSmrg </para> 1431debfc3dSmrg </listitem></varlistentry> 1441debfc3dSmrg 1451debfc3dSmrg <varlistentry><term><code>--enable-threads=OPTION</code></term> 1461debfc3dSmrg <listitem><para>Select a threading library. A full description is 1471debfc3dSmrg given in the 1481debfc3dSmrg general <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/install/configure.html">compiler 1491debfc3dSmrg configuration instructions</link>. This option can change the 1501debfc3dSmrg library ABI. 1511debfc3dSmrg </para> 1521debfc3dSmrg </listitem></varlistentry> 1531debfc3dSmrg 1541debfc3dSmrg <varlistentry><term><code>--enable-libstdcxx-threads</code></term> 1551debfc3dSmrg <listitem><para>Enable C++11 threads support. If not explicitly specified, 1561debfc3dSmrg the configure process enables it if possible. This 1571debfc3dSmrg option can change the library ABI. 1581debfc3dSmrg </para> 1591debfc3dSmrg </listitem></varlistentry> 1601debfc3dSmrg 1611debfc3dSmrg <varlistentry><term><code>--enable-libstdcxx-time</code></term> 1621debfc3dSmrg <listitem><para>This is an abbreviated form of 1631debfc3dSmrg <code>'--enable-libstdcxx-time=yes'</code>(described next). 1641debfc3dSmrg </para> 1651debfc3dSmrg </listitem></varlistentry> 1661debfc3dSmrg 1671debfc3dSmrg <varlistentry><term><code>--enable-libstdcxx-time=OPTION</code></term> 1681debfc3dSmrg <listitem><para>Enables link-type checks for the availability of the 169*8feb0f0bSmrg <function>clock_gettime</function> clocks, used in the implementation 170*8feb0f0bSmrg of [time.clock], and of the <function>nanosleep</function> and 171*8feb0f0bSmrg <function>sched_yield</function> functions, used in the 1721debfc3dSmrg implementation of [thread.thread.this] of the 2011 ISO C++ standard. 1731debfc3dSmrg The choice OPTION=yes checks for the availability of the facilities 1741debfc3dSmrg in libc and libposix4. In case it's needed the latter is also linked 175*8feb0f0bSmrg to libstdc++ as part of the build process. OPTION=rt also checks in 176*8feb0f0bSmrg librt (and, if it's needed, links to it). Note that linking to librt 177*8feb0f0bSmrg is not always desirable because for glibc it requires linking to 178*8feb0f0bSmrg libpthread too, which causes all reference counting to use atomic 179*8feb0f0bSmrg operations, resulting in a potentially large overhead for 180*8feb0f0bSmrg single-threaded programs. OPTION=no skips the tests completely. 1811debfc3dSmrg The default is OPTION=auto, which skips the checks and enables the 1821debfc3dSmrg features only for targets known to support them. 183*8feb0f0bSmrg For Linux targets, if <function>clock_gettime</function> is not used 184*8feb0f0bSmrg then the [time.clock] implementation will use a system call to access 185*8feb0f0bSmrg the realtime and monotonic clocks, which is significantly slower than 186*8feb0f0bSmrg the C library's <function>clock_gettime</function> function. 1871debfc3dSmrg </para> 1881debfc3dSmrg </listitem></varlistentry> 1891debfc3dSmrg 1901debfc3dSmrg <varlistentry><term><code>--enable-libstdcxx-debug</code></term> 1911debfc3dSmrg <listitem><para>Build separate debug libraries in addition to what is normally built. 1921debfc3dSmrg By default, the debug libraries are compiled with 1931debfc3dSmrg <code> CXXFLAGS='-g3 -O0 -fno-inline'</code> 1941debfc3dSmrg , are installed in <code>${libdir}/debug</code>, and have the 1951debfc3dSmrg same names and versioning information as the non-debug 1961debfc3dSmrg libraries. This option is off by default. 1971debfc3dSmrg </para> 1981debfc3dSmrg <para>Note this make command, executed in 1991debfc3dSmrg the build directory, will do much the same thing, without the 2001debfc3dSmrg configuration difference and without building everything twice: 2011debfc3dSmrg <code>make CXXFLAGS='-g3 -O0 -fno-inline' all</code> 2021debfc3dSmrg </para> 2031debfc3dSmrg </listitem></varlistentry> 2041debfc3dSmrg 2051debfc3dSmrg <varlistentry><term><code>--enable-libstdcxx-debug-flags=FLAGS</code></term> 2061debfc3dSmrg 207*8feb0f0bSmrg <listitem><para>This option is only valid when 208*8feb0f0bSmrg <code>--enable-libstdcxx-debug</code> 2091debfc3dSmrg is also specified, and applies to the debug builds only. With 2101debfc3dSmrg this option, you can pass a specific string of flags to the 2111debfc3dSmrg compiler to use when building the debug versions of libstdc++. 2121debfc3dSmrg FLAGS is a quoted string of options, like 2131debfc3dSmrg </para> 2141debfc3dSmrg <programlisting> 2151debfc3dSmrg --enable-libstdcxx-debug-flags='-g3 -O1 -fno-inline'</programlisting> 2161debfc3dSmrg </listitem></varlistentry> 2171debfc3dSmrg 2181debfc3dSmrg <varlistentry><term><code>--enable-cxx-flags=FLAGS</code></term> 2191debfc3dSmrg <listitem><para>With this option, you can pass a string of -f (functionality) 2201debfc3dSmrg flags to the compiler to use when building libstdc++. This 2211debfc3dSmrg option can change the library ABI. FLAGS is a quoted string of 2221debfc3dSmrg options, like 2231debfc3dSmrg </para> 2241debfc3dSmrg <programlisting> 2251debfc3dSmrg --enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</programlisting> 2261debfc3dSmrg <para> 2271debfc3dSmrg Note that the flags don't necessarily have to all be -f flags, 2281debfc3dSmrg as shown, but usually those are the ones that will make sense 2291debfc3dSmrg for experimentation and configure-time overriding. 2301debfc3dSmrg </para> 2311debfc3dSmrg <para>The advantage of --enable-cxx-flags over setting CXXFLAGS in 2321debfc3dSmrg the 'make' environment is that, if files are automatically 2331debfc3dSmrg rebuilt, the same flags will be used when compiling those files 2341debfc3dSmrg as well, so that everything matches. 2351debfc3dSmrg </para> 2361debfc3dSmrg <para>Fun flags to try might include combinations of 2371debfc3dSmrg </para> 2381debfc3dSmrg <programlisting> 2391debfc3dSmrg -fstrict-aliasing 2401debfc3dSmrg -fno-exceptions 2411debfc3dSmrg -ffunction-sections 2421debfc3dSmrg -fvtable-gc</programlisting> 2431debfc3dSmrg <para>and opposite forms (-fno-) of the same. Tell us (the libstdc++ 2441debfc3dSmrg mailing list) if you discover more! 2451debfc3dSmrg </para> 2461debfc3dSmrg </listitem></varlistentry> 2471debfc3dSmrg 2481debfc3dSmrg <varlistentry><term><code>--enable-c99</code></term> 2491debfc3dSmrg <listitem><para>The <type>long long</type> type was introduced in C99, along 2501debfc3dSmrg with many other functions for wide characters, and math 2511debfc3dSmrg classification macros, etc. If enabled, all C99 functions not 2521debfc3dSmrg specified by the C++ standard will be put into <code>namespace 2531debfc3dSmrg __gnu_cxx</code>, and then all these names will 2541debfc3dSmrg be injected into namespace std, so that C99 functions can be 2551debfc3dSmrg used "as if" they were in the C++ standard (as they 2561debfc3dSmrg will eventually be in some future revision of the standard, 2571debfc3dSmrg without a doubt). By default, C99 support is on, assuming the 2581debfc3dSmrg configure probes find all the necessary functions and bits 2591debfc3dSmrg necessary. This option can change the library ABI. 2601debfc3dSmrg </para> 2611debfc3dSmrg </listitem></varlistentry> 2621debfc3dSmrg 2631debfc3dSmrg <varlistentry><term><code>--enable-wchar_t</code>[default]</term> 2641debfc3dSmrg <listitem><para>Template specializations for the <type>wchar_t</type> type are 2651debfc3dSmrg required for wide character conversion support. Disabling 2661debfc3dSmrg wide character specializations may be expedient for initial 2671debfc3dSmrg porting efforts, but builds only a subset of what is required by 2681debfc3dSmrg ISO, and is not recommended. By default, this option is on. 2691debfc3dSmrg This option can change the library ABI. 2701debfc3dSmrg </para> 2711debfc3dSmrg </listitem></varlistentry> 2721debfc3dSmrg 2731debfc3dSmrg <varlistentry><term><code>--enable-long-long </code></term> 2741debfc3dSmrg <listitem><para>The <type>long long</type> type was introduced in C99. It is 2751debfc3dSmrg provided as a GNU extension to C++98 in g++. This flag builds 2761debfc3dSmrg support for "long long" into the library (specialized 2771debfc3dSmrg templates and the like for iostreams). This option is on by default: 2781debfc3dSmrg if enabled, users will have to either use the new-style "C" 2791debfc3dSmrg headers by default (i.e., <cmath> not <math.h>) 2801debfc3dSmrg or add appropriate compile-time flags to all compile lines to 2811debfc3dSmrg allow "C" visibility of this feature (on GNU/Linux, 2821debfc3dSmrg the flag is -D_ISOC99_SOURCE, which is added automatically via 2831debfc3dSmrg CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE). 2841debfc3dSmrg This option can change the library ABI. 2851debfc3dSmrg </para> 2861debfc3dSmrg </listitem></varlistentry> 2871debfc3dSmrg 2881debfc3dSmrg <varlistentry><term><code>--enable-fully-dynamic-string</code></term> 2891debfc3dSmrg <listitem><para>This option enables a special version of basic_string avoiding 2901debfc3dSmrg the optimization that allocates empty objects in static memory. 2911debfc3dSmrg Mostly useful together with shared memory allocators, see PR 2921debfc3dSmrg libstdc++/16612 for details. 2931debfc3dSmrg </para> 2941debfc3dSmrg </listitem></varlistentry> 2951debfc3dSmrg 2961debfc3dSmrg <varlistentry><term><code>--enable-concept-checks</code></term> 2971debfc3dSmrg <listitem><para>This turns on additional compile-time checks for instantiated 2981debfc3dSmrg library templates, in the form of specialized templates described in 2991debfc3dSmrg the <link linkend="std.diagnostics.concept_checking">Concept 3001debfc3dSmrg Checking</link> section. They 3011debfc3dSmrg can help users discover when they break the rules of the STL, before 3021debfc3dSmrg their programs run. These checks are based on C++03 rules and some of 3031debfc3dSmrg them are not compatible with correct C++11 code. 3041debfc3dSmrg </para> 3051debfc3dSmrg </listitem></varlistentry> 3061debfc3dSmrg 3071debfc3dSmrg <varlistentry><term><code>--enable-symvers[=style]</code></term> 3081debfc3dSmrg 3091debfc3dSmrg <listitem><para>In 3.1 and later, tries to turn on symbol versioning in the 3101debfc3dSmrg shared library (if a shared library has been 3111debfc3dSmrg requested). Values for 'style' that are currently supported 3121debfc3dSmrg are 'gnu', 'gnu-versioned-namespace', 'darwin', 3131debfc3dSmrg 'darwin-export', and 'sun'. Both gnu- options require that a recent 3141debfc3dSmrg version of the GNU linker be in use. Both darwin options are 3151debfc3dSmrg equivalent. With no style given, the configure script will try 3161debfc3dSmrg to guess correct defaults for the host system, probe to see if 3171debfc3dSmrg additional requirements are necessary and present for 3181debfc3dSmrg activation, and if so, will turn symbol versioning on. This 3191debfc3dSmrg option can change the library ABI. 3201debfc3dSmrg </para> 3211debfc3dSmrg 3221debfc3dSmrg </listitem></varlistentry> 3231debfc3dSmrg 3241debfc3dSmrg <varlistentry><term><code>--enable-libstdcxx-visibility</code></term> 3251debfc3dSmrg <listitem><para> In 4.2 and later, enables or disables visibility 3261debfc3dSmrg attributes. If enabled (as by default), and the compiler seems 3271debfc3dSmrg capable of passing the simple sanity checks thrown at it, adjusts 3281debfc3dSmrg items in namespace std, namespace std::tr1, namespace std::tr2, 3291debfc3dSmrg and namespace __gnu_cxx to have <code>visibility ("default")</code> 3301debfc3dSmrg so that -fvisibility options can be used without affecting the 3311debfc3dSmrg normal external-visibility of namespace std entities. 3321debfc3dSmrg Prior to 4.7 this option was spelled <code>--enable-visibility</code>. 3331debfc3dSmrg </para> 3341debfc3dSmrg </listitem></varlistentry> 3351debfc3dSmrg 3361debfc3dSmrg <varlistentry><term><code>--enable-libstdcxx-pch</code></term> 3371debfc3dSmrg <listitem><para>In 3.4 and later, tries to turn on the generation of 3381debfc3dSmrg stdc++.h.gch, a pre-compiled file including all the standard 3391debfc3dSmrg C++ includes. If enabled (as by default), and the compiler 3401debfc3dSmrg seems capable of passing the simple sanity checks thrown at 3411debfc3dSmrg it, try to build stdc++.h.gch as part of the make process. 3421debfc3dSmrg In addition, this generated file is used later on (by appending <code> 3431debfc3dSmrg --include bits/stdc++.h </code> to CXXFLAGS) when running the 3441debfc3dSmrg testsuite. 3451debfc3dSmrg </para> 3461debfc3dSmrg </listitem></varlistentry> 3471debfc3dSmrg 3481debfc3dSmrg 3491debfc3dSmrg <varlistentry><term><code>--enable-extern-template</code>[default]</term> 3501debfc3dSmrg <listitem><para>Use extern template to pre-instantiate all required 3511debfc3dSmrg specializations for certain types defined in the standard libraries. 3521debfc3dSmrg These types include <classname>string</classname> and dependents like 3531debfc3dSmrg <classname>char_traits</classname>, the templatized IO classes, 3541debfc3dSmrg <classname>allocator</classname>, and others. 3551debfc3dSmrg Disabling means that implicit 3561debfc3dSmrg template generation will be used when compiling these types. By 3571debfc3dSmrg default, this option is on. This option can change the library ABI. 3581debfc3dSmrg </para> 3591debfc3dSmrg </listitem></varlistentry> 3601debfc3dSmrg 3611debfc3dSmrg <varlistentry><term><code>--disable-hosted-libstdcxx</code></term> 3621debfc3dSmrg <listitem> 3631debfc3dSmrg <para> 3641debfc3dSmrg By default, a complete <emphasis>hosted</emphasis> C++ library is 3651debfc3dSmrg built. The C++ Standard also describes a 3661debfc3dSmrg <emphasis>freestanding</emphasis> environment, in which only a 3671debfc3dSmrg minimal set of headers are provided. This option builds such an 3681debfc3dSmrg environment. 3691debfc3dSmrg </para> 3701debfc3dSmrg </listitem></varlistentry> 3711debfc3dSmrg 3721debfc3dSmrg<varlistentry><term><code>--disable-libstdcxx-verbose</code></term> 3731debfc3dSmrg <listitem> 3741debfc3dSmrg <para> 3751debfc3dSmrg By default, the library is configured to write descriptive messages 3761debfc3dSmrg to standard error for certain events such as calling a pure virtual 3771debfc3dSmrg function or the invocation of the standard terminate handler. Those 3781debfc3dSmrg messages cause the library to depend on the demangler and standard I/O 3791debfc3dSmrg facilities, which might be undesirable in a low-memory environment or 3801debfc3dSmrg when standard error is not available. This option disables those 3811debfc3dSmrg messages. This option does not change the library ABI. 3821debfc3dSmrg </para> 3831debfc3dSmrg </listitem></varlistentry> 3841debfc3dSmrg 3851debfc3dSmrg<varlistentry><term><code>--disable-libstdcxx-dual-abi</code></term> 3861debfc3dSmrg <listitem> 3871debfc3dSmrg <para> 3881debfc3dSmrg Disable support for the new, C++11-conforming implementations of 3891debfc3dSmrg <code>std::string</code>, <code>std::list</code> etc. so that the 3901debfc3dSmrg library only provides definitions of types using the old ABI 3911debfc3dSmrg (see <xref linkend="manual.intro.using.abi"/>). 3921debfc3dSmrg This option changes the library ABI. 3931debfc3dSmrg </para> 3941debfc3dSmrg </listitem></varlistentry> 3951debfc3dSmrg 3961debfc3dSmrg<varlistentry><term><code>--with-default-libstdcxx-abi=</code><replaceable>OPTION</replaceable></term> 3971debfc3dSmrg <listitem> 3981debfc3dSmrg <para> 3991debfc3dSmrg Set the default value for the <symbol>_GLIBCXX_USE_CXX11_ABI</symbol> 4001debfc3dSmrg macro (see <xref linkend="manual.intro.using.macros"/>). 4011debfc3dSmrg The default is <option>OPTION=new</option> which sets the macro to 4021debfc3dSmrg <literal>1</literal>, 4031debfc3dSmrg use <option>OPTION=gcc4-compatible</option> to set it to 4041debfc3dSmrg <literal>0</literal>. 4051debfc3dSmrg This option does not change the library ABI. 4061debfc3dSmrg </para> 4071debfc3dSmrg </listitem></varlistentry> 4081debfc3dSmrg 409c0a68be4Smrg <varlistentry><term><code>--with-libstdcxx-lock-policy=OPTION</code></term> 410c0a68be4Smrg <listitem><para>Sets the lock policy that controls how 411c0a68be4Smrg <classname>shared_ptr</classname> reference counting is 412c0a68be4Smrg synchronized. 413c0a68be4Smrg The choice OPTION=atomic enables use of atomics for updates to 414c0a68be4Smrg <classname>shared_ptr</classname> reference counts. 415c0a68be4Smrg The choice OPTION=mutex enables use of a mutex to synchronize updates 416c0a68be4Smrg to <classname>shared_ptr</classname> reference counts. 417c0a68be4Smrg If the compiler's thread model is "single" then this option has no 418c0a68be4Smrg effect, as no synchronization is used for the reference counts. 419c0a68be4Smrg The default is OPTION=auto, which checks for the availability of 420c0a68be4Smrg compiler built-ins for 2-byte and 4-byte atomic compare-and-swap, 421c0a68be4Smrg and uses OPTION=atomic if they're available, OPTION=mutex otherwise. 422c0a68be4Smrg This option can change the library ABI. 423c0a68be4Smrg If the library is configured to use atomics and user programs are 424c0a68be4Smrg compiled using a target that doesn't natively support the atomic 425c0a68be4Smrg operations (e.g. the library is configured for armv7 and then code 426c0a68be4Smrg is compiled with <option>-march=armv5t</option>) then the program 427c0a68be4Smrg might rely on support in libgcc to provide the atomics. 428c0a68be4Smrg </para> 429c0a68be4Smrg </listitem></varlistentry> 430c0a68be4Smrg 4311debfc3dSmrg <varlistentry><term><code>--enable-vtable-verify</code>[default]</term> 4321debfc3dSmrg <listitem> 4331debfc3dSmrg <para>Use <code>-fvtable-verify=std</code> to compile the C++ 4341debfc3dSmrg runtime with instrumentation for vtable verification. All virtual 4351debfc3dSmrg functions in the standard library will be verified at runtime. 4361debfc3dSmrg Types impacted include <classname>locale</classname> and 4371debfc3dSmrg <classname>iostream</classname>, and others. Disabling means that 4381debfc3dSmrg the C++ runtime is compiled without support for vtable 4391debfc3dSmrg verification. By default, this option is off. 4401debfc3dSmrg </para> 4411debfc3dSmrg </listitem></varlistentry> 4421debfc3dSmrg 4431debfc3dSmrg <varlistentry><term><code>--enable-libstdcxx-filesystem-ts</code>[default]</term> 4441debfc3dSmrg <listitem> 4451debfc3dSmrg <para>Build <filename class="libraryfile">libstdc++fs.a</filename> as well 4461debfc3dSmrg as the usual libstdc++ and libsupc++ libraries. This is enabled by 4471debfc3dSmrg default on select POSIX targets where it is known to work and disabled 4481debfc3dSmrg otherwise. 4491debfc3dSmrg </para> 4501debfc3dSmrg </listitem></varlistentry> 4511debfc3dSmrg 4521debfc3dSmrg</variablelist> 4531debfc3dSmrg 4541debfc3dSmrg</section> 455