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