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