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