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