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