Home | History | Annotate | Line # | Download | only in INSTALL
configure.html revision 1.1.1.11
      1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      2 <html>
      3 <!-- Copyright (C) 1988-2018 Free Software Foundation, Inc.
      4 
      5 Permission is granted to copy, distribute and/or modify this document
      6 under the terms of the GNU Free Documentation License, Version 1.3 or
      7 any later version published by the Free Software Foundation; with no
      8 Invariant Sections, the Front-Cover texts being (a) (see below), and
      9 with the Back-Cover Texts being (b) (see below).  A copy of the
     10 license is included in the section entitled "GNU
     11 Free Documentation License".
     12 
     13 (a) The FSF's Front-Cover Text is:
     14 
     15 A GNU Manual
     16 
     17 (b) The FSF's Back-Cover Text is:
     18 
     19 You have freedom to copy and modify this GNU Manual, like GNU
     20      software.  Copies published by the Free Software Foundation raise
     21      funds for GNU development. -->
     22 <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
     23 <head>
     24 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     25 <title>Installing GCC</title>
     26 
     27 <meta name="description" content="Installing GCC">
     28 <meta name="keywords" content="Installing GCC">
     29 <meta name="resource-type" content="document">
     30 <meta name="distribution" content="global">
     31 <meta name="Generator" content="makeinfo">
     32 <style type="text/css">
     33 <!--
     34 a.summary-letter {text-decoration: none}
     35 blockquote.indentedblock {margin-right: 0em}
     36 blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
     37 blockquote.smallquotation {font-size: smaller}
     38 div.display {margin-left: 3.2em}
     39 div.example {margin-left: 3.2em}
     40 div.lisp {margin-left: 3.2em}
     41 div.smalldisplay {margin-left: 3.2em}
     42 div.smallexample {margin-left: 3.2em}
     43 div.smalllisp {margin-left: 3.2em}
     44 kbd {font-style: oblique}
     45 pre.display {font-family: inherit}
     46 pre.format {font-family: inherit}
     47 pre.menu-comment {font-family: serif}
     48 pre.menu-preformatted {font-family: serif}
     49 pre.smalldisplay {font-family: inherit; font-size: smaller}
     50 pre.smallexample {font-size: smaller}
     51 pre.smallformat {font-family: inherit; font-size: smaller}
     52 pre.smalllisp {font-size: smaller}
     53 span.nolinebreak {white-space: nowrap}
     54 span.roman {font-family: initial; font-weight: normal}
     55 span.sansserif {font-family: sans-serif; font-weight: normal}
     56 ul.no-bullet {list-style: none}
     57 -->
     58 </style>
     59 
     60 
     61 </head>
     62 
     63 <body lang="en">
     64 <h1 class="settitle" align="center">Installing GCC</h1>
     65 
     66 
     67 
     68 
     69 
     70 
     71 
     72 
     73 
     74 
     75 
     76 
     77 
     78 
     79 
     80 
     81 
     82 
     83 
     84 <a name="index-Configuration"></a>
     85 <a name="index-Installing-GCC_003a-Configuration"></a>
     86 
     87 <p>Like most GNU software, GCC must be configured before it can be built.
     88 This document describes the recommended configuration procedure
     89 for both native and cross targets.
     90 </p>
     91 <p>We use <var>srcdir</var> to refer to the toplevel source directory for
     92 GCC; we use <var>objdir</var> to refer to the toplevel build/object directory.
     93 </p>
     94 <p>If you obtained the sources via SVN, <var>srcdir</var> must refer to the top
     95 <samp>gcc</samp> directory, the one where the <samp>MAINTAINERS</samp> file can be
     96 found, and not its <samp>gcc</samp> subdirectory, otherwise the build will fail.
     97 </p>
     98 <p>If either <var>srcdir</var> or <var>objdir</var> is located on an automounted NFS
     99 file system, the shell&rsquo;s built-in <code>pwd</code> command will return
    100 temporary pathnames.  Using these can lead to various sorts of build
    101 problems.  To avoid this issue, set the <code>PWDCMD</code> environment
    102 variable to an automounter-aware <code>pwd</code> command, e.g.,
    103 <code>pawd</code> or &lsquo;<samp>amq -w</samp>&rsquo;, during the configuration and build
    104 phases.
    105 </p>
    106 <p>First, we <strong>highly</strong> recommend that GCC be built into a
    107 separate directory from the sources which does <strong>not</strong> reside
    108 within the source tree.  This is how we generally build GCC; building
    109 where <var>srcdir</var> == <var>objdir</var> should still work, but doesn&rsquo;t
    110 get extensive testing; building where <var>objdir</var> is a subdirectory
    111 of <var>srcdir</var> is unsupported.
    112 </p>
    113 <p>If you have previously built GCC in the same directory for a
    114 different target machine, do &lsquo;<samp>make distclean</samp>&rsquo; to delete all files
    115 that might be invalid.  One of the files this deletes is <samp>Makefile</samp>;
    116 if &lsquo;<samp>make distclean</samp>&rsquo; complains that <samp>Makefile</samp> does not exist
    117 or issues a message like &ldquo;don&rsquo;t know how to make distclean&rdquo; it probably
    118 means that the directory is already suitably clean.  However, with the
    119 recommended method of building in a separate <var>objdir</var>, you should
    120 simply use a different <var>objdir</var> for each target.
    121 </p>
    122 <p>Second, when configuring a native system, either <code>cc</code> or
    123 <code>gcc</code> must be in your path or you must set <code>CC</code> in
    124 your environment before running configure.  Otherwise the configuration
    125 scripts may fail.
    126 </p>
    127 
    128 <p>To configure GCC:
    129 </p>
    130 <div class="smallexample">
    131 <pre class="smallexample">% mkdir <var>objdir</var>
    132 % cd <var>objdir</var>
    133 % <var>srcdir</var>/configure [<var>options</var>] [<var>target</var>]
    134 </pre></div>
    135 
    136 <a name="Distributor-options"></a>
    137 <h3 class="heading">Distributor options</h3>
    138 
    139 <p>If you will be distributing binary versions of GCC, with modifications
    140 to the source code, you should use the options described in this
    141 section to make clear that your version contains modifications.
    142 </p>
    143 <dl compact="compact">
    144 <dt><code>--with-pkgversion=<var>version</var></code></dt>
    145 <dd><p>Specify a string that identifies your package.  You may wish
    146 to include a build number or build date.  This version string will be
    147 included in the output of <code>gcc --version</code>.  This suffix does
    148 not replace the default version string, only the &lsquo;<samp>GCC</samp>&rsquo; part.
    149 </p>
    150 <p>The default value is &lsquo;<samp>GCC</samp>&rsquo;.
    151 </p>
    152 </dd>
    153 <dt><code>--with-bugurl=<var>url</var></code></dt>
    154 <dd><p>Specify the URL that users should visit if they wish to report a bug.
    155 You are of course welcome to forward bugs reported to you to the FSF,
    156 if you determine that they are not bugs in your modifications.
    157 </p>
    158 <p>The default value refers to the FSF&rsquo;s GCC bug tracker.
    159 </p>
    160 </dd>
    161 </dl>
    162 
    163 <a name="Target-specification"></a>
    164 <h3 class="heading">Target specification</h3>
    165 <ul>
    166 <li> GCC has code to correctly determine the correct value for <var>target</var>
    167 for nearly all native systems.  Therefore, we highly recommend you do
    168 not provide a configure target when configuring a native compiler.
    169 
    170 </li><li> <var>target</var> must be specified as <samp>--target=<var>target</var></samp>
    171 when configuring a cross compiler; examples of valid targets would be
    172 m68k-elf, sh-elf, etc.
    173 
    174 </li><li> Specifying just <var>target</var> instead of <samp>--target=<var>target</var></samp>
    175 implies that the host defaults to <var>target</var>.
    176 </li></ul>
    177 
    178 
    179 <a name="Options-specification"></a>
    180 <h3 class="heading">Options specification</h3>
    181 
    182 <p>Use <var>options</var> to override several configure time options for
    183 GCC.  A list of supported <var>options</var> follows; &lsquo;<samp>configure
    184 --help</samp>&rsquo; may list other options, but those not listed below may not
    185 work and should not normally be used.
    186 </p>
    187 <p>Note that each <samp>--enable</samp> option has a corresponding
    188 <samp>--disable</samp> option and that each <samp>--with</samp> option has a
    189 corresponding <samp>--without</samp> option.
    190 </p>
    191 <dl compact="compact">
    192 <dt><code>--prefix=<var>dirname</var></code></dt>
    193 <dd><p>Specify the toplevel installation
    194 directory.  This is the recommended way to install the tools into a directory
    195 other than the default.  The toplevel installation directory defaults to
    196 <samp>/usr/local</samp>.
    197 </p>
    198 <p>We <strong>highly</strong> recommend against <var>dirname</var> being the same or a
    199 subdirectory of <var>objdir</var> or vice versa.  If specifying a directory
    200 beneath a user&rsquo;s home directory tree, some shells will not expand
    201 <var>dirname</var> correctly if it contains the &lsquo;<samp>~</samp>&rsquo; metacharacter; use
    202 <code>$HOME</code> instead.
    203 </p>
    204 <p>The following standard <code>autoconf</code> options are supported.  Normally you
    205 should not need to use these options.
    206 </p><dl compact="compact">
    207 <dt><code>--exec-prefix=<var>dirname</var></code></dt>
    208 <dd><p>Specify the toplevel installation directory for architecture-dependent
    209 files.  The default is <samp><var>prefix</var></samp>.
    210 </p>
    211 </dd>
    212 <dt><code>--bindir=<var>dirname</var></code></dt>
    213 <dd><p>Specify the installation directory for the executables called by users
    214 (such as <code>gcc</code> and <code>g++</code>).  The default is
    215 <samp><var>exec-prefix</var>/bin</samp>.
    216 </p>
    217 </dd>
    218 <dt><code>--libdir=<var>dirname</var></code></dt>
    219 <dd><p>Specify the installation directory for object code libraries and
    220 internal data files of GCC.  The default is <samp><var>exec-prefix</var>/lib</samp>.
    221 </p>
    222 </dd>
    223 <dt><code>--libexecdir=<var>dirname</var></code></dt>
    224 <dd><p>Specify the installation directory for internal executables of GCC.
    225 The default is <samp><var>exec-prefix</var>/libexec</samp>.
    226 </p>
    227 </dd>
    228 <dt><code>--with-slibdir=<var>dirname</var></code></dt>
    229 <dd><p>Specify the installation directory for the shared libgcc library.  The
    230 default is <samp><var>libdir</var></samp>.
    231 </p>
    232 </dd>
    233 <dt><code>--datarootdir=<var>dirname</var></code></dt>
    234 <dd><p>Specify the root of the directory tree for read-only architecture-independent
    235 data files referenced by GCC.  The default is <samp><var>prefix</var>/share</samp>.
    236 </p>
    237 </dd>
    238 <dt><code>--infodir=<var>dirname</var></code></dt>
    239 <dd><p>Specify the installation directory for documentation in info format.
    240 The default is <samp><var>datarootdir</var>/info</samp>.
    241 </p>
    242 </dd>
    243 <dt><code>--datadir=<var>dirname</var></code></dt>
    244 <dd><p>Specify the installation directory for some architecture-independent
    245 data files referenced by GCC.  The default is <samp><var>datarootdir</var></samp>.
    246 </p>
    247 </dd>
    248 <dt><code>--docdir=<var>dirname</var></code></dt>
    249 <dd><p>Specify the installation directory for documentation files (other
    250 than Info) for GCC.  The default is <samp><var>datarootdir</var>/doc</samp>.
    251 </p>
    252 </dd>
    253 <dt><code>--htmldir=<var>dirname</var></code></dt>
    254 <dd><p>Specify the installation directory for HTML documentation files.
    255 The default is <samp><var>docdir</var></samp>.
    256 </p>
    257 </dd>
    258 <dt><code>--pdfdir=<var>dirname</var></code></dt>
    259 <dd><p>Specify the installation directory for PDF documentation files.
    260 The default is <samp><var>docdir</var></samp>.
    261 </p>
    262 </dd>
    263 <dt><code>--mandir=<var>dirname</var></code></dt>
    264 <dd><p>Specify the installation directory for manual pages.  The default is
    265 <samp><var>datarootdir</var>/man</samp>.  (Note that the manual pages are only extracts
    266 from the full GCC manuals, which are provided in Texinfo format.  The manpages
    267 are derived by an automatic conversion process from parts of the full
    268 manual.)
    269 </p>
    270 </dd>
    271 <dt><code>--with-gxx-include-dir=<var>dirname</var></code></dt>
    272 <dd><p>Specify
    273 the installation directory for G++ header files.  The default depends
    274 on other configuration options, and differs between cross and native
    275 configurations.
    276 </p>
    277 </dd>
    278 <dt><code>--with-specs=<var>specs</var></code></dt>
    279 <dd><p>Specify additional command line driver SPECS.
    280 This can be useful if you need to turn on a non-standard feature by
    281 default without modifying the compiler&rsquo;s source code, for instance
    282 <samp>--with-specs=%{!fcommon:%{!fno-common:-fno-common}}</samp>.
    283 See &ldquo;Spec Files&rdquo; in the main manual
    284 </p>
    285 </dd>
    286 </dl>
    287 
    288 </dd>
    289 <dt><code>--program-prefix=<var>prefix</var></code></dt>
    290 <dd><p>GCC supports some transformations of the names of its programs when
    291 installing them.  This option prepends <var>prefix</var> to the names of
    292 programs to install in <var>bindir</var> (see above).  For example, specifying
    293 <samp>--program-prefix=foo-</samp> would result in &lsquo;<samp>gcc</samp>&rsquo;
    294 being installed as <samp>/usr/local/bin/foo-gcc</samp>.
    295 </p>
    296 </dd>
    297 <dt><code>--program-suffix=<var>suffix</var></code></dt>
    298 <dd><p>Appends <var>suffix</var> to the names of programs to install in <var>bindir</var>
    299 (see above).  For example, specifying <samp>--program-suffix=-3.1</samp>
    300 would result in &lsquo;<samp>gcc</samp>&rsquo; being installed as
    301 <samp>/usr/local/bin/gcc-3.1</samp>.
    302 </p>
    303 </dd>
    304 <dt><code>--program-transform-name=<var>pattern</var></code></dt>
    305 <dd><p>Applies the &lsquo;<samp>sed</samp>&rsquo; script <var>pattern</var> to be applied to the names
    306 of programs to install in <var>bindir</var> (see above).  <var>pattern</var> has to
    307 consist of one or more basic &lsquo;<samp>sed</samp>&rsquo; editing commands, separated by
    308 semicolons.  For example, if you want the &lsquo;<samp>gcc</samp>&rsquo; program name to be
    309 transformed to the installed program <samp>/usr/local/bin/myowngcc</samp> and
    310 the &lsquo;<samp>g++</samp>&rsquo; program name to be transformed to
    311 <samp>/usr/local/bin/gspecial++</samp> without changing other program names,
    312 you could use the pattern
    313 <samp>--program-transform-name='s/^gcc$/myowngcc/; s/^g++$/gspecial++/'</samp>
    314 to achieve this effect.
    315 </p>
    316 <p>All three options can be combined and used together, resulting in more
    317 complex conversion patterns.  As a basic rule, <var>prefix</var> (and
    318 <var>suffix</var>) are prepended (appended) before further transformations
    319 can happen with a special transformation script <var>pattern</var>.
    320 </p>
    321 <p>As currently implemented, this option only takes effect for native
    322 builds; cross compiler binaries&rsquo; names are not transformed even when a
    323 transformation is explicitly asked for by one of these options.
    324 </p>
    325 <p>For native builds, some of the installed programs are also installed
    326 with the target alias in front of their name, as in
    327 &lsquo;<samp>i686-pc-linux-gnu-gcc</samp>&rsquo;.  All of the above transformations happen
    328 before the target alias is prepended to the name&mdash;so, specifying
    329 <samp>--program-prefix=foo-</samp> and <samp>program-suffix=-3.1</samp>, the
    330 resulting binary would be installed as
    331 <samp>/usr/local/bin/i686-pc-linux-gnu-foo-gcc-3.1</samp>.
    332 </p>
    333 <p>As a last shortcoming, none of the installed Ada programs are
    334 transformed yet, which will be fixed in some time.
    335 </p>
    336 </dd>
    337 <dt><code>--with-local-prefix=<var>dirname</var></code></dt>
    338 <dd><p>Specify the
    339 installation directory for local include files.  The default is
    340 <samp>/usr/local</samp>.  Specify this option if you want the compiler to
    341 search directory <samp><var>dirname</var>/include</samp> for locally installed
    342 header files <em>instead</em> of <samp>/usr/local/include</samp>.
    343 </p>
    344 <p>You should specify <samp>--with-local-prefix</samp> <strong>only</strong> if your
    345 site has a different convention (not <samp>/usr/local</samp>) for where to put
    346 site-specific files.
    347 </p>
    348 <p>The default value for <samp>--with-local-prefix</samp> is <samp>/usr/local</samp>
    349 regardless of the value of <samp>--prefix</samp>.  Specifying
    350 <samp>--prefix</samp> has no effect on which directory GCC searches for
    351 local header files.  This may seem counterintuitive, but actually it is
    352 logical.
    353 </p>
    354 <p>The purpose of <samp>--prefix</samp> is to specify where to <em>install
    355 GCC</em>.  The local header files in <samp>/usr/local/include</samp>&mdash;if you put
    356 any in that directory&mdash;are not part of GCC.  They are part of other
    357 programs&mdash;perhaps many others.  (GCC installs its own header files in
    358 another directory which is based on the <samp>--prefix</samp> value.)
    359 </p>
    360 <p>Both the local-prefix include directory and the GCC-prefix include
    361 directory are part of GCC&rsquo;s &ldquo;system include&rdquo; directories.  Although these
    362 two directories are not fixed, they need to be searched in the proper
    363 order for the correct processing of the include_next directive.  The
    364 local-prefix include directory is searched before the GCC-prefix
    365 include directory.  Another characteristic of system include directories
    366 is that pedantic warnings are turned off for headers in these directories.
    367 </p>
    368 <p>Some autoconf macros add <samp>-I <var>directory</var></samp> options to the
    369 compiler command line, to ensure that directories containing installed
    370 packages&rsquo; headers are searched.  When <var>directory</var> is one of GCC&rsquo;s
    371 system include directories, GCC will ignore the option so that system
    372 directories continue to be processed in the correct order.  This
    373 may result in a search order different from what was specified but the
    374 directory will still be searched.
    375 </p>
    376 <p>GCC automatically searches for ordinary libraries using
    377 <code>GCC_EXEC_PREFIX</code>.  Thus, when the same installation prefix is
    378 used for both GCC and packages, GCC will automatically search for
    379 both headers and libraries.  This provides a configuration that is
    380 easy to use.  GCC behaves in a manner similar to that when it is
    381 installed as a system compiler in <samp>/usr</samp>.
    382 </p>
    383 <p>Sites that need to install multiple versions of GCC may not want to
    384 use the above simple configuration.  It is possible to use the
    385 <samp>--program-prefix</samp>, <samp>--program-suffix</samp> and
    386 <samp>--program-transform-name</samp> options to install multiple versions
    387 into a single directory, but it may be simpler to use different prefixes
    388 and the <samp>--with-local-prefix</samp> option to specify the location of the
    389 site-specific files for each version.  It will then be necessary for
    390 users to specify explicitly the location of local site libraries
    391 (e.g., with <code>LIBRARY_PATH</code>).
    392 </p>
    393 <p>The same value can be used for both <samp>--with-local-prefix</samp> and
    394 <samp>--prefix</samp> provided it is not <samp>/usr</samp>.  This can be used
    395 to avoid the default search of <samp>/usr/local/include</samp>.
    396 </p>
    397 <p><strong>Do not</strong> specify <samp>/usr</samp> as the <samp>--with-local-prefix</samp>!
    398 The directory you use for <samp>--with-local-prefix</samp> <strong>must not</strong>
    399 contain any of the system&rsquo;s standard header files.  If it did contain
    400 them, certain programs would be miscompiled (including GNU Emacs, on
    401 certain targets), because this would override and nullify the header
    402 file corrections made by the <code>fixincludes</code> script.
    403 </p>
    404 <p>Indications are that people who use this option use it based on mistaken
    405 ideas of what it is for.  People use it as if it specified where to
    406 install part of GCC.  Perhaps they make this assumption because
    407 installing GCC creates the directory.
    408 </p>
    409 </dd>
    410 <dt><code>--with-gcc-major-version-only</code></dt>
    411 <dd><p>Specifies that GCC should use only the major number rather than
    412 <var>major</var>.<var>minor</var>.<var>patchlevel</var> in filesystem paths.
    413 </p>
    414 </dd>
    415 <dt><code>--with-native-system-header-dir=<var>dirname</var></code></dt>
    416 <dd><p>Specifies that <var>dirname</var> is the directory that contains native system
    417 header files, rather than <samp>/usr/include</samp>.  This option is most useful
    418 if you are creating a compiler that should be isolated from the system
    419 as much as possible.  It is most commonly used with the
    420 <samp>--with-sysroot</samp> option and will cause GCC to search
    421 <var>dirname</var> inside the system root specified by that option.
    422 </p>
    423 </dd>
    424 <dt><code>--enable-shared[=<var>package</var>[,&hellip;]]</code></dt>
    425 <dd><p>Build shared versions of libraries, if shared libraries are supported on
    426 the target platform.  Unlike GCC 2.95.x and earlier, shared libraries
    427 are enabled by default on all platforms that support shared libraries.
    428 </p>
    429 <p>If a list of packages is given as an argument, build shared libraries
    430 only for the listed packages.  For other packages, only static libraries
    431 will be built.  Package names currently recognized in the GCC tree are
    432 &lsquo;<samp>libgcc</samp>&rsquo; (also known as &lsquo;<samp>gcc</samp>&rsquo;), &lsquo;<samp>libstdc++</samp>&rsquo; (not
    433 &lsquo;<samp>libstdc++-v3</samp>&rsquo;), &lsquo;<samp>libffi</samp>&rsquo;, &lsquo;<samp>zlib</samp>&rsquo;, &lsquo;<samp>boehm-gc</samp>&rsquo;,
    434 &lsquo;<samp>ada</samp>&rsquo;, &lsquo;<samp>libada</samp>&rsquo;, &lsquo;<samp>libgo</samp>&rsquo;, and &lsquo;<samp>libobjc</samp>&rsquo;.
    435 Note &lsquo;<samp>libiberty</samp>&rsquo; does not support shared libraries at all.
    436 </p>
    437 <p>Use <samp>--disable-shared</samp> to build only static libraries.  Note that
    438 <samp>--disable-shared</samp> does not accept a list of package names as
    439 argument, only <samp>--enable-shared</samp> does.
    440 </p>
    441 <p>Contrast with <samp>--enable-host-shared</samp>, which affects <em>host</em>
    442 code.
    443 </p>
    444 </dd>
    445 <dt><code>--enable-host-shared</code></dt>
    446 <dd><p>Specify that the <em>host</em> code should be built into position-independent
    447 machine code (with -fPIC), allowing it to be used within shared libraries,
    448 but yielding a slightly slower compiler.
    449 </p>
    450 <p>This option is required when building the libgccjit.so library.
    451 </p>
    452 <p>Contrast with <samp>--enable-shared</samp>, which affects <em>target</em>
    453 libraries.
    454 </p>
    455 </dd>
    456 <dt><code><a name="with-gnu-as"></a>--with-gnu-as</code></dt>
    457 <dd><p>Specify that the compiler should assume that the
    458 assembler it finds is the GNU assembler.  However, this does not modify
    459 the rules to find an assembler and will result in confusion if the
    460 assembler found is not actually the GNU assembler.  (Confusion may also
    461 result if the compiler finds the GNU assembler but has not been
    462 configured with <samp>--with-gnu-as</samp>.)  If you have more than one
    463 assembler installed on your system, you may want to use this option in
    464 connection with <samp>--with-as=<var>pathname</var></samp> or
    465 <samp>--with-build-time-tools=<var>pathname</var></samp>.
    466 </p>
    467 <p>The following systems are the only ones where it makes a difference
    468 whether you use the GNU assembler.  On any other system,
    469 <samp>--with-gnu-as</samp> has no effect.
    470 </p>
    471 <ul>
    472 <li> &lsquo;<samp>hppa1.0-<var>any</var>-<var>any</var></samp>&rsquo;
    473 </li><li> &lsquo;<samp>hppa1.1-<var>any</var>-<var>any</var></samp>&rsquo;
    474 </li><li> &lsquo;<samp>sparc-sun-solaris2.<var>any</var></samp>&rsquo;
    475 </li><li> &lsquo;<samp>sparc64-<var>any</var>-solaris2.<var>any</var></samp>&rsquo;
    476 </li></ul>
    477 
    478 </dd>
    479 <dt><code><a name="with-as"></a>--with-as=<var>pathname</var></code></dt>
    480 <dd><p>Specify that the compiler should use the assembler pointed to by
    481 <var>pathname</var>, rather than the one found by the standard rules to find
    482 an assembler, which are:
    483 </p><ul>
    484 <li> Unless GCC is being built with a cross compiler, check the
    485 <samp><var>libexec</var>/gcc/<var>target</var>/<var>version</var></samp> directory.
    486 <var>libexec</var> defaults to <samp><var>exec-prefix</var>/libexec</samp>;
    487 <var>exec-prefix</var> defaults to <var>prefix</var>, which
    488 defaults to <samp>/usr/local</samp> unless overridden by the
    489 <samp>--prefix=<var>pathname</var></samp> switch described above.  <var>target</var>
    490 is the target system triple, such as &lsquo;<samp>sparc-sun-solaris2.7</samp>&rsquo;, and
    491 <var>version</var> denotes the GCC version, such as 3.0.
    492 
    493 </li><li> If the target system is the same that you are building on, check
    494 operating system specific directories (e.g. <samp>/usr/ccs/bin</samp> on
    495 Sun Solaris 2).
    496 
    497 </li><li> Check in the <code>PATH</code> for a tool whose name is prefixed by the
    498 target system triple.
    499 
    500 </li><li> Check in the <code>PATH</code> for a tool whose name is not prefixed by the
    501 target system triple, if the host and target system triple are
    502 the same (in other words, we use a host tool if it can be used for
    503 the target as well).
    504 </li></ul>
    505 
    506 <p>You may want to use <samp>--with-as</samp> if no assembler
    507 is installed in the directories listed above, or if you have multiple
    508 assemblers installed and want to choose one that is not found by the
    509 above rules.
    510 </p>
    511 </dd>
    512 <dt><code><a name="with-gnu-ld"></a>--with-gnu-ld</code></dt>
    513 <dd><p>Same as <a href="#with-gnu-as"><samp>--with-gnu-as</samp></a>
    514 but for the linker.
    515 </p>
    516 </dd>
    517 <dt><code>--with-ld=<var>pathname</var></code></dt>
    518 <dd><p>Same as <a href="#with-as"><samp>--with-as</samp></a>
    519 but for the linker.
    520 </p>
    521 </dd>
    522 <dt><code>--with-stabs</code></dt>
    523 <dd><p>Specify that stabs debugging
    524 information should be used instead of whatever format the host normally
    525 uses.  Normally GCC uses the same debug format as the host system.
    526 </p>
    527 </dd>
    528 <dt><code>--with-tls=<var>dialect</var></code></dt>
    529 <dd><p>Specify the default TLS dialect, for systems were there is a choice.
    530 For ARM targets, possible values for <var>dialect</var> are <code>gnu</code> or
    531 <code>gnu2</code>, which select between the original GNU dialect and the GNU TLS
    532 descriptor-based dialect.
    533 </p>
    534 </dd>
    535 <dt><code>--enable-multiarch</code></dt>
    536 <dd><p>Specify whether to enable or disable multiarch support.  The default is
    537 to check for glibc start files in a multiarch location, and enable it
    538 if the files are found.  The auto detection is enabled for native builds,
    539 and for cross builds configured with <samp>--with-sysroot</samp>, and without
    540 <samp>--with-native-system-header-dir</samp>.
    541 More documentation about multiarch can be found at
    542 <a href="https://wiki.debian.org/Multiarch">https://wiki.debian.org/Multiarch</a>.
    543 </p>
    544 </dd>
    545 <dt><code>--enable-sjlj-exceptions</code></dt>
    546 <dd><p>Force use of the <code>setjmp</code>/<code>longjmp</code>-based scheme for exceptions.
    547 &lsquo;<samp>configure</samp>&rsquo; ordinarily picks the correct value based on the platform.
    548 Only use this option if you are sure you need a different setting.
    549 </p>
    550 </dd>
    551 <dt><code>--enable-vtable-verify</code></dt>
    552 <dd><p>Specify whether to enable or disable the vtable verification feature.
    553 Enabling this feature causes libstdc++ to be built with its virtual calls
    554 in verifiable mode.  This means that, when linked with libvtv, every
    555 virtual call in libstdc++ will verify the vtable pointer through which the
    556 call will be made before actually making the call.  If not linked with libvtv,
    557 the verifier will call stub functions (in libstdc++ itself) and do nothing.
    558 If vtable verification is disabled, then libstdc++ is not built with its
    559 virtual calls in verifiable mode at all.  However the libvtv library will
    560 still be built (see <samp>--disable-libvtv</samp> to turn off building libvtv).
    561 <samp>--disable-vtable-verify</samp> is the default.
    562 </p>
    563 </dd>
    564 <dt><code>--disable-multilib</code></dt>
    565 <dd><p>Specify that multiple target
    566 libraries to support different target variants, calling
    567 conventions, etc. should not be built.  The default is to build a
    568 predefined set of them.
    569 </p>
    570 <p>Some targets provide finer-grained control over which multilibs are built
    571 (e.g., <samp>--disable-softfloat</samp>):
    572 </p><dl compact="compact">
    573 <dt><code>arm-*-*</code></dt>
    574 <dd><p>fpu, 26bit, underscore, interwork, biendian, nofmult.
    575 </p>
    576 </dd>
    577 <dt><code>m68*-*-*</code></dt>
    578 <dd><p>softfloat, m68881, m68000, m68020.
    579 </p>
    580 </dd>
    581 <dt><code>mips*-*-*</code></dt>
    582 <dd><p>single-float, biendian, softfloat.
    583 </p>
    584 </dd>
    585 <dt><code>powerpc*-*-*, rs6000*-*-*</code></dt>
    586 <dd><p>aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, biendian,
    587 sysv, aix.
    588 </p>
    589 </dd>
    590 </dl>
    591 
    592 </dd>
    593 <dt><code>--with-multilib-list=<var>list</var></code></dt>
    594 <dt><code>--without-multilib-list</code></dt>
    595 <dd><p>Specify what multilibs to build.  <var>list</var> is a comma separated list of
    596 values, possibly consisting of a single value.  Currently only implemented
    597 for aarch64*-*-*, arm*-*-*, sh*-*-* and x86-64-*-linux*.  The accepted
    598 alues and meaning for each target is given below.
    599 </p>
    600 <dl compact="compact">
    601 <dt><code>aarch64*-*-*</code></dt>
    602 <dd><p><var>list</var> is a comma separated list of <code>ilp32</code>, and <code>lp64</code>
    603 to enable ILP32 and LP64 run-time libraries, respectively.  If
    604 <var>list</var> is empty, then there will be no multilibs and only the
    605 default run-time library will be built.  If <var>list</var> is
    606 <code>default</code> or &ndash;with-multilib-list= is not specified, then the
    607 default set of libraries is selected based on the value of
    608 <samp>--target</samp>.
    609 </p>
    610 </dd>
    611 <dt><code>arm*-*-*</code></dt>
    612 <dd><p><var>list</var> is a comma separated list of <code>aprofile</code> and <code>rmprofile</code>
    613 to build multilibs for A or R and M architecture profiles respectively.  Note
    614 that, due to some limitation of the current multilib framework, using the
    615 combined <code>aprofile,rmprofile</code> multilibs selects in some cases a less
    616 optimal multilib than when using the multilib profile for the architecture
    617 targetted.  The special value <code>default</code> is also accepted and is equivalent
    618 to omitting the option, ie. only the default run-time library will be enabled.
    619 </p>
    620 <p>The table below gives the combination of ISAs, architectures, FPUs and
    621 floating-point ABIs for which multilibs are built for each accepted value.
    622 The union of these options is considered when specifying both <code>aprofile</code>
    623 and <code>rmprofile</code>.
    624 </p>
    625 <table>
    626 <tr><td width="15%">Option</td><td width="28%">aprofile</td><td width="30%">rmprofile</td></tr>
    627 <tr><td width="15%">ISAs</td><td width="28%"><code>-marm</code> and <code>-mthumb</code></td><td width="30%"><code>-mthumb</code></td></tr>
    628 <tr><td width="15%">Architectures<br><br><br><br><br><br></td><td width="28%">default architecture<br>
    629 <code>-march=armv7-a</code><br>
    630 <code>-march=armv7ve</code><br>
    631 <code>-march=armv8-a</code><br><br><br></td><td width="30%">default architecture<br>
    632 <code>-march=armv6s-m</code><br>
    633 <code>-march=armv7-m</code><br>
    634 <code>-march=armv7e-m</code><br>
    635 <code>-march=armv8-m.base</code><br>
    636 <code>-march=armv8-m.main</code><br>
    637 <code>-march=armv7</code></td></tr>
    638 <tr><td width="15%">FPUs<br><br><br><br><br></td><td width="28%">none<br>
    639 <code>-mfpu=vfpv3-d16</code><br>
    640 <code>-mfpu=neon</code><br>
    641 <code>-mfpu=vfpv4-d16</code><br>
    642 <code>-mfpu=neon-vfpv4</code><br>
    643 <code>-mfpu=neon-fp-armv8</code></td><td width="30%">none<br>
    644 <code>-mfpu=vfpv3-d16</code><br>
    645 <code>-mfpu=fpv4-sp-d16</code><br>
    646 <code>-mfpu=fpv5-sp-d16</code><br>
    647 <code>-mfpu=fpv5-d16</code><br></td></tr>
    648 <tr><td width="15%">floating-point ABIs<br><br></td><td width="28%"><code>-mfloat-abi=soft</code><br>
    649 <code>-mfloat-abi=softfp</code><br>
    650 <code>-mfloat-abi=hard</code></td><td width="30%"><code>-mfloat-abi=soft</code><br>
    651 <code>-mfloat-abi=softfp</code><br>
    652 <code>-mfloat-abi=hard</code></td></tr>
    653 </table>
    654 
    655 </dd>
    656 <dt><code>sh*-*-*</code></dt>
    657 <dd><p><var>list</var> is a comma separated list of CPU names.  These must be of the
    658 form <code>sh*</code> or <code>m*</code> (in which case they match the compiler option
    659 for that processor).  The list should not contain any endian options -
    660 these are handled by <samp>--with-endian</samp>.
    661 </p>
    662 <p>If <var>list</var> is empty, then there will be no multilibs for extra
    663 processors.  The multilib for the secondary endian remains enabled.
    664 </p>
    665 <p>As a special case, if an entry in the list starts with a <code>!</code>
    666 (exclamation point), then it is added to the list of excluded multilibs.
    667 Entries of this sort should be compatible with &lsquo;<samp>MULTILIB_EXCLUDES</samp>&rsquo;
    668 (once the leading <code>!</code> has been stripped).
    669 </p>
    670 <p>If <samp>--with-multilib-list</samp> is not given, then a default set of
    671 multilibs is selected based on the value of <samp>--target</samp>.  This is
    672 usually the complete set of libraries, but some targets imply a more
    673 specialized subset.
    674 </p>
    675 <p>Example 1: to configure a compiler for SH4A only, but supporting both
    676 endians, with little endian being the default:
    677 </p><div class="smallexample">
    678 <pre class="smallexample">--with-cpu=sh4a --with-endian=little,big --with-multilib-list=
    679 </pre></div>
    680 
    681 <p>Example 2: to configure a compiler for both SH4A and SH4AL-DSP, but with
    682 only little endian SH4AL:
    683 </p><div class="smallexample">
    684 <pre class="smallexample">--with-cpu=sh4a --with-endian=little,big \
    685 --with-multilib-list=sh4al,!mb/m4al
    686 </pre></div>
    687 
    688 </dd>
    689 <dt><code>x86-64-*-linux*</code></dt>
    690 <dd><p><var>list</var> is a comma separated list of <code>m32</code>, <code>m64</code> and
    691 <code>mx32</code> to enable 32-bit, 64-bit and x32 run-time libraries,
    692 respectively.  If <var>list</var> is empty, then there will be no multilibs
    693 and only the default run-time library will be enabled.
    694 </p>
    695 <p>If <samp>--with-multilib-list</samp> is not given, then only 32-bit and
    696 64-bit run-time libraries will be enabled.
    697 </p></dd>
    698 </dl>
    699 
    700 </dd>
    701 <dt><code>--with-endian=<var>endians</var></code></dt>
    702 <dd><p>Specify what endians to use.
    703 Currently only implemented for sh*-*-*.
    704 </p>
    705 <p><var>endians</var> may be one of the following:
    706 </p><dl compact="compact">
    707 <dt><code>big</code></dt>
    708 <dd><p>Use big endian exclusively.
    709 </p></dd>
    710 <dt><code>little</code></dt>
    711 <dd><p>Use little endian exclusively.
    712 </p></dd>
    713 <dt><code>big,little</code></dt>
    714 <dd><p>Use big endian by default.  Provide a multilib for little endian.
    715 </p></dd>
    716 <dt><code>little,big</code></dt>
    717 <dd><p>Use little endian by default.  Provide a multilib for big endian.
    718 </p></dd>
    719 </dl>
    720 
    721 </dd>
    722 <dt><code>--enable-threads</code></dt>
    723 <dd><p>Specify that the target
    724 supports threads.  This affects the Objective-C compiler and runtime
    725 library, and exception handling for other languages like C++.
    726 On some systems, this is the default.
    727 </p>
    728 <p>In general, the best (and, in many cases, the only known) threading
    729 model available will be configured for use.  Beware that on some
    730 systems, GCC has not been taught what threading models are generally
    731 available for the system.  In this case, <samp>--enable-threads</samp> is an
    732 alias for <samp>--enable-threads=single</samp>.
    733 </p>
    734 </dd>
    735 <dt><code>--disable-threads</code></dt>
    736 <dd><p>Specify that threading support should be disabled for the system.
    737 This is an alias for <samp>--enable-threads=single</samp>.
    738 </p>
    739 </dd>
    740 <dt><code>--enable-threads=<var>lib</var></code></dt>
    741 <dd><p>Specify that
    742 <var>lib</var> is the thread support library.  This affects the Objective-C
    743 compiler and runtime library, and exception handling for other languages
    744 like C++.  The possibilities for <var>lib</var> are:
    745 </p>
    746 <dl compact="compact">
    747 <dt><code>aix</code></dt>
    748 <dd><p>AIX thread support.
    749 </p></dd>
    750 <dt><code>dce</code></dt>
    751 <dd><p>DCE thread support.
    752 </p></dd>
    753 <dt><code>lynx</code></dt>
    754 <dd><p>LynxOS thread support.
    755 </p></dd>
    756 <dt><code>mipssde</code></dt>
    757 <dd><p>MIPS SDE thread support.
    758 </p></dd>
    759 <dt><code>no</code></dt>
    760 <dd><p>This is an alias for &lsquo;<samp>single</samp>&rsquo;.
    761 </p></dd>
    762 <dt><code>posix</code></dt>
    763 <dd><p>Generic POSIX/Unix98 thread support.
    764 </p></dd>
    765 <dt><code>rtems</code></dt>
    766 <dd><p>RTEMS thread support.
    767 </p></dd>
    768 <dt><code>single</code></dt>
    769 <dd><p>Disable thread support, should work for all platforms.
    770 </p></dd>
    771 <dt><code>tpf</code></dt>
    772 <dd><p>TPF thread support.
    773 </p></dd>
    774 <dt><code>vxworks</code></dt>
    775 <dd><p>VxWorks thread support.
    776 </p></dd>
    777 <dt><code>win32</code></dt>
    778 <dd><p>Microsoft Win32 API thread support.
    779 </p></dd>
    780 </dl>
    781 
    782 </dd>
    783 <dt><code>--enable-tls</code></dt>
    784 <dd><p>Specify that the target supports TLS (Thread Local Storage).  Usually
    785 configure can correctly determine if TLS is supported.  In cases where
    786 it guesses incorrectly, TLS can be explicitly enabled or disabled with
    787 <samp>--enable-tls</samp> or <samp>--disable-tls</samp>.  This can happen if
    788 the assembler supports TLS but the C library does not, or if the
    789 assumptions made by the configure test are incorrect.
    790 </p>
    791 </dd>
    792 <dt><code>--disable-tls</code></dt>
    793 <dd><p>Specify that the target does not support TLS.
    794 This is an alias for <samp>--enable-tls=no</samp>.
    795 </p>
    796 </dd>
    797 <dt><code>--with-cpu=<var>cpu</var></code></dt>
    798 <dt><code>--with-cpu-32=<var>cpu</var></code></dt>
    799 <dt><code>--with-cpu-64=<var>cpu</var></code></dt>
    800 <dd><p>Specify which cpu variant the compiler should generate code for by default.
    801 <var>cpu</var> will be used as the default value of the <samp>-mcpu=</samp> switch.
    802 This option is only supported on some targets, including ARC, ARM, i386, M68k,
    803 PowerPC, and SPARC.  It is mandatory for ARC.  The <samp>--with-cpu-32</samp> and
    804 <samp>--with-cpu-64</samp> options specify separate default CPUs for
    805 32-bit and 64-bit modes; these options are only supported for i386,
    806 x86-64, PowerPC, and SPARC.
    807 </p>
    808 </dd>
    809 <dt><code>--with-schedule=<var>cpu</var></code></dt>
    810 <dt><code>--with-arch=<var>cpu</var></code></dt>
    811 <dt><code>--with-arch-32=<var>cpu</var></code></dt>
    812 <dt><code>--with-arch-64=<var>cpu</var></code></dt>
    813 <dt><code>--with-tune=<var>cpu</var></code></dt>
    814 <dt><code>--with-tune-32=<var>cpu</var></code></dt>
    815 <dt><code>--with-tune-64=<var>cpu</var></code></dt>
    816 <dt><code>--with-abi=<var>abi</var></code></dt>
    817 <dt><code>--with-fpu=<var>type</var></code></dt>
    818 <dt><code>--with-float=<var>type</var></code></dt>
    819 <dd><p>These configure options provide default values for the <samp>-mschedule=</samp>,
    820 <samp>-march=</samp>, <samp>-mtune=</samp>, <samp>-mabi=</samp>, and <samp>-mfpu=</samp>
    821 options and for <samp>-mhard-float</samp> or <samp>-msoft-float</samp>.  As with
    822 <samp>--with-cpu</samp>, which switches will be accepted and acceptable values
    823 of the arguments depend on the target.
    824 </p>
    825 </dd>
    826 <dt><code>--with-mode=<var>mode</var></code></dt>
    827 <dd><p>Specify if the compiler should default to <samp>-marm</samp> or <samp>-mthumb</samp>.
    828 This option is only supported on ARM targets.
    829 </p>
    830 </dd>
    831 <dt><code>--with-stack-offset=<var>num</var></code></dt>
    832 <dd><p>This option sets the default for the -mstack-offset=<var>num</var> option,
    833 and will thus generally also control the setting of this option for
    834 libraries.  This option is only supported on Epiphany targets.
    835 </p>
    836 </dd>
    837 <dt><code>--with-fpmath=<var>isa</var></code></dt>
    838 <dd><p>This options sets <samp>-mfpmath=sse</samp> by default and specifies the default
    839 ISA for floating-point arithmetics.  You can select either &lsquo;<samp>sse</samp>&rsquo; which
    840 enables <samp>-msse2</samp> or &lsquo;<samp>avx</samp>&rsquo; which enables <samp>-mavx</samp> by default.
    841 This option is only supported on i386 and x86-64 targets.
    842 </p>
    843 </dd>
    844 <dt><code>--with-fp-32=<var>mode</var></code></dt>
    845 <dd><p>On MIPS targets, set the default value for the <samp>-mfp</samp> option when using
    846 the o32 ABI.  The possibilities for <var>mode</var> are:
    847 </p><dl compact="compact">
    848 <dt><code>32</code></dt>
    849 <dd><p>Use the o32 FP32 ABI extension, as with the <samp>-mfp32</samp> command-line
    850 option.
    851 </p></dd>
    852 <dt><code>xx</code></dt>
    853 <dd><p>Use the o32 FPXX ABI extension, as with the <samp>-mfpxx</samp> command-line
    854 option.
    855 </p></dd>
    856 <dt><code>64</code></dt>
    857 <dd><p>Use the o32 FP64 ABI extension, as with the <samp>-mfp64</samp> command-line
    858 option.
    859 </p></dd>
    860 </dl>
    861 <p>In the absence of this configuration option the default is to use the o32
    862 FP32 ABI extension.
    863 </p>
    864 </dd>
    865 <dt><code>--with-odd-spreg-32</code></dt>
    866 <dd><p>On MIPS targets, set the <samp>-modd-spreg</samp> option by default when using
    867 the o32 ABI.
    868 </p>
    869 </dd>
    870 <dt><code>--without-odd-spreg-32</code></dt>
    871 <dd><p>On MIPS targets, set the <samp>-mno-odd-spreg</samp> option by default when using
    872 the o32 ABI.  This is normally used in conjunction with
    873 <samp>--with-fp-32=64</samp> in order to target the o32 FP64A ABI extension.
    874 </p>
    875 </dd>
    876 <dt><code>--with-nan=<var>encoding</var></code></dt>
    877 <dd><p>On MIPS targets, set the default encoding convention to use for the
    878 special not-a-number (NaN) IEEE 754 floating-point data.  The
    879 possibilities for <var>encoding</var> are:
    880 </p><dl compact="compact">
    881 <dt><code>legacy</code></dt>
    882 <dd><p>Use the legacy encoding, as with the <samp>-mnan=legacy</samp> command-line
    883 option.
    884 </p></dd>
    885 <dt><code>2008</code></dt>
    886 <dd><p>Use the 754-2008 encoding, as with the <samp>-mnan=2008</samp> command-line
    887 option.
    888 </p></dd>
    889 </dl>
    890 <p>To use this configuration option you must have an assembler version
    891 installed that supports the <samp>-mnan=</samp> command-line option too.
    892 In the absence of this configuration option the default convention is
    893 the legacy encoding, as when neither of the <samp>-mnan=2008</samp> and
    894 <samp>-mnan=legacy</samp> command-line options has been used.
    895 </p>
    896 </dd>
    897 <dt><code>--with-divide=<var>type</var></code></dt>
    898 <dd><p>Specify how the compiler should generate code for checking for
    899 division by zero.  This option is only supported on the MIPS target.
    900 The possibilities for <var>type</var> are:
    901 </p><dl compact="compact">
    902 <dt><code>traps</code></dt>
    903 <dd><p>Division by zero checks use conditional traps (this is the default on
    904 systems that support conditional traps).
    905 </p></dd>
    906 <dt><code>breaks</code></dt>
    907 <dd><p>Division by zero checks use the break instruction.
    908 </p></dd>
    909 </dl>
    910 
    911 
    912 </dd>
    913 <dt><code>--with-llsc</code></dt>
    914 <dd><p>On MIPS targets, make <samp>-mllsc</samp> the default when no
    915 <samp>-mno-llsc</samp> option is passed.  This is the default for
    916 Linux-based targets, as the kernel will emulate them if the ISA does
    917 not provide them.
    918 </p>
    919 </dd>
    920 <dt><code>--without-llsc</code></dt>
    921 <dd><p>On MIPS targets, make <samp>-mno-llsc</samp> the default when no
    922 <samp>-mllsc</samp> option is passed.
    923 </p>
    924 </dd>
    925 <dt><code>--with-synci</code></dt>
    926 <dd><p>On MIPS targets, make <samp>-msynci</samp> the default when no
    927 <samp>-mno-synci</samp> option is passed.
    928 </p>
    929 </dd>
    930 <dt><code>--without-synci</code></dt>
    931 <dd><p>On MIPS targets, make <samp>-mno-synci</samp> the default when no
    932 <samp>-msynci</samp> option is passed.  This is the default.
    933 </p>
    934 </dd>
    935 <dt><code>--with-lxc1-sxc1</code></dt>
    936 <dd><p>On MIPS targets, make <samp>-mlxc1-sxc1</samp> the default when no
    937 <samp>-mno-lxc1-sxc1</samp> option is passed.  This is the default.
    938 </p>
    939 </dd>
    940 <dt><code>--without-lxc1-sxc1</code></dt>
    941 <dd><p>On MIPS targets, make <samp>-mno-lxc1-sxc1</samp> the default when no
    942 <samp>-mlxc1-sxc1</samp> option is passed.  The indexed load/store
    943 instructions are not directly a problem but can lead to unexpected
    944 behaviour when deployed in an application intended for a 32-bit address
    945 space but run on a 64-bit processor.  The issue is seen because all
    946 known MIPS 64-bit Linux kernels execute o32 and n32 applications
    947 with 64-bit addressing enabled which affects the overflow behaviour
    948 of the indexed addressing mode.  GCC will assume that ordinary
    949 32-bit arithmetic overflow behaviour is the same whether performed
    950 as an <code>addu</code> instruction or as part of the address calculation
    951 in <code>lwxc1</code> type instructions.  This assumption holds true in a
    952 pure 32-bit environment and can hold true in a 64-bit environment if
    953 the address space is accurately set to be 32-bit for o32 and n32.
    954 </p>
    955 </dd>
    956 <dt><code>--with-madd4</code></dt>
    957 <dd><p>On MIPS targets, make <samp>-mmadd4</samp> the default when no
    958 <samp>-mno-madd4</samp> option is passed.  This is the default.
    959 </p>
    960 </dd>
    961 <dt><code>--without-madd4</code></dt>
    962 <dd><p>On MIPS targets, make <samp>-mno-madd4</samp> the default when no
    963 <samp>-mmadd4</samp> option is passed.  The <code>madd4</code> instruction
    964 family can be problematic when targeting a combination of cores that
    965 implement these instructions differently.  There are two known cores
    966 that implement these as fused operations instead of unfused (where
    967 unfused is normally expected).  Disabling these instructions is the
    968 only way to ensure compatible code is generated; this will incur
    969 a performance penalty.
    970 </p>
    971 </dd>
    972 <dt><code>--with-mips-plt</code></dt>
    973 <dd><p>On MIPS targets, make use of copy relocations and PLTs.
    974 These features are extensions to the traditional
    975 SVR4-based MIPS ABIs and require support from GNU binutils
    976 and the runtime C library.
    977 </p>
    978 </dd>
    979 <dt><code>--enable-__cxa_atexit</code></dt>
    980 <dd><p>Define if you want to use __cxa_atexit, rather than atexit, to
    981 register C++ destructors for local statics and global objects.
    982 This is essential for fully standards-compliant handling of
    983 destructors, but requires __cxa_atexit in libc.  This option is currently
    984 only available on systems with GNU libc.  When enabled, this will cause
    985 <samp>-fuse-cxa-atexit</samp> to be passed by default.
    986 </p>
    987 </dd>
    988 <dt><code>--enable-gnu-indirect-function</code></dt>
    989 <dd><p>Define if you want to enable the <code>ifunc</code> attribute.  This option is
    990 currently only available on systems with GNU libc on certain targets.
    991 </p>
    992 </dd>
    993 <dt><code>--enable-target-optspace</code></dt>
    994 <dd><p>Specify that target
    995 libraries should be optimized for code space instead of code speed.
    996 This is the default for the m32r platform.
    997 </p>
    998 </dd>
    999 <dt><code>--with-cpp-install-dir=<var>dirname</var></code></dt>
   1000 <dd><p>Specify that the user visible <code>cpp</code> program should be installed
   1001 in <samp><var>prefix</var>/<var>dirname</var>/cpp</samp>, in addition to <var>bindir</var>.
   1002 </p>
   1003 </dd>
   1004 <dt><code>--enable-comdat</code></dt>
   1005 <dd><p>Enable COMDAT group support.  This is primarily used to override the
   1006 automatically detected value.
   1007 </p>
   1008 </dd>
   1009 <dt><code>--enable-initfini-array</code></dt>
   1010 <dd><p>Force the use of sections <code>.init_array</code> and <code>.fini_array</code>
   1011 (instead of <code>.init</code> and <code>.fini</code>) for constructors and
   1012 destructors.  Option <samp>--disable-initfini-array</samp> has the
   1013 opposite effect.  If neither option is specified, the configure script
   1014 will try to guess whether the <code>.init_array</code> and
   1015 <code>.fini_array</code> sections are supported and, if they are, use them.
   1016 </p>
   1017 </dd>
   1018 <dt><code>--enable-link-mutex</code></dt>
   1019 <dd><p>When building GCC, use a mutex to avoid linking the compilers for
   1020 multiple languages at the same time, to avoid thrashing on build
   1021 systems with limited free memory.  The default is not to use such a mutex.
   1022 </p>
   1023 </dd>
   1024 <dt><code>--enable-maintainer-mode</code></dt>
   1025 <dd><p>The build rules that regenerate the Autoconf and Automake output files as
   1026 well as the GCC master message catalog <samp>gcc.pot</samp> are normally
   1027 disabled.  This is because it can only be rebuilt if the complete source
   1028 tree is present.  If you have changed the sources and want to rebuild the
   1029 catalog, configuring with <samp>--enable-maintainer-mode</samp> will enable
   1030 this.  Note that you need a recent version of the <code>gettext</code> tools
   1031 to do so.
   1032 </p>
   1033 </dd>
   1034 <dt><code>--disable-bootstrap</code></dt>
   1035 <dd><p>For a native build, the default configuration is to perform
   1036 a 3-stage bootstrap of the compiler when &lsquo;<samp>make</samp>&rsquo; is invoked,
   1037 testing that GCC can compile itself correctly.  If you want to disable
   1038 this process, you can configure with <samp>--disable-bootstrap</samp>.
   1039 </p>
   1040 </dd>
   1041 <dt><code>--enable-bootstrap</code></dt>
   1042 <dd><p>In special cases, you may want to perform a 3-stage build
   1043 even if the target and host triplets are different.
   1044 This is possible when the host can run code compiled for
   1045 the target (e.g. host is i686-linux, target is i486-linux).
   1046 Starting from GCC 4.2, to do this you have to configure explicitly
   1047 with <samp>--enable-bootstrap</samp>.
   1048 </p>
   1049 </dd>
   1050 <dt><code>--enable-generated-files-in-srcdir</code></dt>
   1051 <dd><p>Neither the .c and .h files that are generated from Bison and flex nor the
   1052 info manuals and man pages that are built from the .texi files are present
   1053 in the SVN development tree.  When building GCC from that development tree,
   1054 or from one of our snapshots, those generated files are placed in your
   1055 build directory, which allows for the source to be in a readonly
   1056 directory.
   1057 </p>
   1058 <p>If you configure with <samp>--enable-generated-files-in-srcdir</samp> then those
   1059 generated files will go into the source directory.  This is mainly intended
   1060 for generating release or prerelease tarballs of the GCC sources, since it
   1061 is not a requirement that the users of source releases to have flex, Bison,
   1062 or makeinfo.
   1063 </p>
   1064 </dd>
   1065 <dt><code>--enable-version-specific-runtime-libs</code></dt>
   1066 <dd><p>Specify
   1067 that runtime libraries should be installed in the compiler specific
   1068 subdirectory (<samp><var>libdir</var>/gcc</samp>) rather than the usual places.  In
   1069 addition, &lsquo;<samp>libstdc++</samp>&rsquo;&rsquo;s include files will be installed into
   1070 <samp><var>libdir</var></samp> unless you overruled it by using
   1071 <samp>--with-gxx-include-dir=<var>dirname</var></samp>.  Using this option is
   1072 particularly useful if you intend to use several versions of GCC in
   1073 parallel.  This is currently supported by &lsquo;<samp>libgfortran</samp>&rsquo;,
   1074 &lsquo;<samp>libstdc++</samp>&rsquo;, and &lsquo;<samp>libobjc</samp>&rsquo;.
   1075 </p>
   1076 </dd>
   1077 <dt><code><a name="WithAixSoname"></a>--with-aix-soname=&lsquo;<samp>aix</samp>&rsquo;, &lsquo;<samp>svr4</samp>&rsquo; or &lsquo;<samp>both</samp>&rsquo;</code></dt>
   1078 <dd><p>Traditional AIX shared library versioning (versioned <code>Shared Object</code>
   1079 files as members of unversioned <code>Archive Library</code> files named
   1080 &lsquo;<samp>lib.a</samp>&rsquo;) causes numerous headaches for package managers. However,
   1081 <code>Import Files</code> as members of <code>Archive Library</code> files allow for
   1082 <strong>filename-based versioning</strong> of shared libraries as seen on Linux/SVR4,
   1083 where this is called the &quot;SONAME&quot;. But as they prevent static linking,
   1084 <code>Import Files</code> may be used with <code>Runtime Linking</code> only, where the
   1085 linker does search for &lsquo;<samp>libNAME.so</samp>&rsquo; before &lsquo;<samp>libNAME.a</samp>&rsquo; library
   1086 filenames with the &lsquo;<samp>-lNAME</samp>&rsquo; linker flag.
   1087 </p>
   1088 <a name="AixLdCommand"></a><p>For detailed information please refer to the AIX
   1089 <a href="https://www.ibm.com/support/knowledgecenter/search/%22the%20ld%20command%2C%20also%20called%20the%20linkage%20editor%20or%20binder%22">ld
   1090 Command</a> reference.
   1091 </p>
   1092 <p>As long as shared library creation is enabled, upon:
   1093 </p><dl compact="compact">
   1094 <dt><code>--with-aix-soname=aix</code></dt>
   1095 <dt><code>--with-aix-soname=both</code></dt>
   1096 <dd><p>A (traditional AIX) <code>Shared Archive Library</code> file is created:
   1097  </p><ul>
   1098 <li> using the &lsquo;<samp>libNAME.a</samp>&rsquo; filename scheme
   1099   </li><li> with the <code>Shared Object</code> file as archive member named
   1100   &lsquo;<samp>libNAME.so.V</samp>&rsquo; (except for &lsquo;<samp>libgcc_s</samp>&rsquo;, where the <code>Shared
   1101   Object</code> file is named &lsquo;<samp>shr.o</samp>&rsquo; for backwards compatibility), which
   1102   <ul class="no-bullet">
   1103 <li>- is used for runtime loading from inside the &lsquo;<samp>libNAME.a</samp>&rsquo; file
   1104    </li><li>- is used for dynamic loading via
   1105    <code>dlopen(&quot;libNAME.a(libNAME.so.V)&quot;, RTLD_MEMBER)</code>
   1106    </li><li>- is used for shared linking
   1107    </li><li>- is used for static linking, so no separate <code>Static Archive
   1108    Library</code> file is needed
   1109   </li></ul>
   1110 </li></ul>
   1111 </dd>
   1112 <dt><code>--with-aix-soname=both</code></dt>
   1113 <dt><code>--with-aix-soname=svr4</code></dt>
   1114 <dd><p>A (second) <code>Shared Archive Library</code> file is created:
   1115  </p><ul>
   1116 <li> using the &lsquo;<samp>libNAME.so.V</samp>&rsquo; filename scheme
   1117  </li><li> with the <code>Shared Object</code> file as archive member named
   1118  &lsquo;<samp>shr.o</samp>&rsquo;, which
   1119   <ul class="no-bullet">
   1120 <li>- is created with the <code>-G linker flag</code>
   1121    </li><li>- has the <code>F_LOADONLY</code> flag set
   1122    </li><li>- is used for runtime loading from inside the &lsquo;<samp>libNAME.so.V</samp>&rsquo; file
   1123    </li><li>- is used for dynamic loading via <code>dlopen(&quot;libNAME.so.V(shr.o)&quot;,
   1124    RTLD_MEMBER)</code>
   1125   </li></ul>
   1126 </li><li> with the <code>Import File</code> as archive member named &lsquo;<samp>shr.imp</samp>&rsquo;,
   1127  which
   1128   <ul class="no-bullet">
   1129 <li>- refers to &lsquo;<samp>libNAME.so.V(shr.o)</samp>&rsquo; as the &quot;SONAME&quot;, to be recorded
   1130    in the <code>Loader Section</code> of subsequent binaries
   1131    </li><li>- indicates whether &lsquo;<samp>libNAME.so.V(shr.o)</samp>&rsquo; is 32 or 64 bit
   1132    </li><li>- lists all the public symbols exported by &lsquo;<samp>lib.so.V(shr.o)</samp>&rsquo;,
   1133    eventually decorated with the <code>&lsquo;<samp>weak</samp>&rsquo; Keyword</code>
   1134    </li><li>- is necessary for shared linking against &lsquo;<samp>lib.so.V(shr.o)</samp>&rsquo;
   1135    </li></ul>
   1136 </li></ul>
   1137 <p>A symbolic link using the &lsquo;<samp>libNAME.so</samp>&rsquo; filename scheme is created:
   1138   </p><ul>
   1139 <li> pointing to the &lsquo;<samp>libNAME.so.V</samp>&rsquo; <code>Shared Archive Library</code> file
   1140   </li><li> to permit the <code>ld Command</code> to find &lsquo;<samp>lib.so.V(shr.imp)</samp>&rsquo; via
   1141   the &lsquo;<samp>-lNAME</samp>&rsquo; argument (requires <code>Runtime Linking</code> to be enabled)
   1142   </li><li> to permit dynamic loading of &lsquo;<samp>lib.so.V(shr.o)</samp>&rsquo; without the need
   1143   to specify the version number via <code>dlopen(&quot;libNAME.so(shr.o)&quot;,
   1144   RTLD_MEMBER)</code>
   1145   </li></ul>
   1146 </dd>
   1147 </dl>
   1148 
   1149 <p>As long as static library creation is enabled, upon:
   1150 </p><dl compact="compact">
   1151 <dt><code>--with-aix-soname=svr4</code></dt>
   1152 <dd><p>A <code>Static Archive Library</code> is created:
   1153  </p><ul>
   1154 <li> using the &lsquo;<samp>libNAME.a</samp>&rsquo; filename scheme
   1155  </li><li> with all the <code>Static Object</code> files as archive members, which
   1156   <ul class="no-bullet">
   1157 <li>- are used for static linking
   1158   </li></ul>
   1159 </li></ul>
   1160 </dd>
   1161 </dl>
   1162 
   1163 <p>While the aix-soname=&lsquo;<samp>svr4</samp>&rsquo; option does not create <code>Shared Object</code>
   1164 files as members of unversioned <code>Archive Library</code> files any more, package
   1165 managers still are responsible to
   1166 <a href="./specific.html#TransferAixShobj">transfer</a> <code>Shared Object</code> files
   1167 found as member of a previously installed unversioned <code>Archive Library</code>
   1168 file into the newly installed <code>Archive Library</code> file with the same
   1169 filename.
   1170 </p>
   1171 <p><em>WARNING:</em> Creating <code>Shared Object</code> files with <code>Runtime Linking</code>
   1172 enabled may bloat the TOC, eventually leading to <code>TOC overflow</code> errors,
   1173 requiring the use of either the <samp>-Wl,-bbigtoc</samp> linker flag (seen to
   1174 break with the <code>GDB</code> debugger) or some of the TOC-related compiler flags,
   1175 see &ldquo;RS/6000 and PowerPC Options&rdquo; in the main manual.
   1176 </p>
   1177 <p><samp>--with-aix-soname</samp> is currently supported by &lsquo;<samp>libgcc_s</samp>&rsquo; only, so
   1178 this option is still experimental and not for normal use yet.
   1179 </p>
   1180 <p>Default is the traditional behavior <samp>--with-aix-soname=&lsquo;<samp>aix</samp>&rsquo;</samp>.
   1181 </p>
   1182 </dd>
   1183 <dt><code>--enable-languages=<var>lang1</var>,<var>lang2</var>,&hellip;</code></dt>
   1184 <dd><p>Specify that only a particular subset of compilers and
   1185 their runtime libraries should be built.  For a list of valid values for
   1186 <var>langN</var> you can issue the following command in the
   1187 <samp>gcc</samp> directory of your GCC source tree:<br>
   1188 </p><div class="smallexample">
   1189 <pre class="smallexample">grep ^language= */config-lang.in
   1190 </pre></div>
   1191 <p>Currently, you can use any of the following:
   1192 <code>all</code>, <code>default</code>, <code>ada</code>, <code>c</code>, <code>c++</code>, <code>fortran</code>,
   1193 <code>go</code>, <code>jit</code>, <code>lto</code>, <code>objc</code>, <code>obj-c++</code>.
   1194 Building the Ada compiler has special requirements, see below.
   1195 If you do not pass this flag, or specify the option <code>default</code>, then the
   1196 default languages available in the <samp>gcc</samp> sub-tree will be configured.
   1197 Ada, Go, Jit, and Objective-C++ are not default languages.  LTO is not a
   1198 default language, but is built by default because <samp>--enable-lto</samp> is
   1199 enabled by default.  The other languages are default languages.  If
   1200 <code>all</code> is specified, then all available languages are built.  An
   1201 exception is <code>jit</code> language, which requires
   1202 <samp>--enable-host-shared</samp> to be included with <code>all</code>.
   1203 </p>
   1204 </dd>
   1205 <dt><code>--enable-stage1-languages=<var>lang1</var>,<var>lang2</var>,&hellip;</code></dt>
   1206 <dd><p>Specify that a particular subset of compilers and their runtime
   1207 libraries should be built with the system C compiler during stage 1 of
   1208 the bootstrap process, rather than only in later stages with the
   1209 bootstrapped C compiler.  The list of valid values is the same as for
   1210 <samp>--enable-languages</samp>, and the option <code>all</code> will select all
   1211 of the languages enabled by <samp>--enable-languages</samp>.  This option is
   1212 primarily useful for GCC development; for instance, when a development
   1213 version of the compiler cannot bootstrap due to compiler bugs, or when
   1214 one is debugging front ends other than the C front end.  When this
   1215 option is used, one can then build the target libraries for the
   1216 specified languages with the stage-1 compiler by using <code>make
   1217 stage1-bubble all-target</code>, or run the testsuite on the stage-1 compiler
   1218 for the specified languages using <code>make stage1-start check-gcc</code>.
   1219 </p>
   1220 </dd>
   1221 <dt><code>--disable-libada</code></dt>
   1222 <dd><p>Specify that the run-time libraries and tools used by GNAT should not
   1223 be built.  This can be useful for debugging, or for compatibility with
   1224 previous Ada build procedures, when it was required to explicitly
   1225 do a &lsquo;<samp>make -C gcc gnatlib_and_tools</samp>&rsquo;.
   1226 </p>
   1227 </dd>
   1228 <dt><code>--disable-libsanitizer</code></dt>
   1229 <dd><p>Specify that the run-time libraries for the various sanitizers should
   1230 not be built.
   1231 </p>
   1232 </dd>
   1233 <dt><code>--disable-libssp</code></dt>
   1234 <dd><p>Specify that the run-time libraries for stack smashing protection
   1235 should not be built or linked against.  On many targets library support
   1236 is provided by the C library instead.
   1237 </p>
   1238 </dd>
   1239 <dt><code>--disable-libquadmath</code></dt>
   1240 <dd><p>Specify that the GCC quad-precision math library should not be built.
   1241 On some systems, the library is required to be linkable when building
   1242 the Fortran front end, unless <samp>--disable-libquadmath-support</samp>
   1243 is used.
   1244 </p>
   1245 </dd>
   1246 <dt><code>--disable-libquadmath-support</code></dt>
   1247 <dd><p>Specify that the Fortran front end and <code>libgfortran</code> do not add
   1248 support for <code>libquadmath</code> on systems supporting it.
   1249 </p>
   1250 </dd>
   1251 <dt><code>--disable-libgomp</code></dt>
   1252 <dd><p>Specify that the GNU Offloading and Multi Processing Runtime Library
   1253 should not be built.
   1254 </p>
   1255 </dd>
   1256 <dt><code>--disable-libvtv</code></dt>
   1257 <dd><p>Specify that the run-time libraries used by vtable verification
   1258 should not be built.
   1259 </p>
   1260 </dd>
   1261 <dt><code>--with-dwarf2</code></dt>
   1262 <dd><p>Specify that the compiler should
   1263 use DWARF 2 debugging information as the default.
   1264 </p>
   1265 </dd>
   1266 <dt><code>--with-advance-toolchain=<var>at</var></code></dt>
   1267 <dd><p>On 64-bit PowerPC Linux systems, configure the compiler to use the
   1268 header files, library files, and the dynamic linker from the Advance
   1269 Toolchain release <var>at</var> instead of the default versions that are
   1270 provided by the Linux distribution.  In general, this option is
   1271 intended for the developers of GCC, and it is not intended for general
   1272 use.
   1273 </p>
   1274 </dd>
   1275 <dt><code>--enable-targets=all</code></dt>
   1276 <dt><code>--enable-targets=<var>target_list</var></code></dt>
   1277 <dd><p>Some GCC targets, e.g. powerpc64-linux, build bi-arch compilers.
   1278 These are compilers that are able to generate either 64-bit or 32-bit
   1279 code.  Typically, the corresponding 32-bit target, e.g.
   1280 powerpc-linux for powerpc64-linux, only generates 32-bit code.  This
   1281 option enables the 32-bit target to be a bi-arch compiler, which is
   1282 useful when you want a bi-arch compiler that defaults to 32-bit, and
   1283 you are building a bi-arch or multi-arch binutils in a combined tree.
   1284 On mips-linux, this will build a tri-arch compiler (ABI o32/n32/64),
   1285 defaulted to o32.
   1286 Currently, this option only affects sparc-linux, powerpc-linux, x86-linux,
   1287 mips-linux and s390-linux.
   1288 </p>
   1289 </dd>
   1290 <dt><code>--enable-default-pie</code></dt>
   1291 <dd><p>Turn on <samp>-fPIE</samp> and <samp>-pie</samp> by default.
   1292 </p>
   1293 </dd>
   1294 <dt><code>--enable-secureplt</code></dt>
   1295 <dd><p>This option enables <samp>-msecure-plt</samp> by default for powerpc-linux.
   1296 See &ldquo;RS/6000 and PowerPC Options&rdquo; in the main manual
   1297 </p>
   1298 </dd>
   1299 <dt><code>--enable-default-ssp</code></dt>
   1300 <dd><p>Turn on <samp>-fstack-protector-strong</samp> by default.
   1301 </p>
   1302 </dd>
   1303 <dt><code>--enable-cld</code></dt>
   1304 <dd><p>This option enables <samp>-mcld</samp> by default for 32-bit x86 targets.
   1305 See &ldquo;i386 and x86-64 Options&rdquo; in the main manual
   1306 </p>
   1307 </dd>
   1308 <dt><code>--enable-win32-registry</code></dt>
   1309 <dt><code>--enable-win32-registry=<var>key</var></code></dt>
   1310 <dt><code>--disable-win32-registry</code></dt>
   1311 <dd><p>The <samp>--enable-win32-registry</samp> option enables Microsoft Windows-hosted GCC
   1312 to look up installations paths in the registry using the following key:
   1313 </p>
   1314 <div class="smallexample">
   1315 <pre class="smallexample"><code>HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\<var>key</var></code>
   1316 </pre></div>
   1317 
   1318 <p><var>key</var> defaults to GCC version number, and can be overridden by the
   1319 <samp>--enable-win32-registry=<var>key</var></samp> option.  Vendors and distributors
   1320 who use custom installers are encouraged to provide a different key,
   1321 perhaps one comprised of vendor name and GCC version number, to
   1322 avoid conflict with existing installations.  This feature is enabled
   1323 by default, and can be disabled by <samp>--disable-win32-registry</samp>
   1324 option.  This option has no effect on the other hosts.
   1325 </p>
   1326 </dd>
   1327 <dt><code>--nfp</code></dt>
   1328 <dd><p>Specify that the machine does not have a floating point unit.  This
   1329 option only applies to &lsquo;<samp>m68k-sun-sunos<var>n</var></samp>&rsquo;.  On any other
   1330 system, <samp>--nfp</samp> has no effect.
   1331 </p>
   1332 </dd>
   1333 <dt><code>--enable-werror</code></dt>
   1334 <dt><code>--disable-werror</code></dt>
   1335 <dt><code>--enable-werror=yes</code></dt>
   1336 <dt><code>--enable-werror=no</code></dt>
   1337 <dd><p>When you specify this option, it controls whether certain files in the
   1338 compiler are built with <samp>-Werror</samp> in bootstrap stage2 and later.
   1339 If you don&rsquo;t specify it, <samp>-Werror</samp> is turned on for the main
   1340 development trunk.  However it defaults to off for release branches and
   1341 final releases.  The specific files which get <samp>-Werror</samp> are
   1342 controlled by the Makefiles.
   1343 </p>
   1344 </dd>
   1345 <dt><code>--enable-checking</code></dt>
   1346 <dt><code>--enable-checking=<var>list</var></code></dt>
   1347 <dd><p>When you specify this option, the compiler is built to perform internal
   1348 consistency checks of the requested complexity.  This does not change the
   1349 generated code, but adds error checking within the compiler.  This will
   1350 slow down the compiler and may only work properly if you are building
   1351 the compiler with GCC.  This is &lsquo;<samp>yes,extra</samp>&rsquo; by default when building
   1352 from SVN or snapshots, but &lsquo;<samp>release</samp>&rsquo; for releases.  The default
   1353 for building the stage1 compiler is &lsquo;<samp>yes</samp>&rsquo;.  More control
   1354 over the checks may be had by specifying <var>list</var>.  The categories of
   1355 checks available are &lsquo;<samp>yes</samp>&rsquo; (most common checks
   1356 &lsquo;<samp>assert,misc,tree,gc,rtlflag,runtime</samp>&rsquo;), &lsquo;<samp>no</samp>&rsquo; (no checks at
   1357 all), &lsquo;<samp>all</samp>&rsquo; (all but &lsquo;<samp>valgrind</samp>&rsquo;), &lsquo;<samp>release</samp>&rsquo; (cheapest
   1358 checks &lsquo;<samp>assert,runtime</samp>&rsquo;) or &lsquo;<samp>none</samp>&rsquo; (same as &lsquo;<samp>no</samp>&rsquo;).
   1359 Individual checks can be enabled with these flags &lsquo;<samp>assert</samp>&rsquo;,
   1360 &lsquo;<samp>df</samp>&rsquo;, &lsquo;<samp>fold</samp>&rsquo;, &lsquo;<samp>gc</samp>&rsquo;, &lsquo;<samp>gcac</samp>&rsquo;, &lsquo;<samp>misc</samp>&rsquo;, &lsquo;<samp>rtl</samp>&rsquo;,
   1361 &lsquo;<samp>rtlflag</samp>&rsquo;, &lsquo;<samp>runtime</samp>&rsquo;, &lsquo;<samp>tree</samp>&rsquo;, &lsquo;<samp>extra</samp>&rsquo; and &lsquo;<samp>valgrind</samp>&rsquo;.
   1362 &lsquo;<samp>extra</samp>&rsquo; adds for &lsquo;<samp>misc</samp>&rsquo; checking extra checks that might affect
   1363 code generation and should therefore not differ between stage1 and later
   1364 stages.
   1365 </p>
   1366 <p>The &lsquo;<samp>valgrind</samp>&rsquo; check requires the external <code>valgrind</code>
   1367 simulator, available from <a href="http://valgrind.org/">http://valgrind.org/</a>.  The
   1368 &lsquo;<samp>df</samp>&rsquo;, &lsquo;<samp>rtl</samp>&rsquo;, &lsquo;<samp>gcac</samp>&rsquo; and &lsquo;<samp>valgrind</samp>&rsquo; checks are very expensive.
   1369 To disable all checking, &lsquo;<samp>--disable-checking</samp>&rsquo; or
   1370 &lsquo;<samp>--enable-checking=none</samp>&rsquo; must be explicitly requested.  Disabling
   1371 assertions will make the compiler and runtime slightly faster but
   1372 increase the risk of undetected internal errors causing wrong code to be
   1373 generated.
   1374 </p>
   1375 </dd>
   1376 <dt><code>--disable-stage1-checking</code></dt>
   1377 <dt><code>--enable-stage1-checking</code></dt>
   1378 <dt><code>--enable-stage1-checking=<var>list</var></code></dt>
   1379 <dd><p>If no <samp>--enable-checking</samp> option is specified the stage1
   1380 compiler will be built with &lsquo;<samp>yes</samp>&rsquo; checking enabled, otherwise
   1381 the stage1 checking flags are the same as specified by
   1382 <samp>--enable-checking</samp>.  To build the stage1 compiler with
   1383 different checking options use <samp>--enable-stage1-checking</samp>.
   1384 The list of checking options is the same as for <samp>--enable-checking</samp>.
   1385 If your system is too slow or too small to bootstrap a released compiler
   1386 with checking for stage1 enabled, you can use &lsquo;<samp>--disable-stage1-checking</samp>&rsquo;
   1387 to disable checking for the stage1 compiler.
   1388 </p>
   1389 </dd>
   1390 <dt><code>--enable-coverage</code></dt>
   1391 <dt><code>--enable-coverage=<var>level</var></code></dt>
   1392 <dd><p>With this option, the compiler is built to collect self coverage
   1393 information, every time it is run.  This is for internal development
   1394 purposes, and only works when the compiler is being built with gcc.  The
   1395 <var>level</var> argument controls whether the compiler is built optimized or
   1396 not, values are &lsquo;<samp>opt</samp>&rsquo; and &lsquo;<samp>noopt</samp>&rsquo;.  For coverage analysis you
   1397 want to disable optimization, for performance analysis you want to
   1398 enable optimization.  When coverage is enabled, the default level is
   1399 without optimization.
   1400 </p>
   1401 </dd>
   1402 <dt><code>--enable-gather-detailed-mem-stats</code></dt>
   1403 <dd><p>When this option is specified more detailed information on memory
   1404 allocation is gathered.  This information is printed when using
   1405 <samp>-fmem-report</samp>.
   1406 </p>
   1407 </dd>
   1408 <dt><code>--enable-valgrind-annotations</code></dt>
   1409 <dd><p>Mark selected memory related operations in the compiler when run under
   1410 valgrind to suppress false positives.
   1411 </p>
   1412 </dd>
   1413 <dt><code>--enable-nls</code></dt>
   1414 <dt><code>--disable-nls</code></dt>
   1415 <dd><p>The <samp>--enable-nls</samp> option enables Native Language Support (NLS),
   1416 which lets GCC output diagnostics in languages other than American
   1417 English.  Native Language Support is enabled by default if not doing a
   1418 canadian cross build.  The <samp>--disable-nls</samp> option disables NLS.
   1419 </p>
   1420 </dd>
   1421 <dt><code>--with-included-gettext</code></dt>
   1422 <dd><p>If NLS is enabled, the <samp>--with-included-gettext</samp> option causes the build
   1423 procedure to prefer its copy of GNU <code>gettext</code>.
   1424 </p>
   1425 </dd>
   1426 <dt><code>--with-catgets</code></dt>
   1427 <dd><p>If NLS is enabled, and if the host lacks <code>gettext</code> but has the
   1428 inferior <code>catgets</code> interface, the GCC build procedure normally
   1429 ignores <code>catgets</code> and instead uses GCC&rsquo;s copy of the GNU
   1430 <code>gettext</code> library.  The <samp>--with-catgets</samp> option causes the
   1431 build procedure to use the host&rsquo;s <code>catgets</code> in this situation.
   1432 </p>
   1433 </dd>
   1434 <dt><code>--with-libiconv-prefix=<var>dir</var></code></dt>
   1435 <dd><p>Search for libiconv header files in <samp><var>dir</var>/include</samp> and
   1436 libiconv library files in <samp><var>dir</var>/lib</samp>.
   1437 </p>
   1438 </dd>
   1439 <dt><code>--enable-obsolete</code></dt>
   1440 <dd><p>Enable configuration for an obsoleted system.  If you attempt to
   1441 configure GCC for a system (build, host, or target) which has been
   1442 obsoleted, and you do not specify this flag, configure will halt with an
   1443 error message.
   1444 </p>
   1445 <p>All support for systems which have been obsoleted in one release of GCC
   1446 is removed entirely in the next major release, unless someone steps
   1447 forward to maintain the port.
   1448 </p>
   1449 </dd>
   1450 <dt><code>--enable-decimal-float</code></dt>
   1451 <dt><code>--enable-decimal-float=yes</code></dt>
   1452 <dt><code>--enable-decimal-float=no</code></dt>
   1453 <dt><code>--enable-decimal-float=bid</code></dt>
   1454 <dt><code>--enable-decimal-float=dpd</code></dt>
   1455 <dt><code>--disable-decimal-float</code></dt>
   1456 <dd><p>Enable (or disable) support for the C decimal floating point extension
   1457 that is in the IEEE 754-2008 standard.  This is enabled by default only
   1458 on PowerPC, i386, and x86_64 GNU/Linux systems.  Other systems may also
   1459 support it, but require the user to specifically enable it.  You can
   1460 optionally control which decimal floating point format is used (either
   1461 &lsquo;<samp>bid</samp>&rsquo; or &lsquo;<samp>dpd</samp>&rsquo;).  The &lsquo;<samp>bid</samp>&rsquo; (binary integer decimal)
   1462 format is default on i386 and x86_64 systems, and the &lsquo;<samp>dpd</samp>&rsquo;
   1463 (densely packed decimal) format is default on PowerPC systems.
   1464 </p>
   1465 </dd>
   1466 <dt><code>--enable-fixed-point</code></dt>
   1467 <dt><code>--disable-fixed-point</code></dt>
   1468 <dd><p>Enable (or disable) support for C fixed-point arithmetic.
   1469 This option is enabled by default for some targets (such as MIPS) which
   1470 have hardware-support for fixed-point operations.  On other targets, you
   1471 may enable this option manually.
   1472 </p>
   1473 </dd>
   1474 <dt><code>--with-long-double-128</code></dt>
   1475 <dd><p>Specify if <code>long double</code> type should be 128-bit by default on selected
   1476 GNU/Linux architectures.  If using <code>--without-long-double-128</code>,
   1477 <code>long double</code> will be by default 64-bit, the same as <code>double</code> type.
   1478 When neither of these configure options are used, the default will be
   1479 128-bit <code>long double</code> when built against GNU C Library 2.4 and later,
   1480 64-bit <code>long double</code> otherwise.
   1481 </p>
   1482 </dd>
   1483 <dt><code>--with-long-double-format=ibm</code></dt>
   1484 <dt><code>--with-long-double-format=ieee</code></dt>
   1485 <dd><p>Specify whether <code>long double</code> uses the IBM extended double format
   1486 or the IEEE 128-bit floating point format on PowerPC Linux systems.
   1487 This configuration switch will only work on little endian PowerPC
   1488 Linux systems and on big endian 64-bit systems where the default cpu
   1489 is at least power7 (i.e. <samp>--with-cpu=power7</samp>,
   1490 <samp>--with-cpu=power8</samp>, or <samp>--with-cpu=power9</samp> is used).
   1491 </p>
   1492 <p>If you use the <samp>--with-long-double-64</samp> configuration option,
   1493 the <samp>--with-long-double-format=ibm</samp> and
   1494 <samp>--with-long-double-format=ieee</samp> options are ignored.
   1495 </p>
   1496 <p>The default <code>long double</code> format is to use IBM extended double.
   1497 Until all of the libraries are converted to use IEEE 128-bit floating
   1498 point, it is not recommended to use
   1499 <samp>--with-long-double-format=ieee</samp>.
   1500 </p>
   1501 <p>On little endian PowerPC Linux systems, if you explicitly set the
   1502 <code>long double</code> type, it will build multilibs to allow you to
   1503 select either <code>long double</code> format, unless you disable multilibs
   1504 with the <code>--disable-multilib</code> option.  At present,
   1505 <code>long double</code> multilibs are not built on big endian PowerPC Linux
   1506 systems.  If you are building multilibs, you will need to configure
   1507 the compiler using the <samp>--with-system-zlib</samp> option.
   1508 </p>
   1509 <p>If you do not set the <code>long double</code> type explicitly, no multilibs
   1510 will be generated.
   1511 </p>
   1512 </dd>
   1513 <dt><code>--enable-fdpic</code></dt>
   1514 <dd><p>On SH Linux systems, generate ELF FDPIC code.
   1515 </p>
   1516 </dd>
   1517 <dt><code>--with-gmp=<var>pathname</var></code></dt>
   1518 <dt><code>--with-gmp-include=<var>pathname</var></code></dt>
   1519 <dt><code>--with-gmp-lib=<var>pathname</var></code></dt>
   1520 <dt><code>--with-mpfr=<var>pathname</var></code></dt>
   1521 <dt><code>--with-mpfr-include=<var>pathname</var></code></dt>
   1522 <dt><code>--with-mpfr-lib=<var>pathname</var></code></dt>
   1523 <dt><code>--with-mpc=<var>pathname</var></code></dt>
   1524 <dt><code>--with-mpc-include=<var>pathname</var></code></dt>
   1525 <dt><code>--with-mpc-lib=<var>pathname</var></code></dt>
   1526 <dd><p>If you want to build GCC but do not have the GMP library, the MPFR
   1527 library and/or the MPC library installed in a standard location and
   1528 do not have their sources present in the GCC source tree then you
   1529 can explicitly specify the directory where they are installed
   1530 (&lsquo;<samp>--with-gmp=<var>gmpinstalldir</var></samp>&rsquo;,
   1531 &lsquo;<samp>--with-mpfr=<var>mpfrinstalldir</var></samp>&rsquo;,
   1532 &lsquo;<samp>--with-mpc=<var>mpcinstalldir</var></samp>&rsquo;).  The
   1533 <samp>--with-gmp=<var>gmpinstalldir</var></samp> option is shorthand for
   1534 <samp>--with-gmp-lib=<var>gmpinstalldir</var>/lib</samp> and
   1535 <samp>--with-gmp-include=<var>gmpinstalldir</var>/include</samp>.  Likewise the
   1536 <samp>--with-mpfr=<var>mpfrinstalldir</var></samp> option is shorthand for
   1537 <samp>--with-mpfr-lib=<var>mpfrinstalldir</var>/lib</samp> and
   1538 <samp>--with-mpfr-include=<var>mpfrinstalldir</var>/include</samp>, also the
   1539 <samp>--with-mpc=<var>mpcinstalldir</var></samp> option is shorthand for
   1540 <samp>--with-mpc-lib=<var>mpcinstalldir</var>/lib</samp> and
   1541 <samp>--with-mpc-include=<var>mpcinstalldir</var>/include</samp>.  If these
   1542 shorthand assumptions are not correct, you can use the explicit
   1543 include and lib options directly.  You might also need to ensure the
   1544 shared libraries can be found by the dynamic linker when building and
   1545 using GCC, for example by setting the runtime shared library path
   1546 variable (<code>LD_LIBRARY_PATH</code> on GNU/Linux and Solaris systems).
   1547 </p>
   1548 <p>These flags are applicable to the host platform only.  When building
   1549 a cross compiler, they will not be used to configure target libraries.
   1550 </p>
   1551 </dd>
   1552 <dt><code>--with-isl=<var>pathname</var></code></dt>
   1553 <dt><code>--with-isl-include=<var>pathname</var></code></dt>
   1554 <dt><code>--with-isl-lib=<var>pathname</var></code></dt>
   1555 <dd><p>If you do not have the isl library installed in a standard location and you
   1556 want to build GCC, you can explicitly specify the directory where it is
   1557 installed (&lsquo;<samp>--with-isl=<var>islinstalldir</var></samp>&rsquo;). The
   1558 <samp>--with-isl=<var>islinstalldir</var></samp> option is shorthand for
   1559 <samp>--with-isl-lib=<var>islinstalldir</var>/lib</samp> and
   1560 <samp>--with-isl-include=<var>islinstalldir</var>/include</samp>. If this
   1561 shorthand assumption is not correct, you can use the explicit
   1562 include and lib options directly.
   1563 </p>
   1564 <p>These flags are applicable to the host platform only.  When building
   1565 a cross compiler, they will not be used to configure target libraries.
   1566 </p>
   1567 </dd>
   1568 <dt><code>--with-stage1-ldflags=<var>flags</var></code></dt>
   1569 <dd><p>This option may be used to set linker flags to be used when linking
   1570 stage 1 of GCC.  These are also used when linking GCC if configured with
   1571 <samp>--disable-bootstrap</samp>.  If <samp>--with-stage1-libs</samp> is not set to a
   1572 value, then the default is &lsquo;<samp>-static-libstdc++ -static-libgcc</samp>&rsquo;, if
   1573 supported.
   1574 </p>
   1575 </dd>
   1576 <dt><code>--with-stage1-libs=<var>libs</var></code></dt>
   1577 <dd><p>This option may be used to set libraries to be used when linking stage 1
   1578 of GCC.  These are also used when linking GCC if configured with
   1579 <samp>--disable-bootstrap</samp>.
   1580 </p>
   1581 </dd>
   1582 <dt><code>--with-boot-ldflags=<var>flags</var></code></dt>
   1583 <dd><p>This option may be used to set linker flags to be used when linking
   1584 stage 2 and later when bootstrapping GCC.  If &ndash;with-boot-libs
   1585 is not is set to a value, then the default is
   1586 &lsquo;<samp>-static-libstdc++ -static-libgcc</samp>&rsquo;.
   1587 </p>
   1588 </dd>
   1589 <dt><code>--with-boot-libs=<var>libs</var></code></dt>
   1590 <dd><p>This option may be used to set libraries to be used when linking stage 2
   1591 and later when bootstrapping GCC.
   1592 </p>
   1593 </dd>
   1594 <dt><code>--with-debug-prefix-map=<var>map</var></code></dt>
   1595 <dd><p>Convert source directory names using <samp>-fdebug-prefix-map</samp> when
   1596 building runtime libraries.  &lsquo;<samp><var>map</var></samp>&rsquo; is a space-separated
   1597 list of maps of the form &lsquo;<samp><var>old</var>=<var>new</var></samp>&rsquo;.
   1598 </p>
   1599 </dd>
   1600 <dt><code>--enable-linker-build-id</code></dt>
   1601 <dd><p>Tells GCC to pass <samp>--build-id</samp> option to the linker for all final
   1602 links (links performed without the <samp>-r</samp> or <samp>--relocatable</samp>
   1603 option), if the linker supports it.  If you specify
   1604 <samp>--enable-linker-build-id</samp>, but your linker does not
   1605 support <samp>--build-id</samp> option, a warning is issued and the
   1606 <samp>--enable-linker-build-id</samp> option is ignored.  The default is off.
   1607 </p>
   1608 </dd>
   1609 <dt><code>--with-linker-hash-style=<var>choice</var></code></dt>
   1610 <dd><p>Tells GCC to pass <samp>--hash-style=<var>choice</var></samp> option to the
   1611 linker for all final links. <var>choice</var> can be one of
   1612 &lsquo;<samp>sysv</samp>&rsquo;, &lsquo;<samp>gnu</samp>&rsquo;, and &lsquo;<samp>both</samp>&rsquo; where &lsquo;<samp>sysv</samp>&rsquo; is the default.
   1613 </p>
   1614 </dd>
   1615 <dt><code>--enable-gnu-unique-object</code></dt>
   1616 <dt><code>--disable-gnu-unique-object</code></dt>
   1617 <dd><p>Tells GCC to use the gnu_unique_object relocation for C++ template
   1618 static data members and inline function local statics.  Enabled by
   1619 default for a toolchain with an assembler that accepts it and
   1620 GLIBC 2.11 or above, otherwise disabled.
   1621 </p>
   1622 </dd>
   1623 <dt><code>--with-diagnostics-color=<var>choice</var></code></dt>
   1624 <dd><p>Tells GCC to use <var>choice</var> as the default for <samp>-fdiagnostics-color=</samp>
   1625 option (if not used explicitly on the command line).  <var>choice</var>
   1626 can be one of &lsquo;<samp>never</samp>&rsquo;, &lsquo;<samp>auto</samp>&rsquo;, &lsquo;<samp>always</samp>&rsquo;, and &lsquo;<samp>auto-if-env</samp>&rsquo;
   1627 where &lsquo;<samp>auto</samp>&rsquo; is the default.  &lsquo;<samp>auto-if-env</samp>&rsquo; means that
   1628 <samp>-fdiagnostics-color=auto</samp> will be the default if <code>GCC_COLORS</code>
   1629 is present and non-empty in the environment, and
   1630 <samp>-fdiagnostics-color=never</samp> otherwise.
   1631 </p>
   1632 </dd>
   1633 <dt><code>--enable-lto</code></dt>
   1634 <dt><code>--disable-lto</code></dt>
   1635 <dd><p>Enable support for link-time optimization (LTO).  This is enabled by
   1636 default, and may be disabled using <samp>--disable-lto</samp>.
   1637 </p>
   1638 </dd>
   1639 <dt><code>--enable-linker-plugin-configure-flags=FLAGS</code></dt>
   1640 <dt><code>--enable-linker-plugin-flags=FLAGS</code></dt>
   1641 <dd><p>By default, linker plugins (such as the LTO plugin) are built for the
   1642 host system architecture.  For the case that the linker has a
   1643 different (but run-time compatible) architecture, these flags can be
   1644 specified to build plugins that are compatible to the linker.  For
   1645 example, if you are building GCC for a 64-bit x86_64
   1646 (&lsquo;<samp>x86_64-unknown-linux-gnu</samp>&rsquo;) host system, but have a 32-bit x86
   1647 GNU/Linux (&lsquo;<samp>i686-pc-linux-gnu</samp>&rsquo;) linker executable (which is
   1648 executable on the former system), you can configure GCC as follows for
   1649 getting compatible linker plugins:
   1650 </p>
   1651 <div class="smallexample">
   1652 <pre class="smallexample">% <var>srcdir</var>/configure \
   1653     --host=x86_64-unknown-linux-gnu \
   1654     --enable-linker-plugin-configure-flags=--host=i686-pc-linux-gnu \
   1655     --enable-linker-plugin-flags='CC=gcc\ -m32\ -Wl,-rpath,[...]/i686-pc-linux-gnu/lib'
   1656 </pre></div>
   1657 
   1658 </dd>
   1659 <dt><code>--with-plugin-ld=<var>pathname</var></code></dt>
   1660 <dd><p>Enable an alternate linker to be used at link-time optimization (LTO)
   1661 link time when <samp>-fuse-linker-plugin</samp> is enabled.
   1662 This linker should have plugin support such as gold starting with
   1663 version 2.20 or GNU ld starting with version 2.21.
   1664 See <samp>-fuse-linker-plugin</samp> for details.
   1665 </p>
   1666 </dd>
   1667 <dt><code>--enable-canonical-system-headers</code></dt>
   1668 <dt><code>--disable-canonical-system-headers</code></dt>
   1669 <dd><p>Enable system header path canonicalization for <samp>libcpp</samp>.  This can
   1670 produce shorter header file paths in diagnostics and dependency output
   1671 files, but these changed header paths may conflict with some compilation
   1672 environments.  Enabled by default, and may be disabled using
   1673 <samp>--disable-canonical-system-headers</samp>.
   1674 </p>
   1675 </dd>
   1676 <dt><code>--with-glibc-version=<var>major</var>.<var>minor</var></code></dt>
   1677 <dd><p>Tell GCC that when the GNU C Library (glibc) is used on the target it
   1678 will be version <var>major</var>.<var>minor</var> or later.  Normally this can
   1679 be detected from the C library&rsquo;s header files, but this option may be
   1680 needed when bootstrapping a cross toolchain without the header files
   1681 available for building the initial bootstrap compiler.
   1682 </p>
   1683 <p>If GCC is configured with some multilibs that use glibc and some that
   1684 do not, this option applies only to the multilibs that use glibc.
   1685 However, such configurations may not work well as not all the relevant
   1686 configuration in GCC is on a per-multilib basis.
   1687 </p>
   1688 </dd>
   1689 <dt><code>--enable-as-accelerator-for=<var>target</var></code></dt>
   1690 <dd><p>Build as offload target compiler. Specify offload host triple by <var>target</var>.
   1691 </p>
   1692 </dd>
   1693 <dt><code>--enable-offload-targets=<var>target1</var>[=<var>path1</var>],&hellip;,<var>targetN</var>[=<var>pathN</var>]</code></dt>
   1694 <dd><p>Enable offloading to targets <var>target1</var>, &hellip;, <var>targetN</var>.
   1695 Offload compilers are expected to be already installed.  Default search
   1696 path for them is <samp><var>exec-prefix</var></samp>, but it can be changed by
   1697 specifying paths <var>path1</var>, &hellip;, <var>pathN</var>.
   1698 </p>
   1699 <div class="smallexample">
   1700 <pre class="smallexample">% <var>srcdir</var>/configure \
   1701     --enable-offload-target=i686-unknown-linux-gnu=/path/to/i686/compiler,x86_64-pc-linux-gnu
   1702 </pre></div>
   1703 
   1704 <p>If &lsquo;<samp>hsa</samp>&rsquo; is specified as one of the targets, the compiler will be
   1705 built with support for HSA GPU accelerators.  Because the same
   1706 compiler will emit the accelerator code, no path should be specified.
   1707 </p>
   1708 </dd>
   1709 <dt><code>--with-hsa-runtime=<var>pathname</var></code></dt>
   1710 <dt><code>--with-hsa-runtime-include=<var>pathname</var></code></dt>
   1711 <dt><code>--with-hsa-runtime-lib=<var>pathname</var></code></dt>
   1712 <dd>
   1713 <p>If you configure GCC with HSA offloading but do not have the HSA
   1714 run-time library installed in a standard location then you can
   1715 explicitly specify the directory where they are installed.  The
   1716 <samp>--with-hsa-runtime=<var>hsainstalldir</var></samp> option is a
   1717 shorthand for
   1718 <samp>--with-hsa-runtime-lib=<var>hsainstalldir</var>/lib</samp> and
   1719 <samp>--with-hsa-runtime-include=<var>hsainstalldir</var>/include</samp>.
   1720 </p>
   1721 </dd>
   1722 <dt><code>--enable-cet</code></dt>
   1723 <dt><code>--disable-cet</code></dt>
   1724 <dd><p>Enable building target run-time libraries with control-flow
   1725 instrumentation, see <samp>-fcf-protection</samp> option.  When
   1726 <code>--enable-cet</code> is specified target libraries are configured
   1727 to add <samp>-fcf-protection</samp> and, if needed, other target
   1728 specific options to a set of building options.
   1729 </p>
   1730 <p>The option is disabled by default.  When <code>--enable-cet=auto</code>
   1731 is used, it is enabled on Linux/x86 if target binutils
   1732 supports <code>Intel CET</code> instructions and disabled otherwise.
   1733 In this case the target libraries are configured to get additional
   1734 <samp>-fcf-protection</samp> option.
   1735 </p></dd>
   1736 </dl>
   1737 
   1738 <a name="Cross-Compiler-Specific-Options"></a>
   1739 <h4 class="subheading">Cross-Compiler-Specific Options</h4>
   1740 <p>The following options only apply to building cross compilers.
   1741 </p>
   1742 <dl compact="compact">
   1743 <dt><code>--with-sysroot</code></dt>
   1744 <dt><code>--with-sysroot=<var>dir</var></code></dt>
   1745 <dd><p>Tells GCC to consider <var>dir</var> as the root of a tree that contains
   1746 (a subset of) the root filesystem of the target operating system.
   1747 Target system headers, libraries and run-time object files will be
   1748 searched for in there.  More specifically, this acts as if
   1749 <samp>--sysroot=<var>dir</var></samp> was added to the default options of the built
   1750 compiler.  The specified directory is not copied into the
   1751 install tree, unlike the options <samp>--with-headers</samp> and
   1752 <samp>--with-libs</samp> that this option obsoletes.  The default value,
   1753 in case <samp>--with-sysroot</samp> is not given an argument, is
   1754 <samp>${gcc_tooldir}/sys-root</samp>.  If the specified directory is a
   1755 subdirectory of <samp>${exec_prefix}</samp>, then it will be found relative to
   1756 the GCC binaries if the installation tree is moved.
   1757 </p>
   1758 <p>This option affects the system root for the compiler used to build
   1759 target libraries (which runs on the build system) and the compiler newly
   1760 installed with <code>make install</code>; it does not affect the compiler which is
   1761 used to build GCC itself.
   1762 </p>
   1763 <p>If you specify the <samp>--with-native-system-header-dir=<var>dirname</var></samp>
   1764 option then the compiler will search that directory within <var>dirname</var> for
   1765 native system headers rather than the default <samp>/usr/include</samp>.
   1766 </p>
   1767 </dd>
   1768 <dt><code>--with-build-sysroot</code></dt>
   1769 <dt><code>--with-build-sysroot=<var>dir</var></code></dt>
   1770 <dd><p>Tells GCC to consider <var>dir</var> as the system root (see
   1771 <samp>--with-sysroot</samp>) while building target libraries, instead of
   1772 the directory specified with <samp>--with-sysroot</samp>.  This option is
   1773 only useful when you are already using <samp>--with-sysroot</samp>.  You
   1774 can use <samp>--with-build-sysroot</samp> when you are configuring with
   1775 <samp>--prefix</samp> set to a directory that is different from the one in
   1776 which you are installing GCC and your target libraries.
   1777 </p>
   1778 <p>This option affects the system root for the compiler used to build
   1779 target libraries (which runs on the build system); it does not affect
   1780 the compiler which is used to build GCC itself.
   1781 </p>
   1782 <p>If you specify the <samp>--with-native-system-header-dir=<var>dirname</var></samp>
   1783 option then the compiler will search that directory within <var>dirname</var> for
   1784 native system headers rather than the default <samp>/usr/include</samp>.
   1785 </p>
   1786 </dd>
   1787 <dt><code>--with-headers</code></dt>
   1788 <dt><code>--with-headers=<var>dir</var></code></dt>
   1789 <dd><p>Deprecated in favor of <samp>--with-sysroot</samp>.
   1790 Specifies that target headers are available when building a cross compiler.
   1791 The <var>dir</var> argument specifies a directory which has the target include
   1792 files.  These include files will be copied into the <samp>gcc</samp> install
   1793 directory.  <em>This option with the <var>dir</var> argument is required</em> when
   1794 building a cross compiler, if <samp><var>prefix</var>/<var>target</var>/sys-include</samp>
   1795 doesn&rsquo;t pre-exist.  If <samp><var>prefix</var>/<var>target</var>/sys-include</samp> does
   1796 pre-exist, the <var>dir</var> argument may be omitted.  <code>fixincludes</code>
   1797 will be run on these files to make them compatible with GCC.
   1798 </p>
   1799 </dd>
   1800 <dt><code>--without-headers</code></dt>
   1801 <dd><p>Tells GCC not use any target headers from a libc when building a cross
   1802 compiler.  When crossing to GNU/Linux, you need the headers so GCC
   1803 can build the exception handling for libgcc.
   1804 </p>
   1805 </dd>
   1806 <dt><code>--with-libs</code></dt>
   1807 <dt><code>--with-libs=&quot;<var>dir1</var> <var>dir2</var> &hellip; <var>dirN</var>&quot;</code></dt>
   1808 <dd><p>Deprecated in favor of <samp>--with-sysroot</samp>.
   1809 Specifies a list of directories which contain the target runtime
   1810 libraries.  These libraries will be copied into the <samp>gcc</samp> install
   1811 directory.  If the directory list is omitted, this option has no
   1812 effect.
   1813 </p>
   1814 </dd>
   1815 <dt><code>--with-newlib</code></dt>
   1816 <dd><p>Specifies that &lsquo;<samp>newlib</samp>&rsquo; is
   1817 being used as the target C library.  This causes <code>__eprintf</code> to be
   1818 omitted from <samp>libgcc.a</samp> on the assumption that it will be provided by
   1819 &lsquo;<samp>newlib</samp>&rsquo;.
   1820 </p>
   1821 </dd>
   1822 <dt><code>--with-avrlibc</code></dt>
   1823 <dd><p>Specifies that &lsquo;<samp>AVR-Libc</samp>&rsquo; is
   1824 being used as the target C library.  This causes float support
   1825 functions like <code>__addsf3</code> to be omitted from <samp>libgcc.a</samp> on
   1826 the assumption that it will be provided by <samp>libm.a</samp>.  For more
   1827 technical details, cf. <a href="http://gcc.gnu.org/PR54461">PR54461</a>.
   1828 This option is only supported for the AVR target.  It is not supported for
   1829 RTEMS configurations, which currently use newlib.  The option is
   1830 supported since version 4.7.2 and is the default in 4.8.0 and newer.
   1831 </p>
   1832 </dd>
   1833 <dt><code>--with-nds32-lib=<var>library</var></code></dt>
   1834 <dd><p>Specifies that <var>library</var> setting is used for building <samp>libgcc.a</samp>.
   1835 Currently, the valid <var>library</var> is &lsquo;<samp>newlib</samp>&rsquo; or &lsquo;<samp>mculib</samp>&rsquo;.
   1836 This option is only supported for the NDS32 target.
   1837 </p>
   1838 </dd>
   1839 <dt><code>--with-build-time-tools=<var>dir</var></code></dt>
   1840 <dd><p>Specifies where to find the set of target tools (assembler, linker, etc.)
   1841 that will be used while building GCC itself.  This option can be useful
   1842 if the directory layouts are different between the system you are building
   1843 GCC on, and the system where you will deploy it.
   1844 </p>
   1845 <p>For example, on an &lsquo;<samp>ia64-hp-hpux</samp>&rsquo; system, you may have the GNU
   1846 assembler and linker in <samp>/usr/bin</samp>, and the native tools in a
   1847 different path, and build a toolchain that expects to find the
   1848 native tools in <samp>/usr/bin</samp>.
   1849 </p>
   1850 <p>When you use this option, you should ensure that <var>dir</var> includes
   1851 <code>ar</code>, <code>as</code>, <code>ld</code>, <code>nm</code>,
   1852 <code>ranlib</code> and <code>strip</code> if necessary, and possibly
   1853 <code>objdump</code>.  Otherwise, GCC may use an inconsistent set of
   1854 tools.
   1855 </p></dd>
   1856 </dl>
   1857 
   1858 <a name="Overriding-configure-test-results"></a>
   1859 <h4 class="subsubheading">Overriding <code>configure</code> test results</h4>
   1860 
   1861 <p>Sometimes, it might be necessary to override the result of some
   1862 <code>configure</code> test, for example in order to ease porting to a new
   1863 system or work around a bug in a test.  The toplevel <code>configure</code>
   1864 script provides three variables for this:
   1865 </p>
   1866 <dl compact="compact">
   1867 <dt><code>build_configargs</code></dt>
   1868 <dd><a name="index-build_005fconfigargs"></a>
   1869 <p>The contents of this variable is passed to all build <code>configure</code>
   1870 scripts.
   1871 </p>
   1872 </dd>
   1873 <dt><code>host_configargs</code></dt>
   1874 <dd><a name="index-host_005fconfigargs"></a>
   1875 <p>The contents of this variable is passed to all host <code>configure</code>
   1876 scripts.
   1877 </p>
   1878 </dd>
   1879 <dt><code>target_configargs</code></dt>
   1880 <dd><a name="index-target_005fconfigargs"></a>
   1881 <p>The contents of this variable is passed to all target <code>configure</code>
   1882 scripts.
   1883 </p>
   1884 </dd>
   1885 </dl>
   1886 
   1887 <p>In order to avoid shell and <code>make</code> quoting issues for complex
   1888 overrides, you can pass a setting for <code>CONFIG_SITE</code> and set
   1889 variables in the site file.
   1890 </p>
   1891 <a name="Objective-C-Specific-Options"></a>
   1892 <h4 class="subheading">Objective-C-Specific Options</h4>
   1893 
   1894 <p>The following options apply to the build of the Objective-C runtime library.
   1895 </p>
   1896 <dl compact="compact">
   1897 <dt><code>--enable-objc-gc</code></dt>
   1898 <dd><p>Specify that an additional variant of the GNU Objective-C runtime library
   1899 is built, using an external build of the Boehm-Demers-Weiser garbage
   1900 collector (<a href="http://www.hboehm.info/gc/">http://www.hboehm.info/gc/</a>).  This library needs to be
   1901 available for each multilib variant, unless configured with
   1902 <samp>--enable-objc-gc=&lsquo;<samp>auto</samp>&rsquo;</samp> in which case the build of the
   1903 additional runtime library is skipped when not available and the build
   1904 continues.
   1905 </p>
   1906 </dd>
   1907 <dt><code>--with-target-bdw-gc=<var>list</var></code></dt>
   1908 <dt><code>--with-target-bdw-gc-include=<var>list</var></code></dt>
   1909 <dt><code>--with-target-bdw-gc-lib=<var>list</var></code></dt>
   1910 <dd><p>Specify search directories for the garbage collector header files and
   1911 libraries. <var>list</var> is a comma separated list of key value pairs of the
   1912 form &lsquo;<samp><var>multilibdir</var>=<var>path</var></samp>&rsquo;, where the default multilib key
   1913 is named as &lsquo;<samp>.</samp>&rsquo; (dot), or is omitted (e.g.
   1914 &lsquo;<samp>--with-target-bdw-gc=/opt/bdw-gc,32=/opt-bdw-gc32</samp>&rsquo;).
   1915 </p>
   1916 <p>The options <samp>--with-target-bdw-gc-include</samp> and
   1917 <samp>--with-target-bdw-gc-lib</samp> must always be specified together
   1918 for each multilib variant and they take precedence over
   1919 <samp>--with-target-bdw-gc</samp>.  If <samp>--with-target-bdw-gc-include</samp>
   1920 is missing values for a multilib, then the value for the default
   1921 multilib is used (e.g. &lsquo;<samp>--with-target-bdw-gc-include=/opt/bdw-gc/include</samp>&rsquo;
   1922 &lsquo;<samp>--with-target-bdw-gc-lib=/opt/bdw-gc/lib64,32=/opt-bdw-gc/lib32</samp>&rsquo;).
   1923 If none of these options are specified, the library is assumed in
   1924 default locations.
   1925 </p></dd>
   1926 </dl>
   1927 
   1928 <hr />
   1929 <p>
   1930 <p><a href="./index.html">Return to the GCC Installation page</a>
   1931 </p>
   1932 
   1933 
   1934 
   1935 
   1936 
   1937 
   1938 
   1939 
   1940 
   1941 
   1942 
   1943 </body>
   1944 </html>
   1945