xref: /netbsd-src/external/gpl3/gcc/dist/gcc/doc/install.texi (revision 0a3071956a3a9fdebdbf7f338cf2d439b45fc728)
1\input texinfo.tex    @c -*-texinfo-*-
2@c @ifnothtml
3@c %**start of header
4@setfilename gccinstall.info
5@setchapternewpage odd
6@c %**end of header
7@c @end ifnothtml
8
9@include gcc-common.texi
10
11@c Specify title for specific html page
12@ifset indexhtml
13@settitle Installing GCC
14@end ifset
15@ifset specifichtml
16@settitle Host/Target specific installation notes for GCC
17@end ifset
18@ifset prerequisiteshtml
19@settitle Prerequisites for GCC
20@end ifset
21@ifset downloadhtml
22@settitle Downloading GCC
23@end ifset
24@ifset configurehtml
25@settitle Installing GCC: Configuration
26@end ifset
27@ifset buildhtml
28@settitle Installing GCC: Building
29@end ifset
30@ifset testhtml
31@settitle Installing GCC: Testing
32@end ifset
33@ifset finalinstallhtml
34@settitle Installing GCC: Final installation
35@end ifset
36@ifset binarieshtml
37@settitle Installing GCC: Binaries
38@end ifset
39@ifset gfdlhtml
40@settitle Installing GCC: GNU Free Documentation License
41@end ifset
42
43@c Copyright (C) 1988-2022 Free Software Foundation, Inc.
44@c *** Converted to texinfo by Dean Wakerley, dean@wakerley.com
45
46@c IMPORTANT: whenever you modify this file, run `install.texi2html' to
47@c test the generation of HTML documents for the gcc.gnu.org web pages.
48@c
49@c Do not use @footnote{} in this file as it breaks install.texi2html!
50
51@c Include everything if we're not making html
52@ifnothtml
53@set indexhtml
54@set specifichtml
55@set prerequisiteshtml
56@set downloadhtml
57@set configurehtml
58@set buildhtml
59@set testhtml
60@set finalinstallhtml
61@set binarieshtml
62@set gfdlhtml
63@end ifnothtml
64
65@c Part 2 Summary Description and Copyright
66@copying
67Copyright @copyright{} 1988-2022 Free Software Foundation, Inc.
68@sp 1
69Permission is granted to copy, distribute and/or modify this document
70under the terms of the GNU Free Documentation License, Version 1.3 or
71any later version published by the Free Software Foundation; with no
72Invariant Sections, the Front-Cover texts being (a) (see below), and
73with the Back-Cover Texts being (b) (see below).  A copy of the
74license is included in the section entitled ``@uref{./gfdl.html,,GNU
75Free Documentation License}''.
76
77(a) The FSF's Front-Cover Text is:
78
79     A GNU Manual
80
81(b) The FSF's Back-Cover Text is:
82
83     You have freedom to copy and modify this GNU Manual, like GNU
84     software.  Copies published by the Free Software Foundation raise
85     funds for GNU development.
86@end copying
87@ifinfo
88@insertcopying
89@end ifinfo
90@dircategory Software development
91@direntry
92* gccinstall: (gccinstall).    Installing the GNU Compiler Collection.
93@end direntry
94
95@c Part 3 Titlepage and Copyright
96@titlepage
97@title Installing GCC
98@versionsubtitle
99
100@c The following two commands start the copyright page.
101@page
102@vskip 0pt plus 1filll
103@insertcopying
104@end titlepage
105
106@c Part 4 Top node, Master Menu, and/or Table of Contents
107@ifinfo
108@node    Top, , , (dir)
109@comment node-name, next,          Previous, up
110
111@menu
112* Installing GCC::  This document describes the generic installation
113                    procedure for GCC as well as detailing some target
114                    specific installation instructions.
115
116* Specific::        Host/target specific installation notes for GCC.
117* Binaries::        Where to get pre-compiled binaries.
118
119* GNU Free Documentation License:: How you can copy and share this manual.
120* Concept Index::   This index has two entries.
121@end menu
122@end ifinfo
123
124@iftex
125@contents
126@end iftex
127
128@c Part 5 The Body of the Document
129@c ***Installing GCC**********************************************************
130@ifnothtml
131@comment node-name,     next,          previous, up
132@node    Installing GCC, Binaries, , Top
133@end ifnothtml
134@ifset indexhtml
135@ifnothtml
136@chapter Installing GCC
137@end ifnothtml
138
139The latest version of this document is always available at
140@uref{https://gcc.gnu.org/install/,,https://gcc.gnu.org/install/}.
141It refers to the current development sources, instructions for
142specific released versions are included with the sources.
143
144This document describes the generic installation procedure for GCC as well
145as detailing some target specific installation instructions.
146
147GCC includes several components that previously were separate distributions
148with their own installation instructions.  This document supersedes all
149package-specific installation instructions.
150
151@emph{Before} starting the build/install procedure please check the
152@ifnothtml
153@ref{Specific, host/target specific installation notes}.
154@end ifnothtml
155@ifhtml
156@uref{specific.html,,host/target specific installation notes}.
157@end ifhtml
158We recommend you browse the entire generic installation instructions before
159you proceed.
160
161Lists of successful builds for released versions of GCC are
162available at @uref{https://gcc.gnu.org/buildstat.html}.
163These lists are updated as new information becomes available.
164
165The installation procedure itself is broken into five steps.
166
167@ifinfo
168@menu
169* Prerequisites::
170* Downloading the source::
171* Configuration::
172* Building::
173* Testing:: (optional)
174* Final install::
175@end menu
176@end ifinfo
177@ifhtml
178@enumerate
179@item
180@uref{prerequisites.html,,Prerequisites}
181@item
182@uref{download.html,,Downloading the source}
183@item
184@uref{configure.html,,Configuration}
185@item
186@uref{build.html,,Building}
187@item
188@uref{test.html,,Testing} (optional)
189@item
190@uref{finalinstall.html,,Final install}
191@end enumerate
192@end ifhtml
193
194Please note that GCC does not support @samp{make uninstall} and probably
195won't do so in the near future as this would open a can of worms.  Instead,
196we suggest that you install GCC into a directory of its own and simply
197remove that directory when you do not need that specific version of GCC
198any longer, and, if shared libraries are installed there as well, no
199more binaries exist that use them.
200
201@html
202<hr />
203<p>
204@end html
205@ifhtml
206@uref{./index.html,,Return to the GCC Installation page}
207
208@insertcopying
209@end ifhtml
210@end ifset
211
212@c ***Prerequisites**************************************************
213@ifnothtml
214@comment node-name,     next,          previous, up
215@node    Prerequisites, Downloading the source, , Installing GCC
216@end ifnothtml
217@ifset prerequisiteshtml
218@ifnothtml
219@chapter Prerequisites
220@end ifnothtml
221@cindex Prerequisites
222
223GCC requires that various tools and packages be available for use in the
224build procedure.  Modifying GCC sources requires additional tools
225described below.
226
227@heading Tools/packages necessary for building GCC
228@table @asis
229@item ISO C++11 compiler
230Necessary to bootstrap GCC.  GCC 4.8.3 or newer has sufficient
231support for used C++11 features, with earlier GCC versions you
232might run into implementation bugs.
233
234Versions of GCC prior to 11 also allow bootstrapping with an ISO C++98
235compiler, versions of GCC prior to 4.8 also allow bootstrapping with a
236ISO C89 compiler, and versions of GCC prior to 3.4 also allow
237bootstrapping with a traditional (K&R) C compiler.
238
239To build all languages in a cross-compiler or other configuration where
2403-stage bootstrap is not performed, you need to start with an existing
241GCC binary (version 4.8.3 or later) because source code for language
242frontends other than C might use GCC extensions.
243
244@item C standard library and headers
245
246In order to build GCC, the C standard library and headers must be present
247for all target variants for which target libraries will be built (and not
248only the variant of the host C++ compiler).
249
250This affects the popular @samp{x86_64-pc-linux-gnu} platform (among
251other multilib targets), for which 64-bit (@samp{x86_64}) and 32-bit
252(@samp{i386}) libc headers are usually packaged separately. If you do a
253build of a native compiler on @samp{x86_64-pc-linux-gnu}, make sure you
254either have the 32-bit libc developer package properly installed (the exact
255name of the package depends on your distro) or you must build GCC as a
25664-bit only compiler by configuring with the option
257@option{--disable-multilib}.  Otherwise, you may encounter an error such as
258@samp{fatal error: gnu/stubs-32.h: No such file}
259
260@item @anchor{GNAT-prerequisite}GNAT
261
262In order to build GNAT, the Ada compiler, you need a working GNAT
263compiler (GCC version 5.1 or later).
264
265This includes GNAT tools such as @command{gnatmake} and
266@command{gnatlink}, since the Ada front end is written in Ada and
267uses some GNAT-specific extensions.
268
269In order to build a cross compiler, it is strongly recommended to install
270the new compiler as native first, and then use it to build the cross
271compiler. Other native compiler versions may work but this is not guaranteed and
272will typically fail with hard to understand compilation errors during the
273build.
274
275Similarly, it is strongly recommended to use an older version of GNAT to build
276GNAT. More recent versions of GNAT than the version built are not guaranteed
277to work and will often fail during the build with compilation errors.
278
279Note that @command{configure} does not test whether the GNAT installation works
280and has a sufficiently recent version; if too old a GNAT version is
281installed and @option{--enable-languages=ada} is used, the build will fail.
282
283@env{ADA_INCLUDE_PATH} and @env{ADA_OBJECT_PATH} environment variables
284must not be set when building the Ada compiler, the Ada tools, or the
285Ada runtime libraries. You can check that your build environment is clean
286by verifying that @samp{gnatls -v} lists only one explicit path in each
287section.
288
289@item @anchor{GDC-prerequisite}GDC
290
291In order to build GDC, the D compiler, you need a working GDC
292compiler (GCC version 9.4 or later) and D runtime library,
293@samp{libphobos}, as the D front end is written in D.
294
295Versions of GDC prior to 12 can be built with an ISO C++11 compiler, which can
296then be installed and used to bootstrap newer versions of the D front end.
297
298It is strongly recommended to use an older version of GDC to build GDC. More
299recent versions of GDC than the version built are not guaranteed to work and
300will often fail during the build with compilation errors relating to
301deprecations or removed features.
302
303Note that @command{configure} does not test whether the GDC installation works
304and has a sufficiently recent version.  Though the implementation of the D
305front end does not make use of any GDC-specific extensions, or novel features
306of the D language, if too old a GDC version is installed and
307@option{--enable-languages=d} is used, the build will fail.
308
309On some targets, @samp{libphobos} isn't enabled by default, but compiles
310and works if @option{--enable-libphobos} is used.  Specifics are
311documented for affected targets.
312
313@item A ``working'' POSIX compatible shell, or GNU bash
314
315Necessary when running @command{configure} because some
316@command{/bin/sh} shells have bugs and may crash when configuring the
317target libraries.  In other cases, @command{/bin/sh} or @command{ksh}
318have disastrous corner-case performance problems.  This
319can cause target @command{configure} runs to literally take days to
320complete in some cases.
321
322So on some platforms @command{/bin/ksh} is sufficient, on others it
323isn't.  See the host/target specific instructions for your platform, or
324use @command{bash} to be sure.  Then set @env{CONFIG_SHELL} in your
325environment to your ``good'' shell prior to running
326@command{configure}/@command{make}.
327
328@command{zsh} is not a fully compliant POSIX shell and will not
329work when configuring GCC@.
330
331@item A POSIX or SVR4 awk
332
333Necessary for creating some of the generated source files for GCC@.
334If in doubt, use a recent GNU awk version, as some of the older ones
335are broken.  GNU awk version 3.1.5 is known to work.
336
337@item GNU binutils
338
339Necessary in some circumstances, optional in others.  See the
340host/target specific instructions for your platform for the exact
341requirements.
342
343Note binutils 2.35 or newer is required for LTO to work correctly
344with GNU libtool that includes doing a bootstrap with LTO enabled.
345
346@item gzip version 1.2.4 (or later) or
347@itemx bzip2 version 1.0.2 (or later)
348
349Necessary to uncompress GCC @command{tar} files when source code is
350obtained via HTTPS mirror sites.
351
352@item GNU make version 3.80 (or later)
353
354You must have GNU make installed to build GCC@.
355
356@item GNU tar version 1.14 (or later)
357
358Necessary (only on some platforms) to untar the source code.  Many
359systems' @command{tar} programs will also work, only try GNU
360@command{tar} if you have problems.
361
362@item Perl version between 5.6.1 and 5.6.24
363
364Necessary when targeting Darwin, building @samp{libstdc++},
365and not using @option{--disable-symvers}.
366Necessary when targeting Solaris 2 with Solaris @command{ld} and not using
367@option{--disable-symvers}.
368
369Necessary when regenerating @file{Makefile} dependencies in libiberty.
370Necessary when regenerating @file{libiberty/functions.texi}.
371Necessary when generating manpages from Texinfo manuals.
372Used by various scripts to generate some files included in the source
373repository (mainly Unicode-related and rarely changing) from source
374tables.
375
376Used by @command{automake}.
377
378If available, enables parallel testing of @samp{libgomp} in case that
379@command{flock} is not available.
380
381@end table
382
383Several support libraries are necessary to build GCC, some are required,
384others optional.  While any sufficiently new version of required tools
385usually work, library requirements are generally stricter.  Newer
386versions may work in some cases, but it's safer to use the exact
387versions documented.  We appreciate bug reports about problems with
388newer versions, though.  If your OS vendor provides packages for the
389support libraries then using those packages may be the simplest way to
390install the libraries.
391
392@table @asis
393@item GNU Multiple Precision Library (GMP) version 4.3.2 (or later)
394
395Necessary to build GCC@.  If a GMP source distribution is found in a
396subdirectory of your GCC sources named @file{gmp}, it will be built
397together with GCC.  Alternatively, if GMP is already installed but it
398is not in your library search path, you will have to configure with the
399@option{--with-gmp} configure option.  See also @option{--with-gmp-lib}
400and @option{--with-gmp-include}.
401The in-tree build is only supported with the GMP version that
402download_prerequisites installs.
403
404@item MPFR Library version 3.1.0 (or later)
405
406Necessary to build GCC@.  It can be downloaded from
407@uref{https://www.mpfr.org}.  If an MPFR source distribution is found
408in a subdirectory of your GCC sources named @file{mpfr}, it will be
409built together with GCC.  Alternatively, if MPFR is already installed
410but it is not in your default library search path, the
411@option{--with-mpfr} configure option should be used.  See also
412@option{--with-mpfr-lib} and @option{--with-mpfr-include}.
413The in-tree build is only supported with the MPFR version that
414download_prerequisites installs.
415
416@item MPC Library version 1.0.1 (or later)
417
418Necessary to build GCC@.  It can be downloaded from
419@uref{https://www.multiprecision.org/mpc/}.  If an MPC source distribution
420is found in a subdirectory of your GCC sources named @file{mpc}, it
421will be built together with GCC.  Alternatively, if MPC is already
422installed but it is not in your default library search path, the
423@option{--with-mpc} configure option should be used.  See also
424@option{--with-mpc-lib} and @option{--with-mpc-include}.
425The in-tree build is only supported with the MPC version that
426download_prerequisites installs.
427
428@item isl Library version 0.15 or later.
429
430Necessary to build GCC with the Graphite loop optimizations.
431It can be downloaded from @uref{https://gcc.gnu.org/pub/gcc/infrastructure/}.
432If an isl source distribution is found
433in a subdirectory of your GCC sources named @file{isl}, it will be
434built together with GCC.  Alternatively, the @option{--with-isl} configure
435option should be used if isl is not installed in your default library
436search path.
437
438@item zstd Library.
439
440Necessary to build GCC with zstd compression used for LTO bytecode.
441The library is searched in your default library patch search.
442Alternatively, the @option{--with-zstd} configure option should be used.
443
444@end table
445
446@heading Tools/packages necessary for modifying GCC
447@table @asis
448@item autoconf version 2.69
449@itemx GNU m4 version 1.4.6 (or later)
450
451Necessary when modifying @file{configure.ac}, @file{aclocal.m4}, etc.@:
452to regenerate @file{configure} and @file{config.in} files.
453
454@item automake version 1.15.1
455
456Necessary when modifying a @file{Makefile.am} file to regenerate its
457associated @file{Makefile.in}.
458
459Much of GCC does not use automake, so directly edit the @file{Makefile.in}
460file.  Specifically this applies to the @file{gcc}, @file{intl},
461@file{libcpp}, @file{libiberty}, @file{libobjc} directories as well
462as any of their subdirectories.
463
464For directories that use automake, GCC requires the latest release in
465the 1.15 series, which is currently 1.15.1.  When regenerating a directory
466to a newer version, please update all the directories using an older 1.15
467to the latest released version.
468
469@item gettext version 0.14.5 (or later)
470
471Needed to regenerate @file{gcc.pot}.
472
473@item gperf version 2.7.2 (or later)
474
475Necessary when modifying @command{gperf} input files, e.g.@:
476@file{gcc/cp/cfns.gperf} to regenerate its associated header file, e.g.@:
477@file{gcc/cp/cfns.h}.
478
479@item DejaGnu version 1.5.3 (or later)
480@itemx Expect
481@itemx Tcl
482@c Once Tcl 8.5 or higher is required, remove any obsolete
483@c compatibility workarounds:
484@c     git grep 'compatibility with earlier Tcl releases'
485
486Necessary to run the GCC testsuite; see the section on testing for
487details.
488
489@item autogen version 5.5.4 (or later) and
490@itemx guile version 1.4.1 (or later)
491
492Necessary to regenerate @file{fixinc/fixincl.x} from
493@file{fixinc/inclhack.def} and @file{fixinc/*.tpl}.
494
495Necessary to run @samp{make check} for @file{fixinc}.
496
497Necessary to regenerate the top level @file{Makefile.in} file from
498@file{Makefile.tpl} and @file{Makefile.def}.
499
500@item Flex version 2.5.4 (or later)
501
502Necessary when modifying @file{*.l} files.
503
504Necessary to build GCC during development because the generated output
505files are not included in the version-controlled source repository.
506They are included in releases.
507
508@item Texinfo version 4.7 (or later)
509
510Necessary for running @command{makeinfo} when modifying @file{*.texi}
511files to test your changes.
512
513Necessary for running @command{make dvi} or @command{make pdf} to
514create printable documentation in DVI or PDF format.  Texinfo version
5154.8 or later is required for @command{make pdf}.
516
517Necessary to build GCC documentation during development because the
518generated output files are not included in the repository.  They are
519included in releases.
520
521@item @TeX{} (any working version)
522
523Necessary for running @command{texi2dvi} and @command{texi2pdf}, which
524are used when running @command{make dvi} or @command{make pdf} to create
525DVI or PDF files, respectively.
526
527@item Sphinx version 1.0 (or later)
528
529Necessary to regenerate @file{jit/docs/_build/texinfo} from the @file{.rst}
530files in the directories below @file{jit/docs}.
531
532@item git (any version)
533@itemx SSH (any version)
534
535Necessary to access the source repository.  Public releases and weekly
536snapshots of the development sources are also available via HTTPS@.
537
538@item GNU diffutils version 2.7 (or later)
539
540Useful when submitting patches for the GCC source code.
541
542@item patch version 2.5.4 (or later)
543
544Necessary when applying patches, created with @command{diff}, to one's
545own sources.
546
547@end table
548
549@html
550<hr />
551<p>
552@end html
553@ifhtml
554@uref{./index.html,,Return to the GCC Installation page}
555@end ifhtml
556@end ifset
557
558@c ***Downloading the source**************************************************
559@ifnothtml
560@comment node-name,     next,          previous, up
561@node    Downloading the source, Configuration, Prerequisites, Installing GCC
562@end ifnothtml
563@ifset downloadhtml
564@ifnothtml
565@chapter Downloading GCC
566@end ifnothtml
567@cindex Downloading GCC
568@cindex Downloading the Source
569
570GCC is distributed via @uref{https://gcc.gnu.org/git.html,,git} and via
571HTTPS as tarballs compressed with @command{gzip} or @command{bzip2}.
572
573Please refer to the @uref{https://gcc.gnu.org/releases.html,,releases web page}
574for information on how to obtain GCC@.
575
576The source distribution includes the C, C++, Objective-C, Fortran,
577and Ada (in the case of GCC 3.1 and later) compilers, as well as
578runtime libraries for C++, Objective-C, and Fortran.
579For previous versions these were downloadable as separate components such
580as the core GCC distribution, which included the C language front end and
581shared components, and language-specific distributions including the
582language front end and the language runtime (where appropriate).
583
584If you also intend to build binutils (either to upgrade an existing
585installation or for use in place of the corresponding tools of your
586OS), unpack the binutils distribution either in the same directory or
587a separate one.  In the latter case, add symbolic links to any
588components of the binutils you intend to build alongside the compiler
589(@file{bfd}, @file{binutils}, @file{gas}, @file{gprof}, @file{ld},
590@file{opcodes}, @dots{}) to the directory containing the GCC sources.
591
592Likewise the GMP, MPFR and MPC libraries can be automatically built
593together with GCC.  You may simply run the
594@command{contrib/download_prerequisites} script in the GCC source directory
595to set up everything.
596Otherwise unpack the GMP, MPFR and/or MPC source
597distributions in the directory containing the GCC sources and rename
598their directories to @file{gmp}, @file{mpfr} and @file{mpc},
599respectively (or use symbolic links with the same name).
600
601@html
602<hr />
603<p>
604@end html
605@ifhtml
606@uref{./index.html,,Return to the GCC Installation page}
607@end ifhtml
608@end ifset
609
610@c ***Configuration***********************************************************
611@ifnothtml
612@comment node-name,     next,          previous, up
613@node    Configuration, Building, Downloading the source, Installing GCC
614@end ifnothtml
615@ifset configurehtml
616@ifnothtml
617@chapter Installing GCC: Configuration
618@end ifnothtml
619@cindex Configuration
620@cindex Installing GCC: Configuration
621
622Like most GNU software, GCC must be configured before it can be built.
623This document describes the recommended configuration procedure
624for both native and cross targets.
625
626We use @var{srcdir} to refer to the toplevel source directory for
627GCC; we use @var{objdir} to refer to the toplevel build/object directory.
628
629If you obtained the sources by cloning the repository, @var{srcdir}
630must refer to the top @file{gcc} directory, the one where the
631@file{MAINTAINERS} file can be found, and not its @file{gcc}
632subdirectory, otherwise the build will fail.
633
634If either @var{srcdir} or @var{objdir} is located on an automounted NFS
635file system, the shell's built-in @command{pwd} command will return
636temporary pathnames.  Using these can lead to various sorts of build
637problems.  To avoid this issue, set the @env{PWDCMD} environment
638variable to an automounter-aware @command{pwd} command, e.g.,
639@command{pawd} or @samp{amq -w}, during the configuration and build
640phases.
641
642First, we @strong{highly} recommend that GCC be built into a
643separate directory from the sources which does @strong{not} reside
644within the source tree.  This is how we generally build GCC; building
645where @var{srcdir} == @var{objdir} should still work, but doesn't
646get extensive testing; building where @var{objdir} is a subdirectory
647of @var{srcdir} is unsupported.
648
649If you have previously built GCC in the same directory for a
650different target machine, do @samp{make distclean} to delete all files
651that might be invalid.  One of the files this deletes is @file{Makefile};
652if @samp{make distclean} complains that @file{Makefile} does not exist
653or issues a message like ``don't know how to make distclean'' it probably
654means that the directory is already suitably clean.  However, with the
655recommended method of building in a separate @var{objdir}, you should
656simply use a different @var{objdir} for each target.
657
658Second, when configuring a native system, either @command{cc} or
659@command{gcc} must be in your path or you must set @env{CC} in
660your environment before running configure.  Otherwise the configuration
661scripts may fail.
662
663@ignore
664Note that the bootstrap compiler and the resulting GCC must be link
665compatible, else the bootstrap will fail with linker errors about
666incompatible object file formats.  Several multilibed targets are
667affected by this requirement, see
668@ifnothtml
669@ref{Specific, host/target specific installation notes}.
670@end ifnothtml
671@ifhtml
672@uref{specific.html,,host/target specific installation notes}.
673@end ifhtml
674@end ignore
675
676To configure GCC:
677
678@smallexample
679% mkdir @var{objdir}
680% cd @var{objdir}
681% @var{srcdir}/configure [@var{options}] [@var{target}]
682@end smallexample
683
684@heading Distributor options
685
686If you will be distributing binary versions of GCC, with modifications
687to the source code, you should use the options described in this
688section to make clear that your version contains modifications.
689
690@table @code
691@item --with-pkgversion=@var{version}
692Specify a string that identifies your package.  You may wish
693to include a build number or build date.  This version string will be
694included in the output of @command{gcc --version}.  This suffix does
695not replace the default version string, only the @samp{GCC} part.
696
697The default value is @samp{GCC}.
698
699@item --with-bugurl=@var{url}
700Specify the URL that users should visit if they wish to report a bug.
701You are of course welcome to forward bugs reported to you to the FSF,
702if you determine that they are not bugs in your modifications.
703
704The default value refers to the FSF's GCC bug tracker.
705
706@item --with-documentation-root-url=@var{url}
707Specify the URL root that contains GCC option documentation.  The @var{url}
708should end with a @code{/} character.
709
710The default value is @uref{https://gcc.gnu.org/onlinedocs/,,https://gcc.gnu.org/onlinedocs/}.
711
712@item --with-changes-root-url=@var{url}
713Specify the URL root that contains information about changes in GCC
714releases like @code{gcc-@var{version}/changes.html}.
715The @var{url} should end with a @code{/} character.
716
717The default value is @uref{https://gcc.gnu.org/,,https://gcc.gnu.org/}.
718
719@end table
720
721@heading Host, Build and Target specification
722
723Specify the host, build and target machine configurations.  You do this
724when you run the @file{configure} script.
725
726The @dfn{build} machine is the system which you are using, the
727@dfn{host} machine is the system where you want to run the resulting
728compiler (normally the build machine), and the @dfn{target} machine is
729the system for which you want the compiler to generate code.
730
731If you are building a compiler to produce code for the machine it runs
732on (a native compiler), you normally do not need to specify any operands
733to @file{configure}; it will try to guess the type of machine you are on
734and use that as the build, host and target machines.  So you don't need
735to specify a configuration when building a native compiler unless
736@file{configure} cannot figure out what your configuration is or guesses
737wrong.
738
739In those cases, specify the build machine's @dfn{configuration name}
740with the @option{--host} option; the host and target will default to be
741the same as the host machine.
742
743Here is an example:
744
745@smallexample
746./configure --host=x86_64-pc-linux-gnu
747@end smallexample
748
749A configuration name may be canonical or it may be more or less
750abbreviated (@file{config.sub} script produces canonical versions).
751
752A canonical configuration name has three parts, separated by dashes.
753It looks like this: @samp{@var{cpu}-@var{company}-@var{system}}.
754
755Here are the possible CPU types:
756
757@quotation
758aarch64, aarch64_be, alpha, alpha64, amdgcn, arc, arceb, arm, armeb, avr, bfin,
759bpf, cr16, cris, csky, epiphany, fido, fr30, frv, ft32, h8300, hppa, hppa2.0,
760hppa64, i486, i686, ia64, iq2000, lm32, loongarch64, m32c, m32r, m32rle, m68k,
761mcore, microblaze, microblazeel, mips, mips64, mips64el, mips64octeon,
762mips64orion, mips64vr, mipsel, mipsisa32, mipsisa32r2, mipsisa64, mipsisa64r2,
763mipsisa64r2el, mipsisa64sb1, mipsisa64sr71k, mipstx39, mmix, mn10300, moxie,
764msp430, nds32be, nds32le, nios2, nvptx, or1k, pdp11, powerpc, powerpc64,
765powerpc64le, powerpcle, pru, riscv32, riscv32be, riscv64, riscv64be, rl78, rx,
766s390, s390x, sh, shle, sparc, sparc64, tic6x, tilegx, tilegxbe, tilepro, v850,
767v850e, v850e1, vax, visium, x86_64, xstormy16, xtensa
768@end quotation
769
770Here is a list of system types:
771
772@quotation
773aix@var{version}, amdhsa, aout, cygwin, darwin@var{version},
774eabi, eabialtivec, eabisim, eabisimaltivec, elf, elf32,
775elfbare, elfoabi, freebsd@var{version}, gnu, hpux, hpux@var{version},
776kfreebsd-gnu, kopensolaris-gnu, linux-androideabi, linux-gnu,
777linux-gnu_altivec, linux-musl, linux-uclibc, lynxos, mingw32, mingw32crt,
778mmixware, msdosdjgpp, netbsd, netbsdelf@var{version}, nto-qnx, openbsd,
779rtems, solaris@var{version}, symbianelf, tpf, uclinux, uclinux_eabi, vms,
780vxworks, vxworksae, vxworksmils
781@end quotation
782
783@heading Options specification
784
785Use @var{options} to override several configure time options for
786GCC@.  A list of supported @var{options} follows; @samp{configure
787--help} may list other options, but those not listed below may not
788work and should not normally be used.
789
790Note that each @option{--enable} option has a corresponding
791@option{--disable} option and that each @option{--with} option has a
792corresponding @option{--without} option.
793
794@table @code
795@item --prefix=@var{dirname}
796Specify the toplevel installation
797directory.  This is the recommended way to install the tools into a directory
798other than the default.  The toplevel installation directory defaults to
799@file{/usr/local}.
800
801We @strong{highly} recommend against @var{dirname} being the same or a
802subdirectory of @var{objdir} or vice versa.  If specifying a directory
803beneath a user's home directory tree, some shells will not expand
804@var{dirname} correctly if it contains the @samp{~} metacharacter; use
805@env{$HOME} instead.
806
807The following standard @command{autoconf} options are supported.  Normally you
808should not need to use these options.
809@table @code
810@item --exec-prefix=@var{dirname}
811Specify the toplevel installation directory for architecture-dependent
812files.  The default is @file{@var{prefix}}.
813
814@item --bindir=@var{dirname}
815Specify the installation directory for the executables called by users
816(such as @command{gcc} and @command{g++}).  The default is
817@file{@var{exec-prefix}/bin}.
818
819@item --libdir=@var{dirname}
820Specify the installation directory for object code libraries and
821internal data files of GCC@.  The default is @file{@var{exec-prefix}/lib}.
822
823@item --libexecdir=@var{dirname}
824Specify the installation directory for internal executables of GCC@.
825The default is @file{@var{exec-prefix}/libexec}.
826
827@item --with-slibdir=@var{dirname}
828Specify the installation directory for the shared libgcc library.  The
829default is @file{@var{libdir}}.
830
831@item --datarootdir=@var{dirname}
832Specify the root of the directory tree for read-only architecture-independent
833data files referenced by GCC@.  The default is @file{@var{prefix}/share}.
834
835@item --infodir=@var{dirname}
836Specify the installation directory for documentation in info format.
837The default is @file{@var{datarootdir}/info}.
838
839@item --datadir=@var{dirname}
840Specify the installation directory for some architecture-independent
841data files referenced by GCC@.  The default is @file{@var{datarootdir}}.
842
843@item --docdir=@var{dirname}
844Specify the installation directory for documentation files (other
845than Info) for GCC@.  The default is @file{@var{datarootdir}/doc}.
846
847@item --htmldir=@var{dirname}
848Specify the installation directory for HTML documentation files.
849The default is @file{@var{docdir}}.
850
851@item --pdfdir=@var{dirname}
852Specify the installation directory for PDF documentation files.
853The default is @file{@var{docdir}}.
854
855@item --mandir=@var{dirname}
856Specify the installation directory for manual pages.  The default is
857@file{@var{datarootdir}/man}.  (Note that the manual pages are only extracts
858from the full GCC manuals, which are provided in Texinfo format.  The manpages
859are derived by an automatic conversion process from parts of the full
860manual.)
861
862@item --with-gxx-include-dir=@var{dirname}
863Specify
864the installation directory for G++ header files.  The default depends
865on other configuration options, and differs between cross and native
866configurations.
867
868@item --with-specs=@var{specs}
869Specify additional command line driver SPECS.
870This can be useful if you need to turn on a non-standard feature by
871default without modifying the compiler's source code, for instance
872@option{--with-specs=%@{!fcommon:%@{!fno-common:-fno-common@}@}}.
873@ifnothtml
874@xref{Spec Files,, Specifying subprocesses and the switches to pass to them,
875gcc, Using the GNU Compiler Collection (GCC)},
876@end ifnothtml
877@ifhtml
878See ``Spec Files'' in the main manual
879@end ifhtml
880
881@end table
882
883@item --program-prefix=@var{prefix}
884GCC supports some transformations of the names of its programs when
885installing them.  This option prepends @var{prefix} to the names of
886programs to install in @var{bindir} (see above).  For example, specifying
887@option{--program-prefix=foo-} would result in @samp{gcc}
888being installed as @file{/usr/local/bin/foo-gcc}.
889
890@item --program-suffix=@var{suffix}
891Appends @var{suffix} to the names of programs to install in @var{bindir}
892(see above).  For example, specifying @option{--program-suffix=-3.1}
893would result in @samp{gcc} being installed as
894@file{/usr/local/bin/gcc-3.1}.
895
896@item --program-transform-name=@var{pattern}
897Applies the @samp{sed} script @var{pattern} to be applied to the names
898of programs to install in @var{bindir} (see above).  @var{pattern} has to
899consist of one or more basic @samp{sed} editing commands, separated by
900semicolons.  For example, if you want the @samp{gcc} program name to be
901transformed to the installed program @file{/usr/local/bin/myowngcc} and
902the @samp{g++} program name to be transformed to
903@file{/usr/local/bin/gspecial++} without changing other program names,
904you could use the pattern
905@option{--program-transform-name='s/^gcc$/myowngcc/; s/^g++$/gspecial++/'}
906to achieve this effect.
907
908All three options can be combined and used together, resulting in more
909complex conversion patterns.  As a basic rule, @var{prefix} (and
910@var{suffix}) are prepended (appended) before further transformations
911can happen with a special transformation script @var{pattern}.
912
913As currently implemented, this option only takes effect for native
914builds; cross compiler binaries' names are not transformed even when a
915transformation is explicitly asked for by one of these options.
916
917For native builds, some of the installed programs are also installed
918with the target alias in front of their name, as in
919@samp{i686-pc-linux-gnu-gcc}.  All of the above transformations happen
920before the target alias is prepended to the name---so, specifying
921@option{--program-prefix=foo-} and @option{program-suffix=-3.1}, the
922resulting binary would be installed as
923@file{/usr/local/bin/i686-pc-linux-gnu-foo-gcc-3.1}.
924
925As a last shortcoming, none of the installed Ada programs are
926transformed yet, which will be fixed in some time.
927
928@item --with-local-prefix=@var{dirname}
929Specify the
930installation directory for local include files.  The default is
931@file{/usr/local}.  Specify this option if you want the compiler to
932search directory @file{@var{dirname}/include} for locally installed
933header files @emph{instead} of @file{/usr/local/include}.
934
935You should specify @option{--with-local-prefix} @strong{only} if your
936site has a different convention (not @file{/usr/local}) for where to put
937site-specific files.
938
939The default value for @option{--with-local-prefix} is @file{/usr/local}
940regardless of the value of @option{--prefix}.  Specifying
941@option{--prefix} has no effect on which directory GCC searches for
942local header files.  This may seem counterintuitive, but actually it is
943logical.
944
945The purpose of @option{--prefix} is to specify where to @emph{install
946GCC}.  The local header files in @file{/usr/local/include}---if you put
947any in that directory---are not part of GCC@.  They are part of other
948programs---perhaps many others.  (GCC installs its own header files in
949another directory which is based on the @option{--prefix} value.)
950
951Both the local-prefix include directory and the GCC-prefix include
952directory are part of GCC's ``system include'' directories.  Although these
953two directories are not fixed, they need to be searched in the proper
954order for the correct processing of the include_next directive.  The
955local-prefix include directory is searched before the GCC-prefix
956include directory.  Another characteristic of system include directories
957is that pedantic warnings are turned off for headers in these directories.
958
959Some autoconf macros add @option{-I @var{directory}} options to the
960compiler command line, to ensure that directories containing installed
961packages' headers are searched.  When @var{directory} is one of GCC's
962system include directories, GCC will ignore the option so that system
963directories continue to be processed in the correct order.  This
964may result in a search order different from what was specified but the
965directory will still be searched.
966
967GCC automatically searches for ordinary libraries using
968@env{GCC_EXEC_PREFIX}.  Thus, when the same installation prefix is
969used for both GCC and packages, GCC will automatically search for
970both headers and libraries.  This provides a configuration that is
971easy to use.  GCC behaves in a manner similar to that when it is
972installed as a system compiler in @file{/usr}.
973
974Sites that need to install multiple versions of GCC may not want to
975use the above simple configuration.  It is possible to use the
976@option{--program-prefix}, @option{--program-suffix} and
977@option{--program-transform-name} options to install multiple versions
978into a single directory, but it may be simpler to use different prefixes
979and the @option{--with-local-prefix} option to specify the location of the
980site-specific files for each version.  It will then be necessary for
981users to specify explicitly the location of local site libraries
982(e.g., with @env{LIBRARY_PATH}).
983
984The same value can be used for both @option{--with-local-prefix} and
985@option{--prefix} provided it is not @file{/usr}.  This can be used
986to avoid the default search of @file{/usr/local/include}.
987
988@strong{Do not} specify @file{/usr} as the @option{--with-local-prefix}!
989The directory you use for @option{--with-local-prefix} @strong{must not}
990contain any of the system's standard header files.  If it did contain
991them, certain programs would be miscompiled (including GNU Emacs, on
992certain targets), because this would override and nullify the header
993file corrections made by the @command{fixincludes} script.
994
995Indications are that people who use this option use it based on mistaken
996ideas of what it is for.  People use it as if it specified where to
997install part of GCC@.  Perhaps they make this assumption because
998installing GCC creates the directory.
999
1000@item --with-gcc-major-version-only
1001Specifies that GCC should use only the major number rather than
1002@var{major}.@var{minor}.@var{patchlevel} in filesystem paths.
1003
1004@item --with-native-system-header-dir=@var{dirname}
1005Specifies that @var{dirname} is the directory that contains native system
1006header files, rather than @file{/usr/include}.  This option is most useful
1007if you are creating a compiler that should be isolated from the system
1008as much as possible.  It is most commonly used with the
1009@option{--with-sysroot} option and will cause GCC to search
1010@var{dirname} inside the system root specified by that option.
1011
1012@item --enable-shared[=@var{package}[,@dots{}]]
1013Build shared versions of libraries, if shared libraries are supported on
1014the target platform.  Unlike GCC 2.95.x and earlier, shared libraries
1015are enabled by default on all platforms that support shared libraries.
1016
1017If a list of packages is given as an argument, build shared libraries
1018only for the listed packages.  For other packages, only static libraries
1019will be built.  Package names currently recognized in the GCC tree are
1020@samp{libgcc} (also known as @samp{gcc}), @samp{libstdc++} (not
1021@samp{libstdc++-v3}), @samp{libffi}, @samp{zlib}, @samp{boehm-gc},
1022@samp{ada}, @samp{libada}, @samp{libgo}, @samp{libobjc}, and @samp{libphobos}.
1023Note @samp{libiberty} does not support shared libraries at all.
1024
1025Use @option{--disable-shared} to build only static libraries.  Note that
1026@option{--disable-shared} does not accept a list of package names as
1027argument, only @option{--enable-shared} does.
1028
1029Contrast with @option{--enable-host-shared}, which affects @emph{host}
1030code.
1031
1032@item --enable-host-shared
1033Specify that the @emph{host} code should be built into position-independent
1034machine code (with -fPIC), allowing it to be used within shared libraries,
1035but yielding a slightly slower compiler.
1036
1037This option is required when building the libgccjit.so library.
1038
1039Contrast with @option{--enable-shared}, which affects @emph{target}
1040libraries.
1041
1042@item @anchor{with-gnu-as}--with-gnu-as
1043Specify that the compiler should assume that the
1044assembler it finds is the GNU assembler.  However, this does not modify
1045the rules to find an assembler and will result in confusion if the
1046assembler found is not actually the GNU assembler.  (Confusion may also
1047result if the compiler finds the GNU assembler but has not been
1048configured with @option{--with-gnu-as}.)  If you have more than one
1049assembler installed on your system, you may want to use this option in
1050connection with @option{--with-as=@var{pathname}} or
1051@option{--with-build-time-tools=@var{pathname}}.
1052
1053The following systems are the only ones where it makes a difference
1054whether you use the GNU assembler.  On any other system,
1055@option{--with-gnu-as} has no effect.
1056
1057@itemize @bullet
1058@item @samp{hppa1.0-@var{any}-@var{any}}
1059@item @samp{hppa1.1-@var{any}-@var{any}}
1060@item @samp{sparc-sun-solaris2.@var{any}}
1061@item @samp{sparc64-@var{any}-solaris2.@var{any}}
1062@end itemize
1063
1064@item @anchor{with-as}--with-as=@var{pathname}
1065Specify that the compiler should use the assembler pointed to by
1066@var{pathname}, rather than the one found by the standard rules to find
1067an assembler, which are:
1068@itemize @bullet
1069@item
1070Unless GCC is being built with a cross compiler, check the
1071@file{@var{libexec}/gcc/@var{target}/@var{version}} directory.
1072@var{libexec} defaults to @file{@var{exec-prefix}/libexec};
1073@var{exec-prefix} defaults to @var{prefix}, which
1074defaults to @file{/usr/local} unless overridden by the
1075@option{--prefix=@var{pathname}} switch described above.  @var{target}
1076is the target system triple, such as @samp{sparc-sun-solaris2.7}, and
1077@var{version} denotes the GCC version, such as 3.0.
1078
1079@item
1080If the target system is the same that you are building on, check
1081operating system specific directories (e.g.@: @file{/usr/ccs/bin} on
1082Solaris 2).
1083
1084@item
1085Check in the @env{PATH} for a tool whose name is prefixed by the
1086target system triple.
1087
1088@item
1089Check in the @env{PATH} for a tool whose name is not prefixed by the
1090target system triple, if the host and target system triple are
1091the same (in other words, we use a host tool if it can be used for
1092the target as well).
1093@end itemize
1094
1095You may want to use @option{--with-as} if no assembler
1096is installed in the directories listed above, or if you have multiple
1097assemblers installed and want to choose one that is not found by the
1098above rules.
1099
1100@item @anchor{with-gnu-ld}--with-gnu-ld
1101Same as @uref{#with-gnu-as,,@option{--with-gnu-as}}
1102but for the linker.
1103
1104@item --with-ld=@var{pathname}
1105Same as @uref{#with-as,,@option{--with-as}}
1106but for the linker.
1107
1108@item --with-dsymutil=@var{pathname}
1109Same as @uref{#with-as,,@option{--with-as}}
1110but for the debug linker (only used on Darwin platforms so far).
1111
1112@item --with-tls=@var{dialect}
1113Specify the default TLS dialect, for systems were there is a choice.
1114For ARM targets, possible values for @var{dialect} are @code{gnu} or
1115@code{gnu2}, which select between the original GNU dialect and the GNU TLS
1116descriptor-based dialect.
1117
1118@item --enable-multiarch
1119Specify whether to enable or disable multiarch support.  The default is
1120to check for glibc start files in a multiarch location, and enable it
1121if the files are found.  The auto detection is enabled for native builds,
1122and for cross builds configured with @option{--with-sysroot}, and without
1123@option{--with-native-system-header-dir}.
1124More documentation about multiarch can be found at
1125@uref{https://wiki.debian.org/Multiarch}.
1126
1127@item --enable-sjlj-exceptions
1128Force use of the @code{setjmp}/@code{longjmp}-based scheme for exceptions.
1129@samp{configure} ordinarily picks the correct value based on the platform.
1130Only use this option if you are sure you need a different setting.
1131
1132@item --enable-vtable-verify
1133Specify whether to enable or disable the vtable verification feature.
1134Enabling this feature causes libstdc++ to be built with its virtual calls
1135in verifiable mode.  This means that, when linked with libvtv, every
1136virtual call in libstdc++ will verify the vtable pointer through which the
1137call will be made before actually making the call.  If not linked with libvtv,
1138the verifier will call stub functions (in libstdc++ itself) and do nothing.
1139If vtable verification is disabled, then libstdc++ is not built with its
1140virtual calls in verifiable mode at all.  However the libvtv library will
1141still be built (see @option{--disable-libvtv} to turn off building libvtv).
1142@option{--disable-vtable-verify} is the default.
1143
1144@item --disable-gcov
1145Specify that the run-time library used for coverage analysis
1146and associated host tools should not be built.
1147
1148@item --disable-multilib
1149Specify that multiple target
1150libraries to support different target variants, calling
1151conventions, etc.@: should not be built.  The default is to build a
1152predefined set of them.
1153
1154Some targets provide finer-grained control over which multilibs are built
1155(e.g., @option{--disable-softfloat}):
1156@table @code
1157@item arm-*-*
1158fpu, 26bit, underscore, interwork, biendian, nofmult.
1159
1160@item m68*-*-*
1161softfloat, m68881, m68000, m68020.
1162
1163@item mips*-*-*
1164single-float, biendian, softfloat.
1165
1166@item msp430-*-*
1167no-exceptions
1168
1169@item powerpc*-*-*, rs6000*-*-*
1170aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, biendian,
1171sysv, aix.
1172
1173@end table
1174
1175@item --with-multilib-list=@var{list}
1176@itemx --without-multilib-list
1177Specify what multilibs to build.  @var{list} is a comma separated list of
1178values, possibly consisting of a single value.  Currently only implemented
1179for aarch64*-*-*, arm*-*-*, loongarch64-*-*, riscv*-*-*, sh*-*-* and
1180x86-64-*-linux*.  The accepted values and meaning for each target is given
1181below.
1182
1183@table @code
1184@item aarch64*-*-*
1185@var{list} is a comma separated list of @code{ilp32}, and @code{lp64}
1186to enable ILP32 and LP64 run-time libraries, respectively.  If
1187@var{list} is empty, then there will be no multilibs and only the
1188default run-time library will be built.  If @var{list} is
1189@code{default} or --with-multilib-list= is not specified, then the
1190default set of libraries is selected based on the value of
1191@option{--target}.
1192
1193@item arm*-*-*
1194@var{list} is a comma separated list of @code{aprofile} and
1195@code{rmprofile} to build multilibs for A or R and M architecture
1196profiles respectively.  Note that, due to some limitation of the current
1197multilib framework, using the combined @code{aprofile,rmprofile}
1198multilibs selects in some cases a less optimal multilib than when using
1199the multilib profile for the architecture targetted.  The special value
1200@code{default} is also accepted and is equivalent to omitting the
1201option, i.e., only the default run-time library will be enabled.
1202
1203@var{list} may instead contain @code{@@name}, to use the multilib
1204configuration Makefile fragment @file{name} in @file{gcc/config/arm} in
1205the source tree (it is part of the corresponding sources, after all).
1206It is recommended, but not required, that files used for this purpose to
1207be named starting with @file{t-ml-}, to make their intended purpose
1208self-evident, in line with GCC conventions.  Such files enable custom,
1209user-chosen multilib lists to be configured.  Whether multiple such
1210files can be used together depends on the contents of the supplied
1211files.  See @file{gcc/config/arm/t-multilib} and its supplementary
1212@file{gcc/config/arm/t-*profile} files for an example of what such
1213Makefile fragments might look like for this version of GCC.  The macros
1214expected to be defined in these fragments are not stable across GCC
1215releases, so make sure they define the @code{MULTILIB}-related macros
1216expected by the version of GCC you are building.
1217@ifnothtml
1218@xref{Target Fragment,, Target Makefile Fragments, gccint, GNU Compiler
1219Collection (GCC) Internals}.
1220@end ifnothtml
1221@ifhtml
1222See ``Target Makefile Fragments'' in the internals manual.
1223@end ifhtml
1224
1225The table below gives the combination of ISAs, architectures, FPUs and
1226floating-point ABIs for which multilibs are built for each predefined
1227profile.  The union of these options is considered when specifying both
1228@code{aprofile} and @code{rmprofile}.
1229
1230@multitable @columnfractions .15 .28 .30
1231@item Option @tab aprofile @tab rmprofile
1232@item ISAs
1233@tab @code{-marm} and @code{-mthumb}
1234@tab @code{-mthumb}
1235@item Architectures@*@*@*@*@*@*
1236@tab default architecture@*
1237@code{-march=armv7-a}@*
1238@code{-march=armv7ve}@*
1239@code{-march=armv8-a}@*@*@*
1240@tab default architecture@*
1241@code{-march=armv6s-m}@*
1242@code{-march=armv7-m}@*
1243@code{-march=armv7e-m}@*
1244@code{-march=armv8-m.base}@*
1245@code{-march=armv8-m.main}@*
1246@code{-march=armv7}
1247@item FPUs@*@*@*@*@*
1248@tab none@*
1249@code{-mfpu=vfpv3-d16}@*
1250@code{-mfpu=neon}@*
1251@code{-mfpu=vfpv4-d16}@*
1252@code{-mfpu=neon-vfpv4}@*
1253@code{-mfpu=neon-fp-armv8}
1254@tab none@*
1255@code{-mfpu=vfpv3-d16}@*
1256@code{-mfpu=fpv4-sp-d16}@*
1257@code{-mfpu=fpv5-sp-d16}@*
1258@code{-mfpu=fpv5-d16}@*
1259@item floating-point@/ ABIs@*@*
1260@tab @code{-mfloat-abi=soft}@*
1261@code{-mfloat-abi=softfp}@*
1262@code{-mfloat-abi=hard}
1263@tab @code{-mfloat-abi=soft}@*
1264@code{-mfloat-abi=softfp}@*
1265@code{-mfloat-abi=hard}
1266@end multitable
1267
1268@item loongarch*-*-*
1269@var{list} is a comma-separated list of the following ABI identifiers:
1270@code{lp64d[/base]} @code{lp64f[/base]} @code{lp64d[/base]}, where the
1271@code{/base} suffix may be omitted, to enable their respective run-time
1272libraries.  If @var{list} is empty or @code{default},
1273or if @option{--with-multilib-list} is not specified, then the default ABI
1274as specified by @option{--with-abi} or implied by @option{--target} is selected.
1275
1276@item riscv*-*-*
1277@var{list} is a single ABI name.  The target architecture must be either
1278@code{rv32gc} or @code{rv64gc}.  This will build a single multilib for the
1279specified architecture and ABI pair.  If @code{--with-multilib-list} is not
1280given, then a default set of multilibs is selected based on the value of
1281@option{--target}.  This is usually a large set of multilibs.
1282
1283@item sh*-*-*
1284@var{list} is a comma separated list of CPU names.  These must be of the
1285form @code{sh*} or @code{m*} (in which case they match the compiler option
1286for that processor).  The list should not contain any endian options -
1287these are handled by @option{--with-endian}.
1288
1289If @var{list} is empty, then there will be no multilibs for extra
1290processors.  The multilib for the secondary endian remains enabled.
1291
1292As a special case, if an entry in the list starts with a @code{!}
1293(exclamation point), then it is added to the list of excluded multilibs.
1294Entries of this sort should be compatible with @samp{MULTILIB_EXCLUDES}
1295(once the leading @code{!} has been stripped).
1296
1297If @option{--with-multilib-list} is not given, then a default set of
1298multilibs is selected based on the value of @option{--target}.  This is
1299usually the complete set of libraries, but some targets imply a more
1300specialized subset.
1301
1302Example 1: to configure a compiler for SH4A only, but supporting both
1303endians, with little endian being the default:
1304@smallexample
1305--with-cpu=sh4a --with-endian=little,big --with-multilib-list=
1306@end smallexample
1307
1308Example 2: to configure a compiler for both SH4A and SH4AL-DSP, but with
1309only little endian SH4AL:
1310@smallexample
1311--with-cpu=sh4a --with-endian=little,big \
1312--with-multilib-list=sh4al,!mb/m4al
1313@end smallexample
1314
1315@item x86-64-*-linux*
1316@var{list} is a comma separated list of @code{m32}, @code{m64} and
1317@code{mx32} to enable 32-bit, 64-bit and x32 run-time libraries,
1318respectively.  If @var{list} is empty, then there will be no multilibs
1319and only the default run-time library will be enabled.
1320
1321If @option{--with-multilib-list} is not given, then only 32-bit and
132264-bit run-time libraries will be enabled.
1323@end table
1324
1325@item --with-multilib-generator=@var{config}
1326Specify what multilibs to build.  @var{config} is a semicolon separated list of
1327values, possibly consisting of a single value.  Currently only implemented
1328for riscv*-*-elf*.  The accepted values and meanings are given below.
1329
1330
1331Every config is constructed with four components: architecture string, ABI,
1332reuse rule with architecture string and reuse rule with sub-extension.
1333
1334Example 1: Add multi-lib suppport for rv32i with ilp32.
1335@smallexample
1336rv32i-ilp32--
1337@end smallexample
1338
1339Example 2: Add multi-lib suppport for rv32i with ilp32 and rv32imafd with ilp32.
1340@smallexample
1341rv32i-ilp32--;rv32imafd-ilp32--
1342@end smallexample
1343
1344Example 3: Add multi-lib suppport for rv32i with ilp32; rv32im with ilp32 and
1345rv32ic with ilp32 will reuse this multi-lib set.
1346@smallexample
1347rv32i-ilp32-rv32im-c
1348@end smallexample
1349
1350Example 4: Add multi-lib suppport for rv64ima with lp64; rv64imaf with lp64,
1351rv64imac with lp64 and rv64imafc with lp64 will reuse this multi-lib set.
1352@smallexample
1353rv64ima-lp64--f,c,fc
1354@end smallexample
1355
1356@option{--with-multilib-generator} have an optional configuration argument
1357@option{--cmodel=val} for code model, this option will expand with other
1358config options, @var{val} is a comma separated list of possible code model,
1359currently we support medlow and medany.
1360
1361Example 5: Add multi-lib suppport for rv64ima with lp64; rv64ima with lp64 and
1362medlow code model
1363@smallexample
1364rv64ima-lp64--;--cmodel=medlow
1365@end smallexample
1366
1367Example 6: Add multi-lib suppport for rv64ima with lp64; rv64ima with lp64 and
1368medlow code model; rv64ima with lp64 and medany code model
1369@smallexample
1370rv64ima-lp64--;--cmodel=medlow,medany
1371@end smallexample
1372
1373@item --with-endian=@var{endians}
1374Specify what endians to use.
1375Currently only implemented for sh*-*-*.
1376
1377@var{endians} may be one of the following:
1378@table @code
1379@item big
1380Use big endian exclusively.
1381@item little
1382Use little endian exclusively.
1383@item big,little
1384Use big endian by default.  Provide a multilib for little endian.
1385@item little,big
1386Use little endian by default.  Provide a multilib for big endian.
1387@end table
1388
1389@item --enable-threads
1390Specify that the target
1391supports threads.  This affects the Objective-C compiler and runtime
1392library, and exception handling for other languages like C++.
1393On some systems, this is the default.
1394
1395In general, the best (and, in many cases, the only known) threading
1396model available will be configured for use.  Beware that on some
1397systems, GCC has not been taught what threading models are generally
1398available for the system.  In this case, @option{--enable-threads} is an
1399alias for @option{--enable-threads=single}.
1400
1401@item --disable-threads
1402Specify that threading support should be disabled for the system.
1403This is an alias for @option{--enable-threads=single}.
1404
1405@item --enable-threads=@var{lib}
1406Specify that
1407@var{lib} is the thread support library.  This affects the Objective-C
1408compiler and runtime library, and exception handling for other languages
1409like C++.  The possibilities for @var{lib} are:
1410
1411@table @code
1412@item aix
1413AIX thread support.
1414@item dce
1415DCE thread support.
1416@item lynx
1417LynxOS thread support.
1418@item mipssde
1419MIPS SDE thread support.
1420@item no
1421This is an alias for @samp{single}.
1422@item posix
1423Generic POSIX/Unix98 thread support.
1424@item rtems
1425RTEMS thread support.
1426@item single
1427Disable thread support, should work for all platforms.
1428@item tpf
1429TPF thread support.
1430@item vxworks
1431VxWorks thread support.
1432@item win32
1433Microsoft Win32 API thread support.
1434@end table
1435
1436@item --enable-tls
1437Specify that the target supports TLS (Thread Local Storage).  Usually
1438configure can correctly determine if TLS is supported.  In cases where
1439it guesses incorrectly, TLS can be explicitly enabled or disabled with
1440@option{--enable-tls} or @option{--disable-tls}.  This can happen if
1441the assembler supports TLS but the C library does not, or if the
1442assumptions made by the configure test are incorrect.
1443
1444@item --disable-tls
1445Specify that the target does not support TLS.
1446This is an alias for @option{--enable-tls=no}.
1447
1448@item --disable-tm-clone-registry
1449Disable TM clone registry in libgcc. It is enabled in libgcc by default.
1450This option helps to reduce code size for embedded targets which do
1451not use transactional memory.
1452
1453@item --with-cpu=@var{cpu}
1454@itemx --with-cpu-32=@var{cpu}
1455@itemx --with-cpu-64=@var{cpu}
1456Specify which cpu variant the compiler should generate code for by default.
1457@var{cpu} will be used as the default value of the @option{-mcpu=} switch.
1458This option is only supported on some targets, including ARC, ARM, i386, M68k,
1459PowerPC, and SPARC@.  It is mandatory for ARC@.  The @option{--with-cpu-32} and
1460@option{--with-cpu-64} options specify separate default CPUs for
146132-bit and 64-bit modes; these options are only supported for aarch64, i386,
1462x86-64, PowerPC, and SPARC@.
1463
1464@item --with-schedule=@var{cpu}
1465@itemx --with-arch=@var{cpu}
1466@itemx --with-arch-32=@var{cpu}
1467@itemx --with-arch-64=@var{cpu}
1468@itemx --with-tune=@var{cpu}
1469@itemx --with-tune-32=@var{cpu}
1470@itemx --with-tune-64=@var{cpu}
1471@itemx --with-abi=@var{abi}
1472@itemx --with-fpu=@var{type}
1473@itemx --with-float=@var{type}
1474These configure options provide default values for the @option{-mschedule=},
1475@option{-march=}, @option{-mtune=}, @option{-mabi=}, and @option{-mfpu=}
1476options and for @option{-mhard-float} or @option{-msoft-float}.  As with
1477@option{--with-cpu}, which switches will be accepted and acceptable values
1478of the arguments depend on the target.
1479
1480@item --with-mode=@var{mode}
1481Specify if the compiler should default to @option{-marm} or @option{-mthumb}.
1482This option is only supported on ARM targets.
1483
1484@item --with-stack-offset=@var{num}
1485This option sets the default for the -mstack-offset=@var{num} option,
1486and will thus generally also control the setting of this option for
1487libraries.  This option is only supported on Epiphany targets.
1488
1489@item --with-fpmath=@var{isa}
1490This options sets @option{-mfpmath=sse} by default and specifies the default
1491ISA for floating-point arithmetics.  You can select either @samp{sse} which
1492enables @option{-msse2} or @samp{avx} which enables @option{-mavx} by default.
1493This option is only supported on i386 and x86-64 targets.
1494
1495@item --with-fp-32=@var{mode}
1496On MIPS targets, set the default value for the @option{-mfp} option when using
1497the o32 ABI.  The possibilities for @var{mode} are:
1498@table @code
1499@item 32
1500Use the o32 FP32 ABI extension, as with the @option{-mfp32} command-line
1501option.
1502@item xx
1503Use the o32 FPXX ABI extension, as with the @option{-mfpxx} command-line
1504option.
1505@item 64
1506Use the o32 FP64 ABI extension, as with the @option{-mfp64} command-line
1507option.
1508@end table
1509In the absence of this configuration option the default is to use the o32
1510FP32 ABI extension.
1511
1512@item --with-odd-spreg-32
1513On MIPS targets, set the @option{-modd-spreg} option by default when using
1514the o32 ABI.
1515
1516@item --without-odd-spreg-32
1517On MIPS targets, set the @option{-mno-odd-spreg} option by default when using
1518the o32 ABI.  This is normally used in conjunction with
1519@option{--with-fp-32=64} in order to target the o32 FP64A ABI extension.
1520
1521@item --with-nan=@var{encoding}
1522On MIPS targets, set the default encoding convention to use for the
1523special not-a-number (NaN) IEEE 754 floating-point data.  The
1524possibilities for @var{encoding} are:
1525@table @code
1526@item legacy
1527Use the legacy encoding, as with the @option{-mnan=legacy} command-line
1528option.
1529@item 2008
1530Use the 754-2008 encoding, as with the @option{-mnan=2008} command-line
1531option.
1532@end table
1533To use this configuration option you must have an assembler version
1534installed that supports the @option{-mnan=} command-line option too.
1535In the absence of this configuration option the default convention is
1536the legacy encoding, as when neither of the @option{-mnan=2008} and
1537@option{-mnan=legacy} command-line options has been used.
1538
1539@item --with-divide=@var{type}
1540Specify how the compiler should generate code for checking for
1541division by zero.  This option is only supported on the MIPS target.
1542The possibilities for @var{type} are:
1543@table @code
1544@item traps
1545Division by zero checks use conditional traps (this is the default on
1546systems that support conditional traps).
1547@item breaks
1548Division by zero checks use the break instruction.
1549@end table
1550
1551@c If you make --with-llsc the default for additional targets,
1552@c update the --with-llsc description in the MIPS section below.
1553
1554@item --with-llsc
1555On MIPS targets, make @option{-mllsc} the default when no
1556@option{-mno-llsc} option is passed.  This is the default for
1557Linux-based targets, as the kernel will emulate them if the ISA does
1558not provide them.
1559
1560@item --without-llsc
1561On MIPS targets, make @option{-mno-llsc} the default when no
1562@option{-mllsc} option is passed.
1563
1564@item --with-synci
1565On MIPS targets, make @option{-msynci} the default when no
1566@option{-mno-synci} option is passed.
1567
1568@item --without-synci
1569On MIPS targets, make @option{-mno-synci} the default when no
1570@option{-msynci} option is passed.  This is the default.
1571
1572@item --with-lxc1-sxc1
1573On MIPS targets, make @option{-mlxc1-sxc1} the default when no
1574@option{-mno-lxc1-sxc1} option is passed.  This is the default.
1575
1576@item --without-lxc1-sxc1
1577On MIPS targets, make @option{-mno-lxc1-sxc1} the default when no
1578@option{-mlxc1-sxc1} option is passed.  The indexed load/store
1579instructions are not directly a problem but can lead to unexpected
1580behaviour when deployed in an application intended for a 32-bit address
1581space but run on a 64-bit processor.  The issue is seen because all
1582known MIPS 64-bit Linux kernels execute o32 and n32 applications
1583with 64-bit addressing enabled which affects the overflow behaviour
1584of the indexed addressing mode.  GCC will assume that ordinary
158532-bit arithmetic overflow behaviour is the same whether performed
1586as an @code{addu} instruction or as part of the address calculation
1587in @code{lwxc1} type instructions.  This assumption holds true in a
1588pure 32-bit environment and can hold true in a 64-bit environment if
1589the address space is accurately set to be 32-bit for o32 and n32.
1590
1591@item --with-madd4
1592On MIPS targets, make @option{-mmadd4} the default when no
1593@option{-mno-madd4} option is passed.  This is the default.
1594
1595@item --without-madd4
1596On MIPS targets, make @option{-mno-madd4} the default when no
1597@option{-mmadd4} option is passed.  The @code{madd4} instruction
1598family can be problematic when targeting a combination of cores that
1599implement these instructions differently.  There are two known cores
1600that implement these as fused operations instead of unfused (where
1601unfused is normally expected).  Disabling these instructions is the
1602only way to ensure compatible code is generated; this will incur
1603a performance penalty.
1604
1605@item --with-mips-plt
1606On MIPS targets, make use of copy relocations and PLTs.
1607These features are extensions to the traditional
1608SVR4-based MIPS ABIs and require support from GNU binutils
1609and the runtime C library.
1610
1611@item --with-stack-clash-protection-guard-size=@var{size}
1612On certain targets this option sets the default stack clash protection guard
1613size as a power of two in bytes.  On AArch64 @var{size} is required to be either
161412 (4KB) or 16 (64KB).
1615
1616@item --with-isa-spec=@var{ISA-spec-string}
1617On RISC-V targets specify the default version of the RISC-V Unprivileged
1618(formerly User-Level) ISA specification to produce code conforming to.
1619The possibilities for @var{ISA-spec-string} are:
1620@table @code
1621@item 2.2
1622Produce code conforming to version 2.2.
1623@item 20190608
1624Produce code conforming to version 20190608.
1625@item 20191213
1626Produce code conforming to version 20191213.
1627@end table
1628In the absence of this configuration option the default version is 20191213.
1629
1630@item --enable-__cxa_atexit
1631Define if you want to use __cxa_atexit, rather than atexit, to
1632register C++ destructors for local statics and global objects.
1633This is essential for fully standards-compliant handling of
1634destructors, but requires __cxa_atexit in libc.  This option is currently
1635only available on systems with GNU libc.  When enabled, this will cause
1636@option{-fuse-cxa-atexit} to be passed by default.
1637
1638@item --enable-gnu-indirect-function
1639Define if you want to enable the @code{ifunc} attribute.  This option is
1640currently only available on systems with GNU libc on certain targets.
1641
1642@item --enable-target-optspace
1643Specify that target
1644libraries should be optimized for code space instead of code speed.
1645This is the default for the m32r platform.
1646
1647@item --with-cpp-install-dir=@var{dirname}
1648Specify that the user visible @command{cpp} program should be installed
1649in @file{@var{prefix}/@var{dirname}/cpp}, in addition to @var{bindir}.
1650
1651@item --enable-comdat
1652Enable COMDAT group support.  This is primarily used to override the
1653automatically detected value.
1654
1655@item --enable-initfini-array
1656Force the use of sections @code{.init_array} and @code{.fini_array}
1657(instead of @code{.init} and @code{.fini}) for constructors and
1658destructors.  Option @option{--disable-initfini-array} has the
1659opposite effect.  If neither option is specified, the configure script
1660will try to guess whether the @code{.init_array} and
1661@code{.fini_array} sections are supported and, if they are, use them.
1662
1663@item --enable-link-mutex
1664When building GCC, use a mutex to avoid linking the compilers for
1665multiple languages at the same time, to avoid thrashing on build
1666systems with limited free memory.  The default is not to use such a mutex.
1667
1668@item --enable-link-serialization
1669When building GCC, use make dependencies to serialize linking the compilers for
1670multiple languages, to avoid thrashing on build
1671systems with limited free memory.  The default is not to add such
1672dependencies and thus with parallel make potentially link different
1673compilers concurrently.  If the argument is a positive integer, allow
1674that number of concurrent link processes for the large binaries.
1675
1676@item --enable-maintainer-mode
1677The build rules that regenerate the Autoconf and Automake output files as
1678well as the GCC master message catalog @file{gcc.pot} are normally
1679disabled.  This is because it can only be rebuilt if the complete source
1680tree is present.  If you have changed the sources and want to rebuild the
1681catalog, configuring with @option{--enable-maintainer-mode} will enable
1682this.  Note that you need a recent version of the @code{gettext} tools
1683to do so.
1684
1685@item --disable-bootstrap
1686For a native build, the default configuration is to perform
1687a 3-stage bootstrap of the compiler when @samp{make} is invoked,
1688testing that GCC can compile itself correctly.  If you want to disable
1689this process, you can configure with @option{--disable-bootstrap}.
1690
1691@item --enable-bootstrap
1692In special cases, you may want to perform a 3-stage build
1693even if the target and host triplets are different.
1694This is possible when the host can run code compiled for
1695the target (e.g.@: host is i686-linux, target is i486-linux).
1696Starting from GCC 4.2, to do this you have to configure explicitly
1697with @option{--enable-bootstrap}.
1698
1699@item --enable-generated-files-in-srcdir
1700Neither the .c and .h files that are generated from Bison and flex nor the
1701info manuals and man pages that are built from the .texi files are present
1702in the repository development tree.  When building GCC from that development tree,
1703or from one of our snapshots, those generated files are placed in your
1704build directory, which allows for the source to be in a readonly
1705directory.
1706
1707If you configure with @option{--enable-generated-files-in-srcdir} then those
1708generated files will go into the source directory.  This is mainly intended
1709for generating release or prerelease tarballs of the GCC sources, since it
1710is not a requirement that the users of source releases to have flex, Bison,
1711or makeinfo.
1712
1713@item --enable-version-specific-runtime-libs
1714Specify
1715that runtime libraries should be installed in the compiler specific
1716subdirectory (@file{@var{libdir}/gcc}) rather than the usual places.  In
1717addition, @samp{libstdc++}'s include files will be installed into
1718@file{@var{libdir}} unless you overruled it by using
1719@option{--with-gxx-include-dir=@var{dirname}}.  Using this option is
1720particularly useful if you intend to use several versions of GCC in
1721parallel.  The default is @samp{yes} for @samp{libada}, and @samp{no} for
1722the remaining libraries.
1723
1724@item @anchor{WithAixSoname}--with-aix-soname=@samp{aix}, @samp{svr4} or @samp{both}
1725Traditional AIX shared library versioning (versioned @code{Shared Object}
1726files as members of unversioned @code{Archive Library} files named
1727@samp{lib.a}) causes numerous headaches for package managers. However,
1728@code{Import Files} as members of @code{Archive Library} files allow for
1729@strong{filename-based versioning} of shared libraries as seen on Linux/SVR4,
1730where this is called the "SONAME". But as they prevent static linking,
1731@code{Import Files} may be used with @code{Runtime Linking} only, where the
1732linker does search for @samp{libNAME.so} before @samp{libNAME.a} library
1733filenames with the @samp{-lNAME} linker flag.
1734
1735@anchor{AixLdCommand}For detailed information please refer to the AIX
1736@uref{https://www.ibm.com/support/knowledgecenter/search/%22the%20ld%20command%2C%20also%20called%20the%20linkage%20editor%20or%20binder%22,,ld
1737Command} reference.
1738
1739As long as shared library creation is enabled, upon:
1740@table @code
1741@item --with-aix-soname=aix
1742@item --with-aix-soname=both
1743 A (traditional AIX) @code{Shared Archive Library} file is created:
1744 @itemize @bullet
1745  @item using the @samp{libNAME.a} filename scheme
1746  @item with the @code{Shared Object} file as archive member named
1747  @samp{libNAME.so.V} (except for @samp{libgcc_s}, where the @code{Shared
1748  Object} file is named @samp{shr.o} for backwards compatibility), which
1749  @itemize @minus
1750   @item is used for runtime loading from inside the @samp{libNAME.a} file
1751   @item is used for dynamic loading via
1752   @code{dlopen("libNAME.a(libNAME.so.V)", RTLD_MEMBER)}
1753   @item is used for shared linking
1754   @item is used for static linking, so no separate @code{Static Archive
1755   Library} file is needed
1756  @end itemize
1757 @end itemize
1758@item --with-aix-soname=both
1759@item --with-aix-soname=svr4
1760 A (second) @code{Shared Archive Library} file is created:
1761 @itemize @bullet
1762 @item using the @samp{libNAME.so.V} filename scheme
1763 @item with the @code{Shared Object} file as archive member named
1764 @samp{shr.o}, which
1765  @itemize @minus
1766   @item is created with the @code{-G linker flag}
1767   @item has the @code{F_LOADONLY} flag set
1768   @item is used for runtime loading from inside the @samp{libNAME.so.V} file
1769   @item is used for dynamic loading via @code{dlopen("libNAME.so.V(shr.o)",
1770   RTLD_MEMBER)}
1771  @end itemize
1772 @item with the @code{Import File} as archive member named @samp{shr.imp},
1773 which
1774  @itemize @minus
1775   @item refers to @samp{libNAME.so.V(shr.o)} as the "SONAME", to be recorded
1776   in the @code{Loader Section} of subsequent binaries
1777   @item indicates whether @samp{libNAME.so.V(shr.o)} is 32 or 64 bit
1778   @item lists all the public symbols exported by @samp{lib.so.V(shr.o)},
1779   eventually decorated with the @code{@samp{weak} Keyword}
1780   @item is necessary for shared linking against @samp{lib.so.V(shr.o)}
1781   @end itemize
1782  @end itemize
1783  A symbolic link using the @samp{libNAME.so} filename scheme is created:
1784  @itemize @bullet
1785  @item pointing to the @samp{libNAME.so.V} @code{Shared Archive Library} file
1786  @item to permit the @code{ld Command} to find @samp{lib.so.V(shr.imp)} via
1787  the @samp{-lNAME} argument (requires @code{Runtime Linking} to be enabled)
1788  @item to permit dynamic loading of @samp{lib.so.V(shr.o)} without the need
1789  to specify the version number via @code{dlopen("libNAME.so(shr.o)",
1790  RTLD_MEMBER)}
1791  @end itemize
1792@end table
1793
1794As long as static library creation is enabled, upon:
1795@table @code
1796@item --with-aix-soname=svr4
1797 A @code{Static Archive Library} is created:
1798 @itemize @bullet
1799 @item using the @samp{libNAME.a} filename scheme
1800 @item with all the @code{Static Object} files as archive members, which
1801  @itemize @minus
1802   @item are used for static linking
1803  @end itemize
1804 @end itemize
1805@end table
1806
1807While the aix-soname=@samp{svr4} option does not create @code{Shared Object}
1808files as members of unversioned @code{Archive Library} files any more, package
1809managers still are responsible to
1810@uref{./specific.html#TransferAixShobj,,transfer} @code{Shared Object} files
1811found as member of a previously installed unversioned @code{Archive Library}
1812file into the newly installed @code{Archive Library} file with the same
1813filename.
1814
1815@emph{WARNING:} Creating @code{Shared Object} files with @code{Runtime Linking}
1816enabled may bloat the TOC, eventually leading to @code{TOC overflow} errors,
1817requiring the use of either the @option{-Wl,-bbigtoc} linker flag (seen to
1818break with the @code{GDB} debugger) or some of the TOC-related compiler flags,
1819@ifnothtml
1820@xref{RS/6000 and PowerPC Options,, RS/6000 and PowerPC Options, gcc,
1821Using the GNU Compiler Collection (GCC)}.
1822@end ifnothtml
1823@ifhtml
1824see ``RS/6000 and PowerPC Options'' in the main manual.
1825@end ifhtml
1826
1827@option{--with-aix-soname} is currently supported by @samp{libgcc_s} only, so
1828this option is still experimental and not for normal use yet.
1829
1830Default is the traditional behavior @option{--with-aix-soname=@samp{aix}}.
1831
1832@item --enable-languages=@var{lang1},@var{lang2},@dots{}
1833Specify that only a particular subset of compilers and
1834their runtime libraries should be built.  For a list of valid values for
1835@var{langN} you can issue the following command in the
1836@file{gcc} directory of your GCC source tree:@*
1837@smallexample
1838grep ^language= */config-lang.in
1839@end smallexample
1840Currently, you can use any of the following:
1841@code{all}, @code{default}, @code{ada}, @code{c}, @code{c++}, @code{d},
1842@code{fortran}, @code{go}, @code{jit}, @code{lto}, @code{objc}, @code{obj-c++}.
1843Building the Ada compiler has special requirements, see below.
1844If you do not pass this flag, or specify the option @code{default}, then the
1845default languages available in the @file{gcc} sub-tree will be configured.
1846Ada, D, Go, Jit, and Objective-C++ are not default languages.  LTO is not a
1847default language, but is built by default because @option{--enable-lto} is
1848enabled by default.  The other languages are default languages.  If
1849@code{all} is specified, then all available languages are built.  An
1850exception is @code{jit} language, which requires
1851@option{--enable-host-shared} to be included with @code{all}.
1852
1853@item --enable-stage1-languages=@var{lang1},@var{lang2},@dots{}
1854Specify that a particular subset of compilers and their runtime
1855libraries should be built with the system C compiler during stage 1 of
1856the bootstrap process, rather than only in later stages with the
1857bootstrapped C compiler.  The list of valid values is the same as for
1858@option{--enable-languages}, and the option @code{all} will select all
1859of the languages enabled by @option{--enable-languages}.  This option is
1860primarily useful for GCC development; for instance, when a development
1861version of the compiler cannot bootstrap due to compiler bugs, or when
1862one is debugging front ends other than the C front end.  When this
1863option is used, one can then build the target libraries for the
1864specified languages with the stage-1 compiler by using @command{make
1865stage1-bubble all-target}, or run the testsuite on the stage-1 compiler
1866for the specified languages using @command{make stage1-start check-gcc}.
1867
1868@item --disable-libada
1869Specify that the run-time libraries and tools used by GNAT should not
1870be built.  This can be useful for debugging, or for compatibility with
1871previous Ada build procedures, when it was required to explicitly
1872do a @samp{make -C gcc gnatlib_and_tools}.
1873
1874@item --disable-libsanitizer
1875Specify that the run-time libraries for the various sanitizers should
1876not be built.
1877
1878@item --disable-libssp
1879Specify that the run-time libraries for stack smashing protection
1880should not be built or linked against.  On many targets library support
1881is provided by the C library instead.
1882
1883@item --disable-libquadmath
1884Specify that the GCC quad-precision math library should not be built.
1885On some systems, the library is required to be linkable when building
1886the Fortran front end, unless @option{--disable-libquadmath-support}
1887is used.
1888
1889@item --disable-libquadmath-support
1890Specify that the Fortran front end and @code{libgfortran} do not add
1891support for @code{libquadmath} on systems supporting it.
1892
1893@item --disable-libgomp
1894Specify that the GNU Offloading and Multi Processing Runtime Library
1895should not be built.
1896
1897@item --disable-libvtv
1898Specify that the run-time libraries used by vtable verification
1899should not be built.
1900
1901@item --with-dwarf2
1902Specify that the compiler should
1903use DWARF 2 debugging information as the default.
1904
1905@item --with-advance-toolchain=@var{at}
1906On 64-bit PowerPC Linux systems, configure the compiler to use the
1907header files, library files, and the dynamic linker from the Advance
1908Toolchain release @var{at} instead of the default versions that are
1909provided by the Linux distribution.  In general, this option is
1910intended for the developers of GCC, and it is not intended for general
1911use.
1912
1913@item --enable-targets=all
1914@itemx --enable-targets=@var{target_list}
1915Some GCC targets, e.g.@: powerpc64-linux, build bi-arch compilers.
1916These are compilers that are able to generate either 64-bit or 32-bit
1917code.  Typically, the corresponding 32-bit target, e.g.@:
1918powerpc-linux for powerpc64-linux, only generates 32-bit code.  This
1919option enables the 32-bit target to be a bi-arch compiler, which is
1920useful when you want a bi-arch compiler that defaults to 32-bit, and
1921you are building a bi-arch or multi-arch binutils in a combined tree.
1922On mips-linux, this will build a tri-arch compiler (ABI o32/n32/64),
1923defaulted to o32.
1924Currently, this option only affects sparc-linux, powerpc-linux, x86-linux,
1925mips-linux and s390-linux.
1926
1927@item --enable-default-pie
1928Turn on @option{-fPIE} and @option{-pie} by default.
1929
1930@item --enable-secureplt
1931This option enables @option{-msecure-plt} by default for powerpc-linux.
1932@ifnothtml
1933@xref{RS/6000 and PowerPC Options,, RS/6000 and PowerPC Options, gcc,
1934Using the GNU Compiler Collection (GCC)},
1935@end ifnothtml
1936@ifhtml
1937See ``RS/6000 and PowerPC Options'' in the main manual
1938@end ifhtml
1939
1940@item --enable-default-ssp
1941Turn on @option{-fstack-protector-strong} by default.
1942
1943@item --enable-cld
1944This option enables @option{-mcld} by default for 32-bit x86 targets.
1945@ifnothtml
1946@xref{i386 and x86-64 Options,, i386 and x86-64 Options, gcc,
1947Using the GNU Compiler Collection (GCC)},
1948@end ifnothtml
1949@ifhtml
1950See ``i386 and x86-64 Options'' in the main manual
1951@end ifhtml
1952
1953@item --enable-large-address-aware
1954The @option{--enable-large-address-aware} option arranges for MinGW
1955executables to be linked using the @option{--large-address-aware}
1956option, that enables the use of more than 2GB of memory.  If GCC is
1957configured with this option, its effects can be reversed by passing the
1958@option{-Wl,--disable-large-address-aware} option to the so-configured
1959compiler driver.
1960
1961@item --enable-win32-registry
1962@itemx --enable-win32-registry=@var{key}
1963@itemx --disable-win32-registry
1964The @option{--enable-win32-registry} option enables Microsoft Windows-hosted GCC
1965to look up installations paths in the registry using the following key:
1966
1967@smallexample
1968@code{HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\@var{key}}
1969@end smallexample
1970
1971@var{key} defaults to GCC version number, and can be overridden by the
1972@option{--enable-win32-registry=@var{key}} option.  Vendors and distributors
1973who use custom installers are encouraged to provide a different key,
1974perhaps one comprised of vendor name and GCC version number, to
1975avoid conflict with existing installations.  This feature is enabled
1976by default, and can be disabled by @option{--disable-win32-registry}
1977option.  This option has no effect on the other hosts.
1978
1979@item --nfp
1980Specify that the machine does not have a floating point unit.  This
1981option only applies to @samp{m68k-sun-sunos@var{n}}.  On any other
1982system, @option{--nfp} has no effect.
1983
1984@item --enable-werror
1985@itemx --disable-werror
1986@itemx --enable-werror=yes
1987@itemx --enable-werror=no
1988When you specify this option, it controls whether certain files in the
1989compiler are built with @option{-Werror} in bootstrap stage2 and later.
1990If you don't specify it, @option{-Werror} is turned on for the main
1991development trunk.  However it defaults to off for release branches and
1992final releases.  The specific files which get @option{-Werror} are
1993controlled by the Makefiles.
1994
1995@item --enable-checking
1996@itemx --disable-checking
1997@itemx --enable-checking=@var{list}
1998This option controls performing internal consistency checks in the compiler.
1999It does not change the generated code, but adds error checking of the
2000requested complexity.  This slows down the compiler and may only work
2001properly if you are building the compiler with GCC@.
2002
2003When the option is not specified, the active set of checks depends on context.
2004Namely, bootstrap stage 1 defaults to @samp{--enable-checking=yes}, builds
2005from release branches or release archives default to
2006@samp{--enable-checking=release}, and otherwise
2007@samp{--enable-checking=yes,extra} is used.  When the option is
2008specified without a @var{list}, the result is the same as
2009@samp{--enable-checking=yes}.  Likewise, @samp{--disable-checking} is
2010equivalent to @samp{--enable-checking=no}.
2011
2012The categories of checks available in @var{list} are @samp{yes} (most common
2013checks @samp{assert,misc,gc,gimple,rtlflag,runtime,tree,types}), @samp{no}
2014(no checks at all), @samp{all} (all but @samp{valgrind}), @samp{release}
2015(cheapest checks @samp{assert,runtime}) or @samp{none} (same as @samp{no}).
2016@samp{release} checks are always on and to disable them
2017@samp{--disable-checking} or @samp{--enable-checking=no[,<other checks>]}
2018must be explicitly requested.  Disabling assertions makes the compiler and
2019runtime slightly faster but increases the risk of undetected internal errors
2020causing wrong code to be generated.
2021
2022Individual checks can be enabled with these flags: @samp{assert}, @samp{df},
2023@samp{extra}, @samp{fold}, @samp{gc}, @samp{gcac}, @samp{gimple},
2024@samp{misc}, @samp{rtl}, @samp{rtlflag}, @samp{runtime}, @samp{tree},
2025@samp{types} and @samp{valgrind}.  @samp{extra} extends @samp{misc}
2026checking with extra checks that might affect code generation and should
2027therefore not differ between stage1 and later stages in bootstrap.
2028
2029The @samp{valgrind} check requires the external @command{valgrind} simulator,
2030available from @uref{https://valgrind.org}.  The @samp{rtl} checks are
2031expensive and the @samp{df}, @samp{gcac} and @samp{valgrind} checks are very
2032expensive.
2033
2034@item --disable-stage1-checking
2035@itemx --enable-stage1-checking
2036@itemx --enable-stage1-checking=@var{list}
2037This option affects only bootstrap build.  If no @option{--enable-checking}
2038option is specified the stage1 compiler is built with @samp{yes} checking
2039enabled, otherwise the stage1 checking flags are the same as specified by
2040@option{--enable-checking}.  To build the stage1 compiler with
2041different checking options use @option{--enable-stage1-checking}.
2042The list of checking options is the same as for @option{--enable-checking}.
2043If your system is too slow or too small to bootstrap a released compiler
2044with checking for stage1 enabled, you can use @samp{--disable-stage1-checking}
2045to disable checking for the stage1 compiler.
2046
2047@item --enable-coverage
2048@itemx --enable-coverage=@var{level}
2049With this option, the compiler is built to collect self coverage
2050information, every time it is run.  This is for internal development
2051purposes, and only works when the compiler is being built with gcc.  The
2052@var{level} argument controls whether the compiler is built optimized or
2053not, values are @samp{opt} and @samp{noopt}.  For coverage analysis you
2054want to disable optimization, for performance analysis you want to
2055enable optimization.  When coverage is enabled, the default level is
2056without optimization.
2057
2058@item --enable-gather-detailed-mem-stats
2059When this option is specified more detailed information on memory
2060allocation is gathered.  This information is printed when using
2061@option{-fmem-report}.
2062
2063@item --enable-valgrind-annotations
2064Mark selected memory related operations in the compiler when run under
2065valgrind to suppress false positives.
2066
2067@item --enable-nls
2068@itemx --disable-nls
2069The @option{--enable-nls} option enables Native Language Support (NLS),
2070which lets GCC output diagnostics in languages other than American
2071English.  Native Language Support is enabled by default if not doing a
2072canadian cross build.  The @option{--disable-nls} option disables NLS@.
2073
2074@item --with-included-gettext
2075If NLS is enabled, the @option{--with-included-gettext} option causes the build
2076procedure to prefer its copy of GNU @command{gettext}.
2077
2078@item --with-catgets
2079If NLS is enabled, and if the host lacks @code{gettext} but has the
2080inferior @code{catgets} interface, the GCC build procedure normally
2081ignores @code{catgets} and instead uses GCC's copy of the GNU
2082@code{gettext} library.  The @option{--with-catgets} option causes the
2083build procedure to use the host's @code{catgets} in this situation.
2084
2085@item --with-libiconv-prefix=@var{dir}
2086Search for libiconv header files in @file{@var{dir}/include} and
2087libiconv library files in @file{@var{dir}/lib}.
2088
2089@item --enable-obsolete
2090Enable configuration for an obsoleted system.  If you attempt to
2091configure GCC for a system (build, host, or target) which has been
2092obsoleted, and you do not specify this flag, configure will halt with an
2093error message.
2094
2095All support for systems which have been obsoleted in one release of GCC
2096is removed entirely in the next major release, unless someone steps
2097forward to maintain the port.
2098
2099@item --enable-decimal-float
2100@itemx --enable-decimal-float=yes
2101@itemx --enable-decimal-float=no
2102@itemx --enable-decimal-float=bid
2103@itemx --enable-decimal-float=dpd
2104@itemx --disable-decimal-float
2105Enable (or disable) support for the C decimal floating point extension
2106that is in the IEEE 754-2008 standard.  This is enabled by default only
2107on PowerPC, i386, and x86_64 GNU/Linux systems.  Other systems may also
2108support it, but require the user to specifically enable it.  You can
2109optionally control which decimal floating point format is used (either
2110@samp{bid} or @samp{dpd}).  The @samp{bid} (binary integer decimal)
2111format is default on i386 and x86_64 systems, and the @samp{dpd}
2112(densely packed decimal) format is default on PowerPC systems.
2113
2114@item --enable-fixed-point
2115@itemx --disable-fixed-point
2116Enable (or disable) support for C fixed-point arithmetic.
2117This option is enabled by default for some targets (such as MIPS) which
2118have hardware-support for fixed-point operations.  On other targets, you
2119may enable this option manually.
2120
2121@item --with-long-double-128
2122Specify if @code{long double} type should be 128-bit by default on selected
2123GNU/Linux architectures.  If using @code{--without-long-double-128},
2124@code{long double} will be by default 64-bit, the same as @code{double} type.
2125When neither of these configure options are used, the default will be
2126128-bit @code{long double} when built against GNU C Library 2.4 and later,
212764-bit @code{long double} otherwise.
2128
2129@item --with-long-double-format=ibm
2130@itemx --with-long-double-format=ieee
2131Specify whether @code{long double} uses the IBM extended double format
2132or the IEEE 128-bit floating point format on PowerPC Linux systems.
2133This configuration switch will only work on little endian PowerPC
2134Linux systems and on big endian 64-bit systems where the default cpu
2135is at least power7 (i.e.@: @option{--with-cpu=power7},
2136@option{--with-cpu=power8}, or @option{--with-cpu=power9} is used).
2137
2138If you use the @option{--with-long-double-64} configuration option,
2139the @option{--with-long-double-format=ibm} and
2140@option{--with-long-double-format=ieee} options are ignored.
2141
2142The default @code{long double} format is to use IBM extended double.
2143Until all of the libraries are converted to use IEEE 128-bit floating
2144point, it is not recommended to use
2145@option{--with-long-double-format=ieee}.
2146
2147@item --enable-fdpic
2148On SH Linux systems, generate ELF FDPIC code.
2149
2150@item --with-gmp=@var{pathname}
2151@itemx --with-gmp-include=@var{pathname}
2152@itemx --with-gmp-lib=@var{pathname}
2153@itemx --with-mpfr=@var{pathname}
2154@itemx --with-mpfr-include=@var{pathname}
2155@itemx --with-mpfr-lib=@var{pathname}
2156@itemx --with-mpc=@var{pathname}
2157@itemx --with-mpc-include=@var{pathname}
2158@itemx --with-mpc-lib=@var{pathname}
2159If you want to build GCC but do not have the GMP library, the MPFR
2160library and/or the MPC library installed in a standard location and
2161do not have their sources present in the GCC source tree then you
2162can explicitly specify the directory where they are installed
2163(@samp{--with-gmp=@var{gmpinstalldir}},
2164@samp{--with-mpfr=@/@var{mpfrinstalldir}},
2165@samp{--with-mpc=@/@var{mpcinstalldir}}).  The
2166@option{--with-gmp=@/@var{gmpinstalldir}} option is shorthand for
2167@option{--with-gmp-lib=@/@var{gmpinstalldir}/lib} and
2168@option{--with-gmp-include=@/@var{gmpinstalldir}/include}.  Likewise the
2169@option{--with-mpfr=@/@var{mpfrinstalldir}} option is shorthand for
2170@option{--with-mpfr-lib=@/@var{mpfrinstalldir}/lib} and
2171@option{--with-mpfr-include=@/@var{mpfrinstalldir}/include}, also the
2172@option{--with-mpc=@/@var{mpcinstalldir}} option is shorthand for
2173@option{--with-mpc-lib=@/@var{mpcinstalldir}/lib} and
2174@option{--with-mpc-include=@/@var{mpcinstalldir}/include}.  If these
2175shorthand assumptions are not correct, you can use the explicit
2176include and lib options directly.  You might also need to ensure the
2177shared libraries can be found by the dynamic linker when building and
2178using GCC, for example by setting the runtime shared library path
2179variable (@env{LD_LIBRARY_PATH} on GNU/Linux and Solaris systems).
2180
2181These flags are applicable to the host platform only.  When building
2182a cross compiler, they will not be used to configure target libraries.
2183
2184@item --with-isl=@var{pathname}
2185@itemx --with-isl-include=@var{pathname}
2186@itemx --with-isl-lib=@var{pathname}
2187If you do not have the isl library installed in a standard location and you
2188want to build GCC, you can explicitly specify the directory where it is
2189installed (@samp{--with-isl=@/@var{islinstalldir}}). The
2190@option{--with-isl=@/@var{islinstalldir}} option is shorthand for
2191@option{--with-isl-lib=@/@var{islinstalldir}/lib} and
2192@option{--with-isl-include=@/@var{islinstalldir}/include}. If this
2193shorthand assumption is not correct, you can use the explicit
2194include and lib options directly.
2195
2196These flags are applicable to the host platform only.  When building
2197a cross compiler, they will not be used to configure target libraries.
2198
2199@item --with-stage1-ldflags=@var{flags}
2200This option may be used to set linker flags to be used when linking
2201stage 1 of GCC.  These are also used when linking GCC if configured with
2202@option{--disable-bootstrap}.  If @option{--with-stage1-libs} is not set to a
2203value, then the default is @samp{-static-libstdc++ -static-libgcc}, if
2204supported.
2205
2206@item --with-stage1-libs=@var{libs}
2207This option may be used to set libraries to be used when linking stage 1
2208of GCC.  These are also used when linking GCC if configured with
2209@option{--disable-bootstrap}.
2210
2211@item --with-boot-ldflags=@var{flags}
2212This option may be used to set linker flags to be used when linking
2213stage 2 and later when bootstrapping GCC.  If --with-boot-libs
2214is not is set to a value, then the default is
2215@samp{-static-libstdc++ -static-libgcc}.
2216
2217@item --with-boot-libs=@var{libs}
2218This option may be used to set libraries to be used when linking stage 2
2219and later when bootstrapping GCC.
2220
2221@item --with-debug-prefix-map=@var{map}
2222Convert source directory names using @option{-fdebug-prefix-map} when
2223building runtime libraries.  @samp{@var{map}} is a space-separated
2224list of maps of the form @samp{@var{old}=@var{new}}.
2225
2226@item --enable-linker-build-id
2227Tells GCC to pass @option{--build-id} option to the linker for all final
2228links (links performed without the @option{-r} or @option{--relocatable}
2229option), if the linker supports it.  If you specify
2230@option{--enable-linker-build-id}, but your linker does not
2231support @option{--build-id} option, a warning is issued and the
2232@option{--enable-linker-build-id} option is ignored.  The default is off.
2233
2234@item --with-linker-hash-style=@var{choice}
2235Tells GCC to pass @option{--hash-style=@var{choice}} option to the
2236linker for all final links. @var{choice} can be one of
2237@samp{sysv}, @samp{gnu}, and @samp{both} where @samp{sysv} is the default.
2238
2239@item --enable-gnu-unique-object
2240@itemx --disable-gnu-unique-object
2241Tells GCC to use the gnu_unique_object relocation for C++ template
2242static data members and inline function local statics.  Enabled by
2243default for a toolchain with an assembler that accepts it and
2244GLIBC 2.11 or above, otherwise disabled.
2245
2246@item --with-diagnostics-color=@var{choice}
2247Tells GCC to use @var{choice} as the default for @option{-fdiagnostics-color=}
2248option (if not used explicitly on the command line).  @var{choice}
2249can be one of @samp{never}, @samp{auto}, @samp{always}, and @samp{auto-if-env}
2250where @samp{auto} is the default.  @samp{auto-if-env} makes
2251@option{-fdiagnostics-color=auto} the default if @env{GCC_COLORS}
2252is present and non-empty in the environment of the compiler, and
2253@option{-fdiagnostics-color=never} otherwise.
2254
2255@item --with-diagnostics-urls=@var{choice}
2256Tells GCC to use @var{choice} as the default for @option{-fdiagnostics-urls=}
2257option (if not used explicitly on the command line).  @var{choice}
2258can be one of @samp{never}, @samp{auto}, @samp{always}, and @samp{auto-if-env}
2259where @samp{auto} is the default.  @samp{auto-if-env} makes
2260@option{-fdiagnostics-urls=auto} the default if @env{GCC_URLS}
2261or @env{TERM_URLS} is present and non-empty in the environment of the
2262compiler, and @option{-fdiagnostics-urls=never} otherwise.
2263
2264@item --enable-lto
2265@itemx --disable-lto
2266Enable support for link-time optimization (LTO).  This is enabled by
2267default, and may be disabled using @option{--disable-lto}.
2268
2269@item --enable-linker-plugin-configure-flags=FLAGS
2270@itemx --enable-linker-plugin-flags=FLAGS
2271By default, linker plugins (such as the LTO plugin) are built for the
2272host system architecture.  For the case that the linker has a
2273different (but run-time compatible) architecture, these flags can be
2274specified to build plugins that are compatible to the linker.  For
2275example, if you are building GCC for a 64-bit x86_64
2276(@samp{x86_64-pc-linux-gnu}) host system, but have a 32-bit x86
2277GNU/Linux (@samp{i686-pc-linux-gnu}) linker executable (which is
2278executable on the former system), you can configure GCC as follows for
2279getting compatible linker plugins:
2280
2281@smallexample
2282% @var{srcdir}/configure \
2283    --host=x86_64-pc-linux-gnu \
2284    --enable-linker-plugin-configure-flags=--host=i686-pc-linux-gnu \
2285    --enable-linker-plugin-flags='CC=gcc\ -m32\ -Wl,-rpath,[...]/i686-pc-linux-gnu/lib'
2286@end smallexample
2287
2288@item --with-plugin-ld=@var{pathname}
2289Enable an alternate linker to be used at link-time optimization (LTO)
2290link time when @option{-fuse-linker-plugin} is enabled.
2291This linker should have plugin support such as gold starting with
2292version 2.20 or GNU ld starting with version 2.21.
2293See @option{-fuse-linker-plugin} for details.
2294
2295@item --enable-canonical-system-headers
2296@itemx --disable-canonical-system-headers
2297Enable system header path canonicalization for @file{libcpp}.  This can
2298produce shorter header file paths in diagnostics and dependency output
2299files, but these changed header paths may conflict with some compilation
2300environments.  Enabled by default, and may be disabled using
2301@option{--disable-canonical-system-headers}.
2302
2303@item --with-glibc-version=@var{major}.@var{minor}
2304Tell GCC that when the GNU C Library (glibc) is used on the target it
2305will be version @var{major}.@var{minor} or later.  Normally this can
2306be detected from the C library's header files, but this option may be
2307needed when bootstrapping a cross toolchain without the header files
2308available for building the initial bootstrap compiler.
2309
2310If GCC is configured with some multilibs that use glibc and some that
2311do not, this option applies only to the multilibs that use glibc.
2312However, such configurations may not work well as not all the relevant
2313configuration in GCC is on a per-multilib basis.
2314
2315@item --enable-as-accelerator-for=@var{target}
2316Build as offload target compiler. Specify offload host triple by @var{target}.
2317
2318@item --enable-offload-targets=@var{target1}[=@var{path1}],@dots{},@var{targetN}[=@var{pathN}]
2319Enable offloading to targets @var{target1}, @dots{}, @var{targetN}.
2320Offload compilers are expected to be already installed.  Default search
2321path for them is @file{@var{exec-prefix}}, but it can be changed by
2322specifying paths @var{path1}, @dots{}, @var{pathN}.
2323
2324@smallexample
2325% @var{srcdir}/configure \
2326    --enable-offload-targets=x86_64-intelmicemul-linux-gnu=/path/to/x86_64/compiler,nvptx-none
2327@end smallexample
2328
2329@item --enable-offload-defaulted
2330
2331Tell GCC that configured but not installed offload compilers and libgomp
2332plugins are silently ignored.  Useful for distribution compilers where
2333those are in separate optional packages and where the presence or absence
2334of those optional packages should determine the actual supported offloading
2335target set rather than the GCC configure-time selection.
2336
2337@item --with-hsa-runtime=@var{pathname}
2338@itemx --with-hsa-runtime-include=@var{pathname}
2339@itemx --with-hsa-runtime-lib=@var{pathname}
2340
2341If you configure GCC with offloading which uses an HSA run-time such as
2342AMDGCN but do not have the HSA run-time library installed in a standard
2343location then you can explicitly specify the directory where they are
2344installed.  The @option{--with-hsa-runtime=@/@var{hsainstalldir}} option
2345is a shorthand for
2346@option{--with-hsa-runtime-lib=@/@var{hsainstalldir}/lib} and
2347@option{--with-hsa-runtime-include=@/@var{hsainstalldir}/include}.
2348
2349@item --enable-cet
2350@itemx --disable-cet
2351Enable building target run-time libraries with control-flow
2352instrumentation, see @option{-fcf-protection} option.  When
2353@code{--enable-cet} is specified target libraries are configured
2354to add @option{-fcf-protection} and, if needed, other target
2355specific options to a set of building options.
2356
2357@code{--enable-cet=auto} is default.  CET is enabled on Linux/x86 if
2358target binutils supports @code{Intel CET} instructions and disabled
2359otherwise.  In this case, the target libraries are configured to get
2360additional @option{-fcf-protection} option.
2361
2362@item --with-riscv-attribute=@samp{yes}, @samp{no} or @samp{default}
2363Generate RISC-V attribute by default, in order to record extra build
2364information in object.
2365
2366The option is disabled by default. It is enabled on RISC-V/ELF (bare-metal)
2367target if target binutils supported.
2368
2369@item --enable-s390-excess-float-precision
2370@itemx --disable-s390-excess-float-precision
2371On s390(x) targets, enable treatment of float expressions with double precision
2372when in standards-compliant mode (e.g., when @code{--std=c99} or
2373@code{-fexcess-precision=standard} are given).
2374
2375For a native build and cross compiles that have target headers, the option's
2376default is derived from glibc's behavior. When glibc clamps float_t to double,
2377GCC follows and enables the option. For other cross compiles, the default is
2378disabled.
2379
2380@item --with-zstd=@var{pathname}
2381@itemx --with-zstd-include=@var{pathname}
2382@itemx --with-zstd-lib=@var{pathname}
2383If you do not have the @code{zstd} library installed in a standard
2384location and you want to build GCC, you can explicitly specify the
2385directory where it is installed (@samp{--with-zstd=@/@var{zstdinstalldir}}).
2386The @option{--with-zstd=@/@var{zstdinstalldir}} option is shorthand for
2387@option{--with-zstd-lib=@/@var{zstdinstalldir}/lib} and
2388@option{--with-zstd-include=@/@var{zstdinstalldir}/include}. If this
2389shorthand assumption is not correct, you can use the explicit
2390include and lib options directly.
2391
2392These flags are applicable to the host platform only.  When building
2393a cross compiler, they will not be used to configure target libraries.
2394@end table
2395
2396@subheading Cross-Compiler-Specific Options
2397The following options only apply to building cross compilers.
2398
2399@table @code
2400@item --with-toolexeclibdir=@var{dir}
2401Specify the installation directory for libraries built with a cross compiler.
2402The default is @option{$@{gcc_tooldir@}/lib}.
2403
2404@item --with-sysroot
2405@itemx --with-sysroot=@var{dir}
2406Tells GCC to consider @var{dir} as the root of a tree that contains
2407(a subset of) the root filesystem of the target operating system.
2408Target system headers, libraries and run-time object files will be
2409searched for in there.  More specifically, this acts as if
2410@option{--sysroot=@var{dir}} was added to the default options of the built
2411compiler.  The specified directory is not copied into the
2412install tree, unlike the options @option{--with-headers} and
2413@option{--with-libs} that this option obsoletes.  The default value,
2414in case @option{--with-sysroot} is not given an argument, is
2415@option{$@{gcc_tooldir@}/sys-root}.  If the specified directory is a
2416subdirectory of @option{$@{exec_prefix@}}, then it will be found relative to
2417the GCC binaries if the installation tree is moved.
2418
2419This option affects the system root for the compiler used to build
2420target libraries (which runs on the build system) and the compiler newly
2421installed with @code{make install}; it does not affect the compiler which is
2422used to build GCC itself.
2423
2424If you specify the @option{--with-native-system-header-dir=@var{dirname}}
2425option then the compiler will search that directory within @var{dirname} for
2426native system headers rather than the default @file{/usr/include}.
2427
2428@item --with-build-sysroot
2429@itemx --with-build-sysroot=@var{dir}
2430Tells GCC to consider @var{dir} as the system root (see
2431@option{--with-sysroot}) while building target libraries, instead of
2432the directory specified with @option{--with-sysroot}.  This option is
2433only useful when you are already using @option{--with-sysroot}.  You
2434can use @option{--with-build-sysroot} when you are configuring with
2435@option{--prefix} set to a directory that is different from the one in
2436which you are installing GCC and your target libraries.
2437
2438This option affects the system root for the compiler used to build
2439target libraries (which runs on the build system); it does not affect
2440the compiler which is used to build GCC itself.
2441
2442If you specify the @option{--with-native-system-header-dir=@var{dirname}}
2443option then the compiler will search that directory within @var{dirname} for
2444native system headers rather than the default @file{/usr/include}.
2445
2446@item --with-headers
2447@itemx --with-headers=@var{dir}
2448Deprecated in favor of @option{--with-sysroot}.
2449Specifies that target headers are available when building a cross compiler.
2450The @var{dir} argument specifies a directory which has the target include
2451files.  These include files will be copied into the @file{gcc} install
2452directory.  @emph{This option with the @var{dir} argument is required} when
2453building a cross compiler, if @file{@var{prefix}/@var{target}/sys-include}
2454doesn't pre-exist.  If @file{@var{prefix}/@var{target}/sys-include} does
2455pre-exist, the @var{dir} argument may be omitted.  @command{fixincludes}
2456will be run on these files to make them compatible with GCC@.
2457
2458@item --without-headers
2459Tells GCC not use any target headers from a libc when building a cross
2460compiler.  When crossing to GNU/Linux, you need the headers so GCC
2461can build the exception handling for libgcc.
2462
2463@item --with-libs
2464@itemx --with-libs="@var{dir1} @var{dir2} @dots{} @var{dirN}"
2465Deprecated in favor of @option{--with-sysroot}.
2466Specifies a list of directories which contain the target runtime
2467libraries.  These libraries will be copied into the @file{gcc} install
2468directory.  If the directory list is omitted, this option has no
2469effect.
2470
2471@item --with-newlib
2472Specifies that @samp{newlib} is
2473being used as the target C library.  This causes @code{__eprintf} to be
2474omitted from @file{libgcc.a} on the assumption that it will be provided by
2475@samp{newlib}.
2476
2477@html
2478<a name="avr"></a>
2479@end html
2480@item --with-avrlibc
2481Only supported for the AVR target. Specifies that @samp{AVR-Libc} is
2482being used as the target C@tie{} library.  This causes float support
2483functions like @code{__addsf3} to be omitted from @file{libgcc.a} on
2484the assumption that it will be provided by @file{libm.a}.  For more
2485technical details, cf. @uref{https://gcc.gnu.org/PR54461,,PR54461}.
2486It is not supported for
2487RTEMS configurations, which currently use newlib.  The option is
2488supported since version 4.7.2 and is the default in 4.8.0 and newer.
2489
2490@item --with-double=@{32|64|32,64|64,32@}
2491@itemx --with-long-double=@{32|64|32,64|64,32|double@}
2492Only supported for the AVR target since version@tie{}10.
2493Specify the default layout available for the C/C++ @samp{double}
2494and @samp{long double} type, respectively. The following rules apply:
2495@itemize
2496@item
2497The first value after the @samp{=} specifies the default layout (in bits)
2498of the type and also the default for the @option{-mdouble=} resp.
2499@option{-mlong-double=} compiler option.
2500@item
2501If more than one value is specified, respective multilib variants are
2502available, and  @option{-mdouble=} resp. @option{-mlong-double=} acts
2503as a multilib option.
2504@item
2505If @option{--with-long-double=double} is specified, @samp{double} and
2506@samp{long double} will have the same layout.
2507@item
2508The defaults are @option{--with-long-double=64,32} and
2509@option{--with-double=32,64}.  The default @samp{double} layout imposed by
2510the latter is compatible with older versions of the compiler that implement
2511@samp{double} as a 32-bit type, which does not comply to the language standard.
2512@end itemize
2513Not all combinations of @option{--with-double=} and
2514@option{--with-long-double=} are valid.  For example, the combination
2515@option{--with-double=32,64} @option{--with-long-double=32} will be
2516rejected because the first option specifies the availability of
2517multilibs for @samp{double}, whereas the second option implies
2518that @samp{long double} --- and hence also @samp{double} --- is always
251932@tie{}bits wide.
2520
2521@item --with-double-comparison=@{tristate|bool|libf7@}
2522Only supported for the AVR target since version@tie{}10.
2523Specify what result format is returned by library functions that
2524compare 64-bit floating point values (@code{DFmode}).
2525The GCC default is @samp{tristate}.  If the floating point
2526implementation returns a boolean instead, set it to @samp{bool}.
2527
2528@item --with-libf7=@{libgcc|math|math-symbols|no@}
2529Only supported for the AVR target since version@tie{}10.
2530Specify to which degree code from LibF7 is included in libgcc.
2531LibF7 is an ad-hoc, AVR-specific, 64-bit floating point emulation
2532written in C and (inline) assembly. @samp{libgcc} adds support
2533for functions that one would usually expect in libgcc like double addition,
2534double comparisons and double conversions. @samp{math} also adds routines
2535that one would expect in @file{libm.a}, but with @code{__} (two underscores)
2536prepended to the symbol names as specified by @file{math.h}.
2537@samp{math-symbols} also defines weak aliases for the functions
2538declared in @file{math.h}.  However, @code{--with-libf7} won't
2539install no @file{math.h} header file whatsoever, this file must come
2540from elsewhere.  This option sets @option{--with-double-comparison}
2541to @samp{bool}.
2542
2543@item --with-nds32-lib=@var{library}
2544Specifies that @var{library} setting is used for building @file{libgcc.a}.
2545Currently, the valid @var{library} is @samp{newlib} or @samp{mculib}.
2546This option is only supported for the NDS32 target.
2547
2548@item --with-build-time-tools=@var{dir}
2549Specifies where to find the set of target tools (assembler, linker, etc.)
2550that will be used while building GCC itself.  This option can be useful
2551if the directory layouts are different between the system you are building
2552GCC on, and the system where you will deploy it.
2553
2554For example, on an @samp{ia64-hp-hpux} system, you may have the GNU
2555assembler and linker in @file{/usr/bin}, and the native tools in a
2556different path, and build a toolchain that expects to find the
2557native tools in @file{/usr/bin}.
2558
2559When you use this option, you should ensure that @var{dir} includes
2560@command{ar}, @command{as}, @command{ld}, @command{nm},
2561@command{ranlib} and @command{strip} if necessary, and possibly
2562@command{objdump}.  Otherwise, GCC may use an inconsistent set of
2563tools.
2564@end table
2565
2566@subsubheading Overriding @command{configure} test results
2567
2568Sometimes, it might be necessary to override the result of some
2569@command{configure} test, for example in order to ease porting to a new
2570system or work around a bug in a test.  The toplevel @command{configure}
2571script provides three variables for this:
2572
2573@table @code
2574
2575@item build_configargs
2576@cindex @code{build_configargs}
2577The contents of this variable is passed to all build @command{configure}
2578scripts.
2579
2580@item host_configargs
2581@cindex @code{host_configargs}
2582The contents of this variable is passed to all host @command{configure}
2583scripts.
2584
2585@item target_configargs
2586@cindex @code{target_configargs}
2587The contents of this variable is passed to all target @command{configure}
2588scripts.
2589
2590@end table
2591
2592In order to avoid shell and @command{make} quoting issues for complex
2593overrides, you can pass a setting for @env{CONFIG_SITE} and set
2594variables in the site file.
2595
2596@subheading Objective-C-Specific Options
2597
2598The following options apply to the build of the Objective-C runtime library.
2599
2600@table @code
2601@item --enable-objc-gc
2602Specify that an additional variant of the GNU Objective-C runtime library
2603is built, using an external build of the Boehm-Demers-Weiser garbage
2604collector (@uref{https://www.hboehm.info/gc/}).  This library needs to be
2605available for each multilib variant, unless configured with
2606@option{--enable-objc-gc=@samp{auto}} in which case the build of the
2607additional runtime library is skipped when not available and the build
2608continues.
2609
2610@item --with-target-bdw-gc=@var{list}
2611@itemx --with-target-bdw-gc-include=@var{list}
2612@itemx --with-target-bdw-gc-lib=@var{list}
2613Specify search directories for the garbage collector header files and
2614libraries. @var{list} is a comma separated list of key value pairs of the
2615form @samp{@var{multilibdir}=@var{path}}, where the default multilib key
2616is named as @samp{.} (dot), or is omitted (e.g.@:
2617@samp{--with-target-bdw-gc=/opt/bdw-gc,32=/opt-bdw-gc32}).
2618
2619The options @option{--with-target-bdw-gc-include} and
2620@option{--with-target-bdw-gc-lib} must always be specified together
2621for each multilib variant and they take precedence over
2622@option{--with-target-bdw-gc}.  If @option{--with-target-bdw-gc-include}
2623is missing values for a multilib, then the value for the default
2624multilib is used (e.g.@: @samp{--with-target-bdw-gc-include=/opt/bdw-gc/include}
2625@samp{--with-target-bdw-gc-lib=/opt/bdw-gc/lib64,32=/opt-bdw-gc/lib32}).
2626If none of these options are specified, the library is assumed in
2627default locations.
2628@end table
2629
2630@subheading D-Specific Options
2631
2632The following options apply to the build of the D runtime library.
2633
2634@table @code
2635@item --enable-libphobos-checking
2636@itemx --disable-libphobos-checking
2637@itemx --enable-libphobos-checking=@var{list}
2638This option controls whether run-time checks and contracts are compiled into
2639the D runtime library.  When the option is not specified, the library is built
2640with @samp{release} checking.  When the option is specified without a
2641@var{list}, the result is the same as @samp{--enable-libphobos-checking=yes}.
2642Likewise, @samp{--disable-libphobos-checking} is equivalent to
2643@samp{--enable-libphobos-checking=no}.
2644
2645The categories of checks available in @var{list} are @samp{yes} (compiles
2646libphobos with @option{-fno-release}), @samp{no} (compiles libphobos with
2647@option{-frelease}), @samp{all} (same as @samp{yes}), @samp{none} or
2648@samp{release} (same as @samp{no}).
2649
2650Individual checks available in @var{list} are @samp{assert} (compiles libphobos
2651with an extra option @option{-fassert}).
2652
2653@item --with-libphobos-druntime-only
2654@itemx --with-libphobos-druntime-only=@var{choice}
2655Specify whether to build only the core D runtime library (druntime), or both
2656the core and standard library (phobos) into libphobos.  This is useful for
2657targets that have full support in druntime, but no or incomplete support
2658in phobos.  @var{choice} can be one of @samp{auto}, @samp{yes}, and @samp{no}
2659where @samp{auto} is the default.
2660
2661When the option is not specified, the default choice @samp{auto} means that it
2662is inferred whether the target has support for the phobos standard library.
2663When the option is specified without a @var{choice},  the result is the same as
2664@samp{--with-libphobos-druntime-only=yes}.
2665
2666@item --with-target-system-zlib
2667Use installed @samp{zlib} rather than that included with GCC@.  This needs
2668to be available for each multilib variant, unless configured with
2669@option{--with-target-system-zlib=@samp{auto}} in which case the GCC@ included
2670@samp{zlib} is only used when the system installed library is not available.
2671@end table
2672
2673@html
2674<hr />
2675<p>
2676@end html
2677@ifhtml
2678@uref{./index.html,,Return to the GCC Installation page}
2679@end ifhtml
2680@end ifset
2681
2682@c ***Building****************************************************************
2683@ifnothtml
2684@comment node-name,     next,          previous, up
2685@node    Building, Testing, Configuration, Installing GCC
2686@end ifnothtml
2687@ifset buildhtml
2688@ifnothtml
2689@chapter Building
2690@end ifnothtml
2691@cindex Installing GCC: Building
2692
2693Now that GCC is configured, you are ready to build the compiler and
2694runtime libraries.
2695
2696Some commands executed when making the compiler may fail (return a
2697nonzero status) and be ignored by @command{make}.  These failures, which
2698are often due to files that were not found, are expected, and can safely
2699be ignored.
2700
2701It is normal to have compiler warnings when compiling certain files.
2702Unless you are a GCC developer, you can generally ignore these warnings
2703unless they cause compilation to fail.  Developers should attempt to fix
2704any warnings encountered, however they can temporarily continue past
2705warnings-as-errors by specifying the configure flag
2706@option{--disable-werror}.
2707
2708On certain old systems, defining certain environment variables such as
2709@env{CC} can interfere with the functioning of @command{make}.
2710
2711If you encounter seemingly strange errors when trying to build the
2712compiler in a directory other than the source directory, it could be
2713because you have previously configured the compiler in the source
2714directory.  Make sure you have done all the necessary preparations.
2715
2716If you build GCC on a BSD system using a directory stored in an old System
2717V file system, problems may occur in running @command{fixincludes} if the
2718System V file system doesn't support symbolic links.  These problems
2719result in a failure to fix the declaration of @code{size_t} in
2720@file{sys/types.h}.  If you find that @code{size_t} is a signed type and
2721that type mismatches occur, this could be the cause.
2722
2723The solution is not to use such a directory for building GCC@.
2724
2725Similarly, when building from the source repository or snapshots, or if you modify
2726@file{*.l} files, you need the Flex lexical analyzer generator
2727installed.  If you do not modify @file{*.l} files, releases contain
2728the Flex-generated files and you do not need Flex installed to build
2729them.  There is still one Flex-based lexical analyzer (part of the
2730build machinery, not of GCC itself) that is used even if you only
2731build the C front end.
2732
2733When building from the source repository or snapshots, or if you modify Texinfo
2734documentation, you need version 4.7 or later of Texinfo installed if you
2735want Info documentation to be regenerated.  Releases contain Info
2736documentation pre-built for the unmodified documentation in the release.
2737
2738@section Building a native compiler
2739
2740For a native build, the default configuration is to perform
2741a 3-stage bootstrap of the compiler when @samp{make} is invoked.
2742This will build the entire GCC system and ensure that it compiles
2743itself correctly.  It can be disabled with the @option{--disable-bootstrap}
2744parameter to @samp{configure}, but bootstrapping is suggested because
2745the compiler will be tested more completely and could also have
2746better performance.
2747
2748The bootstrapping process will complete the following steps:
2749
2750@itemize @bullet
2751@item
2752Build tools necessary to build the compiler.
2753
2754@item
2755Perform a 3-stage bootstrap of the compiler.  This includes building
2756three times the target tools for use by the compiler such as binutils
2757(bfd, binutils, gas, gprof, ld, and opcodes) if they have been
2758individually linked or moved into the top level GCC source tree before
2759configuring.
2760
2761@item
2762Perform a comparison test of the stage2 and stage3 compilers.
2763
2764@item
2765Build runtime libraries using the stage3 compiler from the previous step.
2766
2767@end itemize
2768
2769If you are short on disk space you might consider @samp{make
2770bootstrap-lean} instead.  The sequence of compilation is the
2771same described above, but object files from the stage1 and
2772stage2 of the 3-stage bootstrap of the compiler are deleted as
2773soon as they are no longer needed.
2774
2775If you wish to use non-default GCC flags when compiling the stage2
2776and stage3 compilers, set @code{BOOT_CFLAGS} on the command line when
2777doing @samp{make}.  For example, if you want to save additional space
2778during the bootstrap and in the final installation as well, you can
2779build the compiler binaries without debugging information as in the
2780following example.  This will save roughly 40% of disk space both for
2781the bootstrap and the final installation.  (Libraries will still contain
2782debugging information.)
2783
2784@smallexample
2785make BOOT_CFLAGS='-O' bootstrap
2786@end smallexample
2787
2788You can place non-default optimization flags into @code{BOOT_CFLAGS}; they
2789are less well tested here than the default of @samp{-g -O2}, but should
2790still work.  In a few cases, you may find that you need to specify special
2791flags such as @option{-msoft-float} here to complete the bootstrap; or,
2792if the native compiler miscompiles the stage1 compiler, you may need
2793to work around this, by choosing @code{BOOT_CFLAGS} to avoid the parts
2794of the stage1 compiler that were miscompiled, or by using @samp{make
2795bootstrap4} to increase the number of stages of bootstrap.
2796
2797@code{BOOT_CFLAGS} does not apply to bootstrapped target libraries.
2798Since these are always compiled with the compiler currently being
2799bootstrapped, you can use @code{CFLAGS_FOR_TARGET} to modify their
2800compilation flags, as for non-bootstrapped target libraries.
2801Again, if the native compiler miscompiles the stage1 compiler, you may
2802need to work around this by avoiding non-working parts of the stage1
2803compiler.  Use @code{STAGE1_TFLAGS} to this end.
2804
2805If you used the flag @option{--enable-languages=@dots{}} to restrict
2806the compilers to be built, only those you've actually enabled will be
2807built.  This will of course only build those runtime libraries, for
2808which the particular compiler has been built.  Please note,
2809that re-defining @env{LANGUAGES} when calling @samp{make}
2810@strong{does not} work anymore!
2811
2812If the comparison of stage2 and stage3 fails, this normally indicates
2813that the stage2 compiler has compiled GCC incorrectly, and is therefore
2814a potentially serious bug which you should investigate and report.  (On
2815a few systems, meaningful comparison of object files is impossible; they
2816always appear ``different''.  If you encounter this problem, you will
2817need to disable comparison in the @file{Makefile}.)
2818
2819If you do not want to bootstrap your compiler, you can configure with
2820@option{--disable-bootstrap}.  In particular cases, you may want to
2821bootstrap your compiler even if the target system is not the same as
2822the one you are building on: for example, you could build a
2823@code{powerpc-unknown-linux-gnu} toolchain on a
2824@code{powerpc64-unknown-linux-gnu} host.  In this case, pass
2825@option{--enable-bootstrap} to the configure script.
2826
2827@code{BUILD_CONFIG} can be used to bring in additional customization
2828to the build.  It can be set to a whitespace-separated list of names.
2829For each such @code{NAME}, top-level @file{config/@code{NAME}.mk} will
2830be included by the top-level @file{Makefile}, bringing in any settings
2831it contains.  The default @code{BUILD_CONFIG} can be set using the
2832configure option @option{--with-build-config=@code{NAME}...}.  Some
2833examples of supported build configurations are:
2834
2835@table @asis
2836@item @samp{bootstrap-O1}
2837Removes any @option{-O}-started option from @code{BOOT_CFLAGS}, and adds
2838@option{-O1} to it.  @samp{BUILD_CONFIG=bootstrap-O1} is equivalent to
2839@samp{BOOT_CFLAGS='-g -O1'}.
2840
2841@item @samp{bootstrap-O3}
2842@itemx @samp{bootstrap-Og}
2843Analogous to @code{bootstrap-O1}.
2844
2845@item @samp{bootstrap-lto}
2846Enables Link-Time Optimization for host tools during bootstrapping.
2847@samp{BUILD_CONFIG=bootstrap-lto} is equivalent to adding
2848@option{-flto} to @samp{BOOT_CFLAGS}.  This option assumes that the host
2849supports the linker plugin (e.g.@: GNU ld version 2.21 or later or GNU gold
2850version 2.21 or later).
2851
2852@item @samp{bootstrap-lto-noplugin}
2853This option is similar to @code{bootstrap-lto}, but is intended for
2854hosts that do not support the linker plugin.  Without the linker plugin
2855static libraries are not compiled with link-time optimizations.  Since
2856the GCC middle end and back end are in @file{libbackend.a} this means
2857that only the front end is actually LTO optimized.
2858
2859@item @samp{bootstrap-lto-lean}
2860This option is similar to @code{bootstrap-lto}, but is intended for
2861faster build by only using LTO in the final bootstrap stage.
2862With @samp{make profiledbootstrap} the LTO frontend
2863is trained only on generator files.
2864
2865@item @samp{bootstrap-debug}
2866Verifies that the compiler generates the same executable code, whether
2867or not it is asked to emit debug information.  To this end, this
2868option builds stage2 host programs without debug information, and uses
2869@file{contrib/compare-debug} to compare them with the stripped stage3
2870object files.  If @code{BOOT_CFLAGS} is overridden so as to not enable
2871debug information, stage2 will have it, and stage3 won't.  This option
2872is enabled by default when GCC bootstrapping is enabled, if
2873@code{strip} can turn object files compiled with and without debug
2874info into identical object files.  In addition to better test
2875coverage, this option makes default bootstraps faster and leaner.
2876
2877@item @samp{bootstrap-debug-big}
2878Rather than comparing stripped object files, as in
2879@code{bootstrap-debug}, this option saves internal compiler dumps
2880during stage2 and stage3 and compares them as well, which helps catch
2881additional potential problems, but at a great cost in terms of disk
2882space.  It can be specified in addition to @samp{bootstrap-debug}.
2883
2884@item @samp{bootstrap-debug-lean}
2885This option saves disk space compared with @code{bootstrap-debug-big},
2886but at the expense of some recompilation.  Instead of saving the dumps
2887of stage2 and stage3 until the final compare, it uses
2888@option{-fcompare-debug} to generate, compare and remove the dumps
2889during stage3, repeating the compilation that already took place in
2890stage2, whose dumps were not saved.
2891
2892@item @samp{bootstrap-debug-lib}
2893This option tests executable code invariance over debug information
2894generation on target libraries, just like @code{bootstrap-debug-lean}
2895tests it on host programs.  It builds stage3 libraries with
2896@option{-fcompare-debug}, and it can be used along with any of the
2897@code{bootstrap-debug} options above.
2898
2899There aren't @code{-lean} or @code{-big} counterparts to this option
2900because most libraries are only build in stage3, so bootstrap compares
2901would not get significant coverage.  Moreover, the few libraries built
2902in stage2 are used in stage3 host programs, so we wouldn't want to
2903compile stage2 libraries with different options for comparison purposes.
2904
2905@item @samp{bootstrap-debug-ckovw}
2906Arranges for error messages to be issued if the compiler built on any
2907stage is run without the option @option{-fcompare-debug}.  This is
2908useful to verify the full @option{-fcompare-debug} testing coverage.  It
2909must be used along with @code{bootstrap-debug-lean} and
2910@code{bootstrap-debug-lib}.
2911
2912@item @samp{bootstrap-cet}
2913This option enables Intel CET for host tools during bootstrapping.
2914@samp{BUILD_CONFIG=bootstrap-cet} is equivalent to adding
2915@option{-fcf-protection} to @samp{BOOT_CFLAGS}.  This option
2916assumes that the host supports Intel CET (e.g.@: GNU assembler version
29172.30 or later).
2918
2919@item @samp{bootstrap-time}
2920Arranges for the run time of each program started by the GCC driver,
2921built in any stage, to be logged to @file{time.log}, in the top level of
2922the build tree.
2923
2924@item @samp{bootstrap-asan}
2925Compiles GCC itself using Address Sanitization in order to catch invalid memory
2926accesses within the GCC code.
2927
2928@item @samp{bootstrap-hwasan}
2929Compiles GCC itself using HWAddress Sanitization in order to catch invalid
2930memory accesses within the GCC code.  This option is only available on AArch64
2931systems that are running Linux kernel version 5.4 or later.
2932
2933@end table
2934
2935@section Building a cross compiler
2936
2937When building a cross compiler, it is not generally possible to do a
29383-stage bootstrap of the compiler.  This makes for an interesting problem
2939as parts of GCC can only be built with GCC@.
2940
2941To build a cross compiler, we recommend first building and installing a
2942native compiler.  You can then use the native GCC compiler to build the
2943cross compiler.  The installed native compiler needs to be GCC version
29442.95 or later.
2945
2946Assuming you have already installed a native copy of GCC and configured
2947your cross compiler, issue the command @command{make}, which performs the
2948following steps:
2949
2950@itemize @bullet
2951@item
2952Build host tools necessary to build the compiler.
2953
2954@item
2955Build target tools for use by the compiler such as binutils (bfd,
2956binutils, gas, gprof, ld, and opcodes)
2957if they have been individually linked or moved into the top level GCC source
2958tree before configuring.
2959
2960@item
2961Build the compiler (single stage only).
2962
2963@item
2964Build runtime libraries using the compiler from the previous step.
2965@end itemize
2966
2967Note that if an error occurs in any step the make process will exit.
2968
2969If you are not building GNU binutils in the same source tree as GCC,
2970you will need a cross-assembler and cross-linker installed before
2971configuring GCC@.  Put them in the directory
2972@file{@var{prefix}/@var{target}/bin}.  Here is a table of the tools
2973you should put in this directory:
2974
2975@table @file
2976@item as
2977This should be the cross-assembler.
2978
2979@item ld
2980This should be the cross-linker.
2981
2982@item ar
2983This should be the cross-archiver: a program which can manipulate
2984archive files (linker libraries) in the target machine's format.
2985
2986@item ranlib
2987This should be a program to construct a symbol table in an archive file.
2988@end table
2989
2990The installation of GCC will find these programs in that directory,
2991and copy or link them to the proper place to for the cross-compiler to
2992find them when run later.
2993
2994The easiest way to provide these files is to build the Binutils package.
2995Configure it with the same @option{--host} and @option{--target}
2996options that you use for configuring GCC, then build and install
2997them.  They install their executables automatically into the proper
2998directory.  Alas, they do not support all the targets that GCC
2999supports.
3000
3001If you are not building a C library in the same source tree as GCC,
3002you should also provide the target libraries and headers before
3003configuring GCC, specifying the directories with
3004@option{--with-sysroot} or @option{--with-headers} and
3005@option{--with-libs}.  Many targets also require ``start files'' such
3006as @file{crt0.o} and
3007@file{crtn.o} which are linked into each executable.  There may be several
3008alternatives for @file{crt0.o}, for use with profiling or other
3009compilation options.  Check your target's definition of
3010@code{STARTFILE_SPEC} to find out what start files it uses.
3011
3012@section Building in parallel
3013
3014GNU Make 3.80 and above, which is necessary to build GCC, support
3015building in parallel.  To activate this, you can use @samp{make -j 2}
3016instead of @samp{make}.  You can also specify a bigger number, and
3017in most cases using a value greater than the number of processors in
3018your machine will result in fewer and shorter I/O latency hits, thus
3019improving overall throughput; this is especially true for slow drives
3020and network filesystems.
3021
3022@section Building the Ada compiler
3023
3024@ifnothtml
3025@ref{GNAT-prerequisite}.
3026@end ifnothtml
3027@ifhtml
3028@uref{prerequisites.html#GNAT-prerequisite,,GNAT prerequisites}.
3029@end ifhtml
3030
3031@section Building the D compiler
3032
3033@ifnothtml
3034@ref{GDC-prerequisite}.
3035@end ifnothtml
3036@ifhtml
3037@uref{prerequisites.html#GDC-prerequisite,,GDC prerequisites}.
3038@end ifhtml
3039
3040@section Building with profile feedback
3041
3042It is possible to use profile feedback to optimize the compiler itself.  This
3043should result in a faster compiler binary.  Experiments done on x86 using gcc
30443.3 showed approximately 7 percent speedup on compiling C programs.  To
3045bootstrap the compiler with profile feedback, use @code{make profiledbootstrap}.
3046
3047When @samp{make profiledbootstrap} is run, it will first build a @code{stage1}
3048compiler.  This compiler is used to build a @code{stageprofile} compiler
3049instrumented to collect execution counts of instruction and branch
3050probabilities.  Training run is done by building @code{stagetrain}
3051compiler.  Finally a @code{stagefeedback} compiler is built
3052using the information collected.
3053
3054Unlike standard bootstrap, several additional restrictions apply.  The
3055compiler used to build @code{stage1} needs to support a 64-bit integral type.
3056It is recommended to only use GCC for this.
3057
3058On Linux/x86_64 hosts with some restrictions (no virtualization) it is
3059also possible to do autofdo build with @samp{make
3060autoprofiledback}. This uses Linux perf to sample branches in the
3061binary and then rebuild it with feedback derived from the profile.
3062Linux perf and the @code{autofdo} toolkit needs to be installed for
3063this.
3064
3065Only the profile from the current build is used, so when an error
3066occurs it is recommended to clean before restarting. Otherwise
3067the code quality may be much worse.
3068
3069@html
3070<hr />
3071<p>
3072@end html
3073@ifhtml
3074@uref{./index.html,,Return to the GCC Installation page}
3075@end ifhtml
3076@end ifset
3077
3078@c ***Testing*****************************************************************
3079@ifnothtml
3080@comment node-name,     next,          previous, up
3081@node    Testing, Final install, Building, Installing GCC
3082@end ifnothtml
3083@ifset testhtml
3084@ifnothtml
3085@chapter Installing GCC: Testing
3086@end ifnothtml
3087@cindex Testing
3088@cindex Installing GCC: Testing
3089@cindex Testsuite
3090
3091Before you install GCC, we encourage you to run the testsuites and to
3092compare your results with results from a similar configuration that have
3093been submitted to the
3094@uref{https://gcc.gnu.org/ml/gcc-testresults/,,gcc-testresults mailing list}.
3095Some of these archived results are linked from the build status lists
3096at @uref{https://gcc.gnu.org/buildstat.html}, although not everyone who
3097reports a successful build runs the testsuites and submits the results.
3098This step is optional and may require you to download additional software,
3099but it can give you confidence in your new GCC installation or point out
3100problems before you install and start using your new GCC@.
3101
3102First, you must have @uref{download.html,,downloaded the testsuites}.
3103These are part of the full distribution, but if you downloaded the
3104``core'' compiler plus any front ends, you must download the testsuites
3105separately.
3106
3107Second, you must have the testing tools installed.  This includes
3108@uref{https://www.gnu.org/software/dejagnu/,,DejaGnu}, Tcl, and Expect;
3109the DejaGnu site has links to these.
3110Some optional tests also require Python3 and pytest module.
3111
3112If the directories where @command{runtest} and @command{expect} were
3113installed are not in the @env{PATH}, you may need to set the following
3114environment variables appropriately, as in the following example (which
3115assumes that DejaGnu has been installed under @file{/usr/local}):
3116
3117@smallexample
3118TCL_LIBRARY = /usr/local/share/tcl8.0
3119DEJAGNULIBS = /usr/local/share/dejagnu
3120@end smallexample
3121
3122(On systems such as Cygwin, these paths are required to be actual
3123paths, not mounts or links; presumably this is due to some lack of
3124portability in the DejaGnu code.)
3125
3126
3127Finally, you can run the testsuite (which may take a long time):
3128@smallexample
3129cd @var{objdir}; make -k check
3130@end smallexample
3131
3132This will test various components of GCC, such as compiler
3133front ends and runtime libraries.  While running the testsuite, DejaGnu
3134might emit some harmless messages resembling
3135@samp{WARNING: Couldn't find the global config file.} or
3136@samp{WARNING: Couldn't find tool init file} that can be ignored.
3137
3138If you are testing a cross-compiler, you may want to run the testsuite
3139on a simulator as described at @uref{https://gcc.gnu.org/simtest-howto.html}.
3140
3141@section How can you run the testsuite on selected tests?
3142
3143In order to run sets of tests selectively, there are targets
3144@samp{make check-gcc} and language specific @samp{make check-c},
3145@samp{make check-c++}, @samp{make check-d} @samp{make check-fortran},
3146@samp{make check-ada}, @samp{make check-objc}, @samp{make check-obj-c++},
3147@samp{make check-lto}
3148in the @file{gcc} subdirectory of the object directory.  You can also
3149just run @samp{make check} in a subdirectory of the object directory.
3150
3151
3152A more selective way to just run all @command{gcc} execute tests in the
3153testsuite is to use
3154
3155@smallexample
3156make check-gcc RUNTESTFLAGS="execute.exp @var{other-options}"
3157@end smallexample
3158
3159Likewise, in order to run only the @command{g++} ``old-deja'' tests in
3160the testsuite with filenames matching @samp{9805*}, you would use
3161
3162@smallexample
3163make check-g++ RUNTESTFLAGS="old-deja.exp=9805* @var{other-options}"
3164@end smallexample
3165
3166The file-matching expression following @var{filename}@command{.exp=} is treated
3167as a series of whitespace-delimited glob expressions so that multiple patterns
3168may be passed, although any whitespace must either be escaped or surrounded by
3169single quotes if multiple expressions are desired. For example,
3170
3171@smallexample
3172make check-g++ RUNTESTFLAGS="old-deja.exp=9805*\ virtual2.c @var{other-options}"
3173make check-g++ RUNTESTFLAGS="'old-deja.exp=9805* virtual2.c' @var{other-options}"
3174@end smallexample
3175
3176The @file{*.exp} files are located in the testsuite directories of the GCC
3177source, the most important ones being @file{compile.exp},
3178@file{execute.exp}, @file{dg.exp} and @file{old-deja.exp}.
3179To get a list of the possible @file{*.exp} files, pipe the
3180output of @samp{make check} into a file and look at the
3181@samp{Running @dots{}  .exp} lines.
3182
3183@section Passing options and running multiple testsuites
3184
3185You can pass multiple options to the testsuite using the
3186@samp{--target_board} option of DejaGNU, either passed as part of
3187@samp{RUNTESTFLAGS}, or directly to @command{runtest} if you prefer to
3188work outside the makefiles.  For example,
3189
3190@smallexample
3191make check-g++ RUNTESTFLAGS="--target_board=unix/-O3/-fmerge-constants"
3192@end smallexample
3193
3194will run the standard @command{g++} testsuites (``unix'' is the target name
3195for a standard native testsuite situation), passing
3196@samp{-O3 -fmerge-constants} to the compiler on every test, i.e.,
3197slashes separate options.
3198
3199You can run the testsuites multiple times using combinations of options
3200with a syntax similar to the brace expansion of popular shells:
3201
3202@smallexample
3203@dots{}"--target_board=arm-sim\@{-mhard-float,-msoft-float\@}\@{-O1,-O2,-O3,\@}"
3204@end smallexample
3205
3206(Note the empty option caused by the trailing comma in the final group.)
3207The following will run each testsuite eight times using the @samp{arm-sim}
3208target, as if you had specified all possible combinations yourself:
3209
3210@smallexample
3211--target_board='arm-sim/-mhard-float/-O1 \
3212                arm-sim/-mhard-float/-O2 \
3213                arm-sim/-mhard-float/-O3 \
3214                arm-sim/-mhard-float \
3215                arm-sim/-msoft-float/-O1 \
3216                arm-sim/-msoft-float/-O2 \
3217                arm-sim/-msoft-float/-O3 \
3218                arm-sim/-msoft-float'
3219@end smallexample
3220
3221They can be combined as many times as you wish, in arbitrary ways.  This
3222list:
3223
3224@smallexample
3225@dots{}"--target_board=unix/-Wextra\@{-O3,-fno-strength\@}\@{-fomit-frame,\@}"
3226@end smallexample
3227
3228will generate four combinations, all involving @samp{-Wextra}.
3229
3230The disadvantage to this method is that the testsuites are run in serial,
3231which is a waste on multiprocessor systems.  For users with GNU Make and
3232a shell which performs brace expansion, you can run the testsuites in
3233parallel by having the shell perform the combinations and @command{make}
3234do the parallel runs.  Instead of using @samp{--target_board}, use a
3235special makefile target:
3236
3237@smallexample
3238make -j@var{N} check-@var{testsuite}//@var{test-target}/@var{option1}/@var{option2}/@dots{}
3239@end smallexample
3240
3241For example,
3242
3243@smallexample
3244make -j3 check-gcc//sh-hms-sim/@{-m1,-m2,-m3,-m3e,-m4@}/@{,-nofpu@}
3245@end smallexample
3246
3247will run three concurrent ``make-gcc'' testsuites, eventually testing all
3248ten combinations as described above.  Note that this is currently only
3249supported in the @file{gcc} subdirectory.  (To see how this works, try
3250typing @command{echo} before the example given here.)
3251
3252
3253@section How to interpret test results
3254
3255The result of running the testsuite are various @file{*.sum} and @file{*.log}
3256files in the testsuite subdirectories.  The @file{*.log} files contain a
3257detailed log of the compiler invocations and the corresponding
3258results, the @file{*.sum} files summarize the results.  These summaries
3259contain status codes for all tests:
3260
3261@itemize @bullet
3262@item
3263PASS: the test passed as expected
3264@item
3265XPASS: the test unexpectedly passed
3266@item
3267FAIL: the test unexpectedly failed
3268@item
3269XFAIL: the test failed as expected
3270@item
3271UNSUPPORTED: the test is not supported on this platform
3272@item
3273ERROR: the testsuite detected an error
3274@item
3275WARNING: the testsuite detected a possible problem
3276@end itemize
3277
3278It is normal for some tests to report unexpected failures.  At the
3279current time the testing harness does not allow fine grained control
3280over whether or not a test is expected to fail.  This problem should
3281be fixed in future releases.
3282
3283
3284@section Submitting test results
3285
3286If you want to report the results to the GCC project, use the
3287@file{contrib/test_summary} shell script.  Start it in the @var{objdir} with
3288
3289@smallexample
3290@var{srcdir}/contrib/test_summary -p your_commentary.txt \
3291    -m gcc-testresults@@gcc.gnu.org |sh
3292@end smallexample
3293
3294This script uses the @command{Mail} program to send the results, so
3295make sure it is in your @env{PATH}.  The file @file{your_commentary.txt} is
3296prepended to the testsuite summary and should contain any special
3297remarks you have on your results or your build environment.  Please
3298do not edit the testsuite result block or the subject line, as these
3299messages may be automatically processed.
3300
3301@html
3302<hr />
3303<p>
3304@end html
3305@ifhtml
3306@uref{./index.html,,Return to the GCC Installation page}
3307@end ifhtml
3308@end ifset
3309
3310@c ***Final install***********************************************************
3311@ifnothtml
3312@comment node-name,     next,          previous, up
3313@node    Final install, , Testing, Installing GCC
3314@end ifnothtml
3315@ifset finalinstallhtml
3316@ifnothtml
3317@chapter Installing GCC: Final installation
3318@end ifnothtml
3319
3320Now that GCC has been built (and optionally tested), you can install it with
3321@smallexample
3322cd @var{objdir} && make install
3323@end smallexample
3324
3325We strongly recommend to install into a target directory where there is
3326no previous version of GCC present.  Also, the GNAT runtime should not
3327be stripped, as this would break certain features of the debugger that
3328depend on this debugging information (catching Ada exceptions for
3329instance).
3330
3331That step completes the installation of GCC; user level binaries can
3332be found in @file{@var{prefix}/bin} where @var{prefix} is the value
3333you specified with the @option{--prefix} to configure (or
3334@file{/usr/local} by default).  (If you specified @option{--bindir},
3335that directory will be used instead; otherwise, if you specified
3336@option{--exec-prefix}, @file{@var{exec-prefix}/bin} will be used.)
3337Headers for the C++ library are installed in
3338@file{@var{prefix}/include}; libraries in @file{@var{libdir}}
3339(normally @file{@var{prefix}/lib}); internal parts of the compiler in
3340@file{@var{libdir}/gcc} and @file{@var{libexecdir}/gcc}; documentation
3341in info format in @file{@var{infodir}} (normally
3342@file{@var{prefix}/info}).
3343
3344When installing cross-compilers, GCC's executables
3345are not only installed into @file{@var{bindir}}, that
3346is, @file{@var{exec-prefix}/bin}, but additionally into
3347@file{@var{exec-prefix}/@var{target-alias}/bin}, if that directory
3348exists.  Typically, such @dfn{tooldirs} hold target-specific
3349binutils, including assembler and linker.
3350
3351Installation into a temporary staging area or into a @command{chroot}
3352jail can be achieved with the command
3353
3354@smallexample
3355make DESTDIR=@var{path-to-rootdir} install
3356@end smallexample
3357
3358@noindent
3359where @var{path-to-rootdir} is the absolute path of
3360a directory relative to which all installation paths will be
3361interpreted.  Note that the directory specified by @code{DESTDIR}
3362need not exist yet; it will be created if necessary.
3363
3364There is a subtle point with tooldirs and @code{DESTDIR}:
3365If you relocate a cross-compiler installation with
3366e.g.@: @samp{DESTDIR=@var{rootdir}}, then the directory
3367@file{@var{rootdir}/@var{exec-prefix}/@var{target-alias}/bin} will
3368be filled with duplicated GCC executables only if it already exists,
3369it will not be created otherwise.  This is regarded as a feature,
3370not as a bug, because it gives slightly more control to the packagers
3371using the @code{DESTDIR} feature.
3372
3373You can install stripped programs and libraries with
3374
3375@smallexample
3376make install-strip
3377@end smallexample
3378
3379If you are bootstrapping a released version of GCC then please
3380quickly review the build status page for your release, available from
3381@uref{https://gcc.gnu.org/buildstat.html}.
3382If your system is not listed for the version of GCC that you built,
3383send a note to
3384@email{gcc@@gcc.gnu.org} indicating
3385that you successfully built and installed GCC@.
3386Include the following information:
3387
3388@itemize @bullet
3389@item
3390Output from running @file{@var{srcdir}/config.guess}.  Do not send
3391that file itself, just the one-line output from running it.
3392
3393@item
3394The output of @samp{gcc -v} for your newly installed @command{gcc}.
3395This tells us which version of GCC you built and the options you passed to
3396configure.
3397
3398@item
3399Whether you enabled all languages or a subset of them.  If you used a
3400full distribution then this information is part of the configure
3401options in the output of @samp{gcc -v}, but if you downloaded the
3402``core'' compiler plus additional front ends then it isn't apparent
3403which ones you built unless you tell us about it.
3404
3405@item
3406If the build was for GNU/Linux, also include:
3407@itemize @bullet
3408@item
3409The distribution name and version (e.g., Red Hat 7.1 or Debian 2.2.3);
3410this information should be available from @file{/etc/issue}.
3411
3412@item
3413The version of the Linux kernel, available from @samp{uname --version}
3414or @samp{uname -a}.
3415
3416@item
3417The version of glibc you used; for RPM-based systems like Red Hat,
3418Mandrake, and SuSE type @samp{rpm -q glibc} to get the glibc version,
3419and on systems like Debian and Progeny use @samp{dpkg -l libc6}.
3420@end itemize
3421For other systems, you can include similar information if you think it is
3422relevant.
3423
3424@item
3425Any other information that you think would be useful to people building
3426GCC on the same configuration.  The new entry in the build status list
3427will include a link to the archived copy of your message.
3428@end itemize
3429
3430We'd also like to know if the
3431@ifnothtml
3432@ref{Specific, host/target specific installation notes}
3433@end ifnothtml
3434@ifhtml
3435@uref{specific.html,,host/target specific installation notes}
3436@end ifhtml
3437didn't include your host/target information or if that information is
3438incomplete or out of date.  Send a note to
3439@email{gcc@@gcc.gnu.org} detailing how the information should be changed.
3440
3441If you find a bug, please report it following the
3442@uref{../bugs/,,bug reporting guidelines}.
3443
3444If you want to print the GCC manuals, do @samp{cd @var{objdir}; make
3445dvi}.  You will need to have @command{texi2dvi} (version at least 4.7)
3446and @TeX{} installed.  This creates a number of @file{.dvi} files in
3447subdirectories of @file{@var{objdir}}; these may be converted for
3448printing with programs such as @command{dvips}.  Alternately, by using
3449@samp{make pdf} in place of @samp{make dvi}, you can create documentation
3450in the form of @file{.pdf} files; this requires @command{texi2pdf}, which
3451is included with Texinfo version 4.8 and later.  You can also
3452@uref{https://shop.fsf.org/,,buy printed manuals from the
3453Free Software Foundation}, though such manuals may not be for the most
3454recent version of GCC@.
3455
3456If you would like to generate online HTML documentation, do @samp{cd
3457@var{objdir}; make html} and HTML will be generated for the gcc manuals in
3458@file{@var{objdir}/gcc/HTML}.
3459
3460@html
3461<hr />
3462<p>
3463@end html
3464@ifhtml
3465@uref{./index.html,,Return to the GCC Installation page}
3466@end ifhtml
3467@end ifset
3468
3469@c ***Binaries****************************************************************
3470@ifnothtml
3471@comment node-name,     next,          previous, up
3472@node    Binaries, Specific, Installing GCC, Top
3473@end ifnothtml
3474@ifset binarieshtml
3475@ifnothtml
3476@chapter Installing GCC: Binaries
3477@end ifnothtml
3478@cindex Binaries
3479@cindex Installing GCC: Binaries
3480
3481We are often asked about pre-compiled versions of GCC@.  While we cannot
3482provide these for all platforms, below you'll find links to binaries for
3483various platforms where creating them by yourself is not easy due to various
3484reasons.
3485
3486Please note that we did not create these binaries, nor do we
3487support them.  If you have any problems installing them, please
3488contact their makers.
3489
3490@itemize
3491@item
3492AIX:
3493@itemize
3494@item
3495@uref{http://www.bullfreeware.com,,Bull's Open Source Software Archive for
3496for AIX 6 and AIX 7};
3497
3498@item
3499@uref{http://www.perzl.org/aix/,,AIX Open Source Packages (AIX5L AIX 6.1
3500AIX 7.1)}.
3501@end itemize
3502
3503@item
3504DOS---@uref{http://www.delorie.com/djgpp/,,DJGPP}.
3505
3506@item
3507HP-UX:
3508@itemize
3509@item
3510@uref{http://hpux.connect.org.uk/,,HP-UX Porting Center};
3511@end itemize
3512
3513@item
3514Solaris 2 (SPARC, Intel):
3515@itemize
3516@item
3517@uref{https://www.opencsw.org/,,OpenCSW}
3518@end itemize
3519
3520@item
3521macOS:
3522@itemize
3523@item
3524The @uref{https://brew.sh,,Homebrew} package manager;
3525@item
3526@uref{https://www.macports.org,,MacPorts}.
3527@end itemize
3528
3529@item
3530Microsoft Windows:
3531@itemize
3532@item
3533The @uref{https://sourceware.org/cygwin/,,Cygwin} project;
3534@item
3535The @uref{https://osdn.net/projects/mingw/,,MinGW} and
3536@uref{https://www.mingw-w64.org/,,mingw-w64} projects.
3537@end itemize
3538
3539@item
3540@uref{http://www.openpkg.org/,,OpenPKG} offers binaries for quite a
3541number of platforms.
3542
3543@item
3544The @uref{https://gcc.gnu.org/wiki/GFortranBinaries,,GFortran Wiki} has
3545links to GNU Fortran binaries for several platforms.
3546@end itemize
3547
3548@html
3549<hr />
3550<p>
3551@end html
3552@ifhtml
3553@uref{./index.html,,Return to the GCC Installation page}
3554@end ifhtml
3555@end ifset
3556
3557@c ***Specific****************************************************************
3558@ifnothtml
3559@comment node-name,     next,          previous, up
3560@node    Specific, GNU Free Documentation License, Binaries, Top
3561@end ifnothtml
3562@ifset specifichtml
3563@ifnothtml
3564@chapter Host/target specific installation notes for GCC
3565@end ifnothtml
3566@cindex Specific
3567@cindex Specific installation notes
3568@cindex Target specific installation
3569@cindex Host specific installation
3570@cindex Target specific installation notes
3571
3572Please read this document carefully @emph{before} installing the
3573GNU Compiler Collection on your machine.
3574
3575Note that this list of install notes is @emph{not} a list of supported
3576hosts or targets.  Not all supported hosts and targets are listed
3577here, only the ones that require host-specific or target-specific
3578information have to.
3579
3580@ifhtml
3581@itemize
3582@item
3583@uref{#aarch64-x-x,,aarch64*-*-*}
3584@item
3585@uref{#alpha-x-x,,alpha*-*-*}
3586@item
3587@uref{#amdgcn-x-amdhsa,,amdgcn-*-amdhsa}
3588@item
3589@uref{#amd64-x-solaris2,,amd64-*-solaris2*}
3590@item
3591@uref{#arc-x-elf32,,arc-*-elf32}
3592@item
3593@uref{#arc-linux-uclibc,,arc-linux-uclibc}
3594@item
3595@uref{#arm-x-eabi,,arm-*-eabi}
3596@item
3597@uref{#avr,,avr}
3598@item
3599@uref{#bfin,,Blackfin}
3600@item
3601@uref{#cris,,cris}
3602@item
3603@uref{#dos,,DOS}
3604@item
3605@uref{#epiphany-x-elf,,epiphany-*-elf}
3606@item
3607@uref{#ft32-x-elf,,ft32-*-elf}
3608@item
3609@uref{#x-x-freebsd,,*-*-freebsd*}
3610@item
3611@uref{#h8300-hms,,h8300-hms}
3612@item
3613@uref{#hppa-hp-hpux,,hppa*-hp-hpux*}
3614@item
3615@uref{#hppa-hp-hpux10,,hppa*-hp-hpux10}
3616@item
3617@uref{#hppa-hp-hpux11,,hppa*-hp-hpux11}
3618@item
3619@uref{#x-x-linux-gnu,,*-*-linux-gnu}
3620@item
3621@uref{#ix86-x-linux,,i?86-*-linux*}
3622@item
3623@uref{#ix86-x-solaris2,,i?86-*-solaris2*}
3624@item
3625@uref{#ia64-x-linux,,ia64-*-linux}
3626@item
3627@uref{#ia64-x-hpux,,ia64-*-hpux*}
3628@item
3629@uref{#x-ibm-aix,,*-ibm-aix*}
3630@item
3631@uref{#iq2000-x-elf,,iq2000-*-elf}
3632@item
3633@uref{#loongarch,,loongarch}
3634@item
3635@uref{#lm32-x-elf,,lm32-*-elf}
3636@item
3637@uref{#lm32-x-uclinux,,lm32-*-uclinux}
3638@item
3639@uref{#m32c-x-elf,,m32c-*-elf}
3640@item
3641@uref{#m32r-x-elf,,m32r-*-elf}
3642@item
3643@uref{#m68k-x-x,,m68k-*-*}
3644@item
3645@uref{#m68k-x-uclinux,,m68k-*-uclinux}
3646@item
3647@uref{#microblaze-x-elf,,microblaze-*-elf}
3648@item
3649@uref{#mips-x-x,,mips-*-*}
3650@item
3651@uref{#moxie-x-elf,,moxie-*-elf}
3652@item
3653@uref{#msp430-x-elf,,msp430-*-elf}
3654@item
3655@uref{#nds32le-x-elf,,nds32le-*-elf}
3656@item
3657@uref{#nds32be-x-elf,,nds32be-*-elf}
3658@item
3659@uref{#nvptx-x-none,,nvptx-*-none}
3660@item
3661@uref{#or1k-x-elf,,or1k-*-elf}
3662@item
3663@uref{#or1k-x-linux,,or1k-*-linux}
3664@item
3665@uref{#powerpc-x-x,,powerpc*-*-*}
3666@item
3667@uref{#powerpc-x-darwin,,powerpc-*-darwin*}
3668@item
3669@uref{#powerpc-x-elf,,powerpc-*-elf}
3670@item
3671@uref{#powerpc-x-linux-gnu,,powerpc*-*-linux-gnu*}
3672@item
3673@uref{#powerpc-x-netbsd,,powerpc-*-netbsd*}
3674@item
3675@uref{#powerpc-x-eabisim,,powerpc-*-eabisim}
3676@item
3677@uref{#powerpc-x-eabi,,powerpc-*-eabi}
3678@item
3679@uref{#powerpcle-x-elf,,powerpcle-*-elf}
3680@item
3681@uref{#powerpcle-x-eabisim,,powerpcle-*-eabisim}
3682@item
3683@uref{#powerpcle-x-eabi,,powerpcle-*-eabi}
3684@item
3685@uref{#riscv32-x-elf,,riscv32-*-elf}
3686@item
3687@uref{#riscv32-x-linux,,riscv32-*-linux}
3688@item
3689@uref{#riscv64-x-elf,,riscv64-*-elf}
3690@item
3691@uref{#riscv64-x-linux,,riscv64-*-linux}
3692@item
3693@uref{#rl78-x-elf,,rl78-*-elf}
3694@item
3695@uref{#rx-x-elf,,rx-*-elf}
3696@item
3697@uref{#s390-x-linux,,s390-*-linux*}
3698@item
3699@uref{#s390x-x-linux,,s390x-*-linux*}
3700@item
3701@uref{#s390x-ibm-tpf,,s390x-ibm-tpf*}
3702@item
3703@uref{#x-x-solaris2,,*-*-solaris2*}
3704@item
3705@uref{#sparc-x-x,,sparc*-*-*}
3706@item
3707@uref{#sparc-sun-solaris2,,sparc-sun-solaris2*}
3708@item
3709@uref{#sparc-x-linux,,sparc-*-linux*}
3710@item
3711@uref{#sparc64-x-solaris2,,sparc64-*-solaris2*}
3712@item
3713@uref{#sparcv9-x-solaris2,,sparcv9-*-solaris2*}
3714@item
3715@uref{#c6x-x-x,,c6x-*-*}
3716@item
3717@uref{#tilegx-x-linux,,tilegx-*-linux*}
3718@item
3719@uref{#tilegxbe-x-linux,,tilegxbe-*-linux*}
3720@item
3721@uref{#tilepro-x-linux,,tilepro-*-linux*}
3722@item
3723@uref{#visium-x-elf, visium-*-elf}
3724@item
3725@uref{#x-x-vxworks,,*-*-vxworks*}
3726@item
3727@uref{#x86-64-x-x,,x86_64-*-*, amd64-*-*}
3728@item
3729@uref{#x86-64-x-solaris2,,x86_64-*-solaris2*}
3730@item
3731@uref{#xtensa-x-elf,,xtensa*-*-elf}
3732@item
3733@uref{#xtensa-x-linux,,xtensa*-*-linux*}
3734@item
3735@uref{#windows,,Microsoft Windows}
3736@item
3737@uref{#x-x-cygwin,,*-*-cygwin}
3738@item
3739@uref{#x-x-mingw32,,*-*-mingw32}
3740@item
3741@uref{#os2,,OS/2}
3742@item
3743@uref{#older,,Older systems}
3744@end itemize
3745
3746@itemize
3747@item
3748@uref{#elf,,all ELF targets} (SVR4, Solaris 2, etc.)
3749@end itemize
3750@end ifhtml
3751
3752
3753@html
3754<!-- -------- host/target specific issues start here ---------------- -->
3755<hr />
3756@end html
3757@anchor{aarch64-x-x}
3758@heading aarch64*-*-*
3759Binutils pre 2.24 does not have support for selecting @option{-mabi} and
3760does not support ILP32.  If it is used to build GCC 4.9 or later, GCC will
3761not support option @option{-mabi=ilp32}.
3762
3763To enable a workaround for the Cortex-A53 erratum number 835769 by default
3764(for all CPUs regardless of -mcpu option given) at configure time use the
3765@option{--enable-fix-cortex-a53-835769} option.  This will enable the fix by
3766default and can be explicitly disabled during compilation by passing the
3767@option{-mno-fix-cortex-a53-835769} option.  Conversely,
3768@option{--disable-fix-cortex-a53-835769} will disable the workaround by
3769default.  The workaround is disabled by default if neither of
3770@option{--enable-fix-cortex-a53-835769} or
3771@option{--disable-fix-cortex-a53-835769} is given at configure time.
3772
3773To enable a workaround for the Cortex-A53 erratum number 843419 by default
3774(for all CPUs regardless of -mcpu option given) at configure time use the
3775@option{--enable-fix-cortex-a53-843419} option.  This workaround is applied at
3776link time.  Enabling the workaround will cause GCC to pass the relevant option
3777to the linker.  It can be explicitly disabled during compilation by passing the
3778@option{-mno-fix-cortex-a53-843419} option.  Conversely,
3779@option{--disable-fix-cortex-a53-843419} will disable the workaround by default.
3780The workaround is disabled by default if neither of
3781@option{--enable-fix-cortex-a53-843419} or
3782@option{--disable-fix-cortex-a53-843419} is given at configure time.
3783
3784To enable Branch Target Identification Mechanism and Return Address Signing by
3785default at configure time use the @option{--enable-standard-branch-protection}
3786option.  This is equivalent to having @option{-mbranch-protection=standard}
3787during compilation.  This can be explicitly disabled during compilation by
3788passing the @option{-mbranch-protection=none} option which turns off all
3789types of branch protections.  Conversely,
3790@option{--disable-standard-branch-protection} will disable both the
3791protections by default.  This mechanism is turned off by default if neither
3792of the options are given at configure time.
3793
3794@html
3795<hr />
3796@end html
3797@anchor{alpha-x-x}
3798@heading alpha*-*-*
3799This section contains general configuration information for all
3800Alpha-based platforms using ELF@.  In addition to reading this
3801section, please read all other sections that match your target.
3802
3803@html
3804<hr />
3805@end html
3806@anchor{amd64-x-solaris2}
3807@heading amd64-*-solaris2*
3808This is a synonym for @samp{x86_64-*-solaris2*}.
3809
3810@html
3811<hr />
3812@end html
3813@anchor{amdgcn-x-amdhsa}
3814@heading amdgcn-*-amdhsa
3815AMD GCN GPU target.
3816
3817Instead of GNU Binutils, you will need to install LLVM 13.0.1, or later, and copy
3818@file{bin/llvm-mc} to @file{amdgcn-amdhsa/bin/as},
3819@file{bin/lld} to @file{amdgcn-amdhsa/bin/ld},
3820@file{bin/llvm-nm} to @file{amdgcn-amdhsa/bin/nm}, and
3821@file{bin/llvm-ar} to both @file{bin/amdgcn-amdhsa-ar} and
3822@file{bin/amdgcn-amdhsa-ranlib}.
3823
3824Use Newlib (3.2.0, or newer).
3825
3826To run the binaries, install the HSA Runtime from the
3827@uref{https://rocm.github.io,,ROCm Platform}, and use
3828@file{libexec/gcc/amdhsa-amdhsa/@var{version}/gcn-run} to launch them
3829on the GPU.
3830
3831@html
3832<hr />
3833@end html
3834@anchor{arc-x-elf32}
3835@heading arc-*-elf32
3836
3837Use @samp{configure --target=arc-elf32 --with-cpu=@var{cpu} --enable-languages="c,c++"}
3838to configure GCC, with @var{cpu} being one of @samp{arc600}, @samp{arc601},
3839or @samp{arc700}@.
3840
3841@html
3842<hr />
3843@end html
3844@anchor{arc-linux-uclibc}
3845@heading arc-linux-uclibc
3846
3847Use @samp{configure --target=arc-linux-uclibc --with-cpu=arc700 --enable-languages="c,c++"} to configure GCC@.
3848
3849@html
3850<hr />
3851@end html
3852@anchor{arm-x-eabi}
3853@heading arm-*-eabi
3854ARM-family processors.
3855
3856Building the Ada frontend commonly fails (an infinite loop executing
3857@code{xsinfo}) if the host compiler is GNAT 4.8.  Host compilers built from the
3858GNAT 4.6, 4.9 or 5 release branches are known to succeed.
3859
3860@html
3861<hr />
3862@end html
3863@anchor{avr}
3864@heading avr
3865ATMEL AVR-family micro controllers.  These are used in embedded
3866applications.  There are no standard Unix configurations.
3867@ifnothtml
3868@xref{AVR Options,, AVR Options, gcc, Using the GNU Compiler
3869Collection (GCC)},
3870@end ifnothtml
3871@ifhtml
3872See ``AVR Options'' in the main manual
3873@end ifhtml
3874for the list of supported MCU types.
3875
3876Use @samp{configure --target=avr --enable-languages="c"} to configure GCC@.
3877
3878Further installation notes and other useful information about AVR tools
3879can also be obtained from:
3880
3881@itemize @bullet
3882@item
3883@uref{http://www.nongnu.org/avr/,,http://www.nongnu.org/avr/}
3884@item
3885@uref{http://www.amelek.gda.pl/avr/,,http://www.amelek.gda.pl/avr/}
3886@end itemize
3887
3888The following error:
3889@smallexample
3890Error: register required
3891@end smallexample
3892
3893indicates that you should upgrade to a newer version of the binutils.
3894
3895@html
3896<hr />
3897@end html
3898@anchor{bfin}
3899@heading Blackfin
3900The Blackfin processor, an Analog Devices DSP.
3901@ifnothtml
3902@xref{Blackfin Options,, Blackfin Options, gcc, Using the GNU Compiler
3903Collection (GCC)},
3904@end ifnothtml
3905@ifhtml
3906See ``Blackfin Options'' in the main manual
3907@end ifhtml
3908
3909More information, and a version of binutils with support for this processor,
3910are available at @uref{https://sourceforge.net/projects/adi-toolchain/}.
3911
3912@html
3913<hr />
3914@end html
3915@anchor{cr16}
3916@heading CR16
3917The CR16 CompactRISC architecture is a 16-bit architecture. This
3918architecture is used in embedded applications.
3919
3920@ifnothtml
3921@xref{CR16 Options,, CR16 Options, gcc, Using and Porting the GNU Compiler
3922Collection (GCC)},
3923@end ifnothtml
3924
3925@ifhtml
3926See ``CR16 Options'' in the main manual for a list of CR16-specific options.
3927@end ifhtml
3928
3929Use @samp{configure --target=cr16-elf --enable-languages=c,c++} to configure
3930GCC@ for building a CR16 elf cross-compiler.
3931
3932Use @samp{configure --target=cr16-uclinux --enable-languages=c,c++} to
3933configure GCC@ for building a CR16 uclinux cross-compiler.
3934
3935@html
3936<hr />
3937@end html
3938@anchor{cris}
3939@heading CRIS
3940CRIS is a CPU architecture in Axis Communications systems-on-a-chip, for
3941example the ETRAX series.  These are used in embedded applications.
3942
3943@ifnothtml
3944@xref{CRIS Options,, CRIS Options, gcc, Using the GNU Compiler
3945Collection (GCC)},
3946@end ifnothtml
3947@ifhtml
3948See ``CRIS Options'' in the main manual
3949@end ifhtml
3950for a list of CRIS-specific options.
3951
3952Use @samp{configure --target=cris-elf} to configure GCC@ for building
3953a cross-compiler for CRIS.
3954@html
3955<hr />
3956@end html
3957@anchor{dos}
3958@heading DOS
3959Please have a look at the @uref{binaries.html,,binaries page}.
3960
3961You cannot install GCC by itself on MSDOS; it will not compile under
3962any MSDOS compiler except itself.  You need to get the complete
3963compilation package DJGPP, which includes binaries as well as sources,
3964and includes all the necessary compilation tools and libraries.
3965
3966@html
3967<hr />
3968@end html
3969@anchor{epiphany-x-elf}
3970@heading epiphany-*-elf
3971Adapteva Epiphany.
3972This configuration is intended for embedded systems.
3973
3974@html
3975<hr />
3976@end html
3977@anchor{x-x-freebsd}
3978@heading *-*-freebsd*
3979In order to better utilize FreeBSD base system functionality and match
3980the configuration of the system compiler, GCC 4.5 and above as well as
3981GCC 4.4 past 2010-06-20 leverage SSP support in libc (which is present
3982on FreeBSD 7 or later) and the use of @code{__cxa_atexit} by default
3983(on FreeBSD 6 or later).  The use of @code{dl_iterate_phdr} inside
3984@file{libgcc_s.so.1} and boehm-gc (on FreeBSD 7 or later) is enabled
3985by GCC 4.5 and above.
3986
3987We support FreeBSD using the ELF file format with DWARF 2 debugging
3988for all CPU architectures.  You may use @option{-gstabs} instead of
3989@option{-g}, if you really want the old debugging format.  There are
3990no known issues with mixing object files and libraries with different
3991debugging formats.  Otherwise, this release of GCC should now match
3992more of the configuration used in the stock FreeBSD configuration of
3993GCC@.  In particular, @option{--enable-threads} is now configured by
3994default.  However, as a general user, do not attempt to replace the
3995system compiler with this release.  Known to bootstrap and check with
3996good results on FreeBSD 7.2-STABLE@.  In the past, known to bootstrap
3997and check with good results on FreeBSD 3.0, 3.4, 4.0, 4.2, 4.3, 4.4,
39984.5, 4.8, 4.9 and 5-CURRENT@.
3999
4000The version of binutils installed in @file{/usr/bin} probably works
4001with this release of GCC@.  Bootstrapping against the latest GNU
4002binutils and/or the version found in @file{/usr/ports/devel/binutils} has
4003been known to enable additional features and improve overall testsuite
4004results.  However, it is currently known that boehm-gc may not configure
4005properly on FreeBSD prior to the FreeBSD 7.0 release with GNU binutils
4006after 2.16.1.
4007
4008@html
4009<hr />
4010@end html
4011@anchor{ft32-x-elf}
4012@heading ft32-*-elf
4013The FT32 processor.
4014This configuration is intended for embedded systems.
4015
4016@html
4017<hr />
4018@end html
4019@anchor{h8300-hms}
4020@heading h8300-hms
4021Renesas H8/300 series of processors.
4022
4023Please have a look at the @uref{binaries.html,,binaries page}.
4024
4025The calling convention and structure layout has changed in release 2.6.
4026All code must be recompiled.  The calling convention now passes the
4027first three arguments in function calls in registers.  Structures are no
4028longer a multiple of 2 bytes.
4029
4030@html
4031<hr />
4032@end html
4033@anchor{hppa-hp-hpux}
4034@heading hppa*-hp-hpux*
4035Support for HP-UX version 9 and older was discontinued in GCC 3.4.
4036
4037We require using gas/binutils on all hppa platforms.  Version 2.19 or
4038later is recommended.
4039
4040It may be helpful to configure GCC with the
4041@uref{./configure.html#with-gnu-as,,@option{--with-gnu-as}} and
4042@option{--with-as=@dots{}} options to ensure that GCC can find GAS@.
4043
4044The HP assembler should not be used with GCC.  It is rarely tested and may
4045not work.  It shouldn't be used with any languages other than C due to its
4046many limitations.
4047
4048Specifically, @option{-g} does not work (HP-UX uses a peculiar debugging
4049format which GCC does not know about).  It also inserts timestamps
4050into each object file it creates, causing the 3-stage comparison test to
4051fail during a bootstrap.  You should be able to continue by saying
4052@samp{make all-host all-target} after getting the failure from @samp{make}.
4053
4054Various GCC features are not supported.  For example, it does not support weak
4055symbols or alias definitions.  As a result, explicit template instantiations
4056are required when using C++.  This makes it difficult if not impossible to
4057build many C++ applications.
4058
4059There are two default scheduling models for instructions.  These are
4060PROCESSOR_7100LC and PROCESSOR_8000.  They are selected from the pa-risc
4061architecture specified for the target machine when configuring.
4062PROCESSOR_8000 is the default.  PROCESSOR_7100LC is selected when
4063the target is a @samp{hppa1*} machine.
4064
4065The PROCESSOR_8000 model is not well suited to older processors.  Thus,
4066it is important to completely specify the machine architecture when
4067configuring if you want a model other than PROCESSOR_8000.  The macro
4068TARGET_SCHED_DEFAULT can be defined in BOOT_CFLAGS if a different
4069default scheduling model is desired.
4070
4071As of GCC 4.0, GCC uses the UNIX 95 namespace for HP-UX 10.10
4072through 11.00, and the UNIX 98 namespace for HP-UX 11.11 and later.
4073This namespace change might cause problems when bootstrapping with
4074an earlier version of GCC or the HP compiler as essentially the same
4075namespace is required for an entire build.  This problem can be avoided
4076in a number of ways.  With HP cc, @env{UNIX_STD} can be set to @samp{95}
4077or @samp{98}.  Another way is to add an appropriate set of predefines
4078to @env{CC}.  The description for the @option{munix=} option contains
4079a list of the predefines used with each standard.
4080
4081More specific information to @samp{hppa*-hp-hpux*} targets follows.
4082
4083@html
4084<hr />
4085@end html
4086@anchor{hppa-hp-hpux10}
4087@heading hppa*-hp-hpux10
4088For hpux10.20, we @emph{highly} recommend you pick up the latest sed patch
4089@code{PHCO_19798} from HP@.
4090
4091The C++ ABI has changed incompatibly in GCC 4.0.  COMDAT subspaces are
4092used for one-only code and data.  This resolves many of the previous
4093problems in using C++ on this target.  However, the ABI is not compatible
4094with the one implemented under HP-UX 11 using secondary definitions.
4095
4096@html
4097<hr />
4098@end html
4099@anchor{hppa-hp-hpux11}
4100@heading hppa*-hp-hpux11
4101GCC 3.0 and up support HP-UX 11.  GCC 2.95.x is not supported and cannot
4102be used to compile GCC 3.0 and up.
4103
4104The libffi library haven't been ported to 64-bit HP-UX@ and doesn't build.
4105
4106Refer to @uref{binaries.html,,binaries} for information about obtaining
4107precompiled GCC binaries for HP-UX@.  Precompiled binaries must be obtained
4108to build the Ada language as it cannot be bootstrapped using C@.  Ada is
4109only available for the 32-bit PA-RISC runtime.
4110
4111Starting with GCC 3.4 an ISO C compiler is required to bootstrap.  The
4112bundled compiler supports only traditional C; you will need either HP's
4113unbundled compiler, or a binary distribution of GCC@.
4114
4115It is possible to build GCC 3.3 starting with the bundled HP compiler,
4116but the process requires several steps.  GCC 3.3 can then be used to
4117build later versions.
4118
4119There are several possible approaches to building the distribution.
4120Binutils can be built first using the HP tools.  Then, the GCC
4121distribution can be built.  The second approach is to build GCC
4122first using the HP tools, then build binutils, then rebuild GCC@.
4123There have been problems with various binary distributions, so it
4124is best not to start from a binary distribution.
4125
4126On 64-bit capable systems, there are two distinct targets.  Different
4127installation prefixes must be used if both are to be installed on
4128the same system.  The @samp{hppa[1-2]*-hp-hpux11*} target generates code
4129for the 32-bit PA-RISC runtime architecture and uses the HP linker.
4130The @samp{hppa64-hp-hpux11*} target generates 64-bit code for the
4131PA-RISC 2.0 architecture.
4132
4133The script config.guess now selects the target type based on the compiler
4134detected during configuration.  You must define @env{PATH} or @env{CC} so
4135that configure finds an appropriate compiler for the initial bootstrap.
4136When @env{CC} is used, the definition should contain the options that are
4137needed whenever @env{CC} is used.
4138
4139Specifically, options that determine the runtime architecture must be
4140in @env{CC} to correctly select the target for the build.  It is also
4141convenient to place many other compiler options in @env{CC}.  For example,
4142@env{CC="cc -Ac +DA2.0W -Wp,-H16376 -D_CLASSIC_TYPES -D_HPUX_SOURCE"}
4143can be used to bootstrap the GCC 3.3 branch with the HP compiler in
414464-bit K&R/bundled mode.  The @option{+DA2.0W} option will result in
4145the automatic selection of the @samp{hppa64-hp-hpux11*} target.  The
4146macro definition table of cpp needs to be increased for a successful
4147build with the HP compiler.  _CLASSIC_TYPES and _HPUX_SOURCE need to
4148be defined when building with the bundled compiler, or when using the
4149@option{-Ac} option.  These defines aren't necessary with @option{-Ae}.
4150
4151It is best to explicitly configure the @samp{hppa64-hp-hpux11*} target
4152with the @option{--with-ld=@dots{}} option.  This overrides the standard
4153search for ld.  The two linkers supported on this target require different
4154commands.  The default linker is determined during configuration.  As a
4155result, it's not possible to switch linkers in the middle of a GCC build.
4156This has been reported to sometimes occur in unified builds of binutils
4157and GCC@.
4158
4159A recent linker patch must be installed for the correct operation of
4160GCC 3.3 and later.  @code{PHSS_26559} and @code{PHSS_24304} are the
4161oldest linker patches that are known to work.  They are for HP-UX
416211.00 and 11.11, respectively.  @code{PHSS_24303}, the companion to
4163@code{PHSS_24304}, might be usable but it hasn't been tested.  These
4164patches have been superseded.  Consult the HP patch database to obtain
4165the currently recommended linker patch for your system.
4166
4167The patches are necessary for the support of weak symbols on the
416832-bit port, and for the running of initializers and finalizers.  Weak
4169symbols are implemented using SOM secondary definition symbols.  Prior
4170to HP-UX 11, there are bugs in the linker support for secondary symbols.
4171The patches correct a problem of linker core dumps creating shared
4172libraries containing secondary symbols, as well as various other
4173linking issues involving secondary symbols.
4174
4175GCC 3.3 uses the ELF DT_INIT_ARRAY and DT_FINI_ARRAY capabilities to
4176run initializers and finalizers on the 64-bit port.  The 32-bit port
4177uses the linker @option{+init} and @option{+fini} options for the same
4178purpose.  The patches correct various problems with the +init/+fini
4179options, including program core dumps.  Binutils 2.14 corrects a
4180problem on the 64-bit port resulting from HP's non-standard use of
4181the .init and .fini sections for array initializers and finalizers.
4182
4183Although the HP and GNU linkers are both supported for the
4184@samp{hppa64-hp-hpux11*} target, it is strongly recommended that the
4185HP linker be used for link editing on this target.
4186
4187At this time, the GNU linker does not support the creation of long
4188branch stubs.  As a result, it cannot successfully link binaries
4189containing branch offsets larger than 8 megabytes.  In addition,
4190there are problems linking shared libraries, linking executables
4191with @option{-static}, and with dwarf2 unwind and exception support.
4192It also doesn't provide stubs for internal calls to global functions
4193in shared libraries, so these calls cannot be overloaded.
4194
4195The HP dynamic loader does not support GNU symbol versioning, so symbol
4196versioning is not supported.  It may be necessary to disable symbol
4197versioning with @option{--disable-symvers} when using GNU ld.
4198
4199POSIX threads are the default.  The optional DCE thread library is not
4200supported, so @option{--enable-threads=dce} does not work.
4201
4202@html
4203<hr />
4204@end html
4205@anchor{x-x-linux-gnu}
4206@heading *-*-linux-gnu
4207The @code{.init_array} and @code{.fini_array} sections are enabled
4208unconditionally which requires at least glibc 2.1 and binutils 2.12.
4209
4210Versions of libstdc++-v3 starting with 3.2.1 require bug fixes present
4211in glibc 2.2.5 and later.  More information is available in the
4212libstdc++-v3 documentation.
4213
4214@html
4215<hr />
4216@end html
4217@anchor{ix86-x-linux}
4218@heading i?86-*-linux*
4219As of GCC 3.3, binutils 2.13.1 or later is required for this platform.
4220See @uref{https://gcc.gnu.org/PR10877,,bug 10877} for more information.
4221
4222If you receive Signal 11 errors when building on GNU/Linux, then it is
4223possible you have a hardware problem.  Further information on this can be
4224found on @uref{https://www.bitwizard.nl/sig11/,,www.bitwizard.nl}.
4225
4226@html
4227<hr />
4228@end html
4229@anchor{ix86-x-solaris2}
4230@heading i?86-*-solaris2*
4231Use this for Solaris 11.3 or later on x86 and x86-64 systems.  Starting
4232with GCC 4.7, there is also a 64-bit @samp{amd64-*-solaris2*} or
4233@samp{x86_64-*-solaris2*} configuration that corresponds to
4234@samp{sparcv9-sun-solaris2*}.
4235
4236It is recommended that you configure GCC to use the GNU assembler.  The
4237versions included in Solaris 11.3, from GNU binutils 2.23.1 or
4238newer (available as @file{/usr/bin/gas} and
4239@file{/usr/gnu/bin/as}), work fine.  The current version, from GNU
4240binutils 2.34, is known to work.  Recent versions of the Solaris assembler in
4241@file{/usr/bin/as} work almost as well, though.
4242
4243For linking, the Solaris linker is preferred.  If you want to use the GNU
4244linker instead, the version in Solaris 11.3, from GNU binutils 2.23.1 or
4245newer (in @file{/usr/gnu/bin/ld} and @file{/usr/bin/gld}), works,
4246as does the latest version, from GNU binutils 2.34.
4247
4248To use GNU @command{as}, configure with the options
4249@option{--with-gnu-as --with-as=@//usr/@/gnu/@/bin/@/as}.  It may be necessary
4250to configure with @option{--without-gnu-ld --with-ld=@//usr/@/ccs/@/bin/@/ld} to
4251guarantee use of Solaris @command{ld}.
4252@c FIXME: why --without-gnu-ld --with-ld?
4253
4254@html
4255<hr />
4256@end html
4257@anchor{ia64-x-linux}
4258@heading ia64-*-linux
4259IA-64 processor (also known as IPF, or Itanium Processor Family)
4260running GNU/Linux.
4261
4262If you are using the installed system libunwind library with
4263@option{--with-system-libunwind}, then you must use libunwind 0.98 or
4264later.
4265
4266@html
4267<hr />
4268@end html
4269@anchor{ia64-x-hpux}
4270@heading ia64-*-hpux*
4271Building GCC on this target requires the GNU Assembler.  The bundled HP
4272assembler will not work.  To prevent GCC from using the wrong assembler,
4273the option @option{--with-gnu-as} may be necessary.
4274
4275The GCC libunwind library has not been ported to HPUX@.  This means that for
4276GCC versions 3.2.3 and earlier, @option{--enable-libunwind-exceptions}
4277is required to build GCC@.  For GCC 3.3 and later, this is the default.
4278For gcc 3.4.3 and later, @option{--enable-libunwind-exceptions} is
4279removed and the system libunwind library will always be used.
4280
4281@html
4282<hr />
4283<!-- rs6000-ibm-aix*, powerpc-ibm-aix* -->
4284@end html
4285@anchor{x-ibm-aix}
4286@heading *-ibm-aix*
4287Support for AIX version 3 and older was discontinued in GCC 3.4.
4288Support for AIX version 4.2 and older was discontinued in GCC 4.5.
4289
4290``out of memory'' bootstrap failures may indicate a problem with
4291process resource limits (ulimit).  Hard limits are configured in the
4292@file{/etc/security/limits} system configuration file.
4293
4294GCC 4.9 and above require a C++ compiler for bootstrap.  IBM VAC++ / xlC
4295cannot bootstrap GCC.  xlc can bootstrap an older version of GCC and
4296G++ can bootstrap recent releases of GCC.
4297
4298GCC can bootstrap with recent versions of IBM XLC, but bootstrapping
4299with an earlier release of GCC is recommended.  Bootstrapping with XLC
4300requires a larger data segment, which can be enabled through the
4301@var{LDR_CNTRL} environment variable, e.g.,
4302
4303@smallexample
4304% LDR_CNTRL=MAXDATA=0x50000000
4305% export LDR_CNTRL
4306@end smallexample
4307
4308One can start with a pre-compiled version of GCC to build from
4309sources.  One may delete GCC's ``fixed'' header files when starting
4310with a version of GCC built for an earlier release of AIX.
4311
4312To speed up the configuration phases of bootstrapping and installing GCC,
4313one may use GNU Bash instead of AIX @command{/bin/sh}, e.g.,
4314
4315@smallexample
4316% CONFIG_SHELL=/opt/freeware/bin/bash
4317% export CONFIG_SHELL
4318@end smallexample
4319
4320and then proceed as described in @uref{build.html,,the build
4321instructions}, where we strongly recommend specifying an absolute path
4322to invoke @var{srcdir}/configure.
4323
4324Because GCC on AIX is built as a 32-bit executable by default,
4325(although it can generate 64-bit programs) the GMP and MPFR libraries
4326required by gfortran must be 32-bit libraries.  Building GMP and MPFR
4327as static archive libraries works better than shared libraries.
4328
4329Errors involving @code{alloca} when building GCC generally are due
4330to an incorrect definition of @code{CC} in the Makefile or mixing files
4331compiled with the native C compiler and GCC@.  During the stage1 phase of
4332the build, the native AIX compiler @strong{must} be invoked as @command{cc}
4333(not @command{xlc}).  Once @command{configure} has been informed of
4334@command{xlc}, one needs to use @samp{make distclean} to remove the
4335configure cache files and ensure that @env{CC} environment variable
4336does not provide a definition that will confuse @command{configure}.
4337If this error occurs during stage2 or later, then the problem most likely
4338is the version of Make (see above).
4339
4340The native @command{as} and @command{ld} are recommended for
4341bootstrapping on AIX@.  The GNU Assembler, GNU Linker, and GNU
4342Binutils version 2.20 is the minimum level that supports bootstrap on
4343AIX 5@.  The GNU Assembler has not been updated to support AIX 6@ or
4344AIX 7.  The native AIX tools do interoperate with GCC@.
4345
4346AIX 7.1 added partial support for DWARF debugging, but full support
4347requires AIX 7.1 TL03 SP7 that supports additional DWARF sections and
4348fixes a bug in the assembler.  AIX 7.1 TL03 SP5 distributed a version
4349of libm.a missing important symbols; a fix for IV77796 will be
4350included in SP6.
4351
4352AIX 5.3 TL10, AIX 6.1 TL05 and AIX 7.1 TL00 introduced an AIX
4353assembler change that sometimes produces corrupt assembly files
4354causing AIX linker errors.  The bug breaks GCC bootstrap on AIX and
4355can cause compilation failures with existing GCC installations.  An
4356AIX iFix for AIX 5.3 is available (APAR IZ98385 for AIX 5.3 TL10, APAR
4357IZ98477 for AIX 5.3 TL11 and IZ98134 for AIX 5.3 TL12). AIX 5.3 TL11 SP8,
4358AIX 5.3 TL12 SP5, AIX 6.1 TL04 SP11, AIX 6.1 TL05 SP7, AIX 6.1 TL06 SP6,
4359AIX 6.1 TL07 and AIX 7.1 TL01 should include the fix.
4360
4361Building @file{libstdc++.a} requires a fix for an AIX Assembler bug
4362APAR IY26685 (AIX 4.3) or APAR IY25528 (AIX 5.1).  It also requires a
4363fix for another AIX Assembler bug and a co-dependent AIX Archiver fix
4364referenced as APAR IY53606 (AIX 5.2) or as APAR IY54774 (AIX 5.1)
4365
4366@anchor{TransferAixShobj}
4367@samp{libstdc++} in GCC 3.4 increments the major version number of the
4368shared object and GCC installation places the @file{libstdc++.a}
4369shared library in a common location which will overwrite the and GCC
43703.3 version of the shared library.  Applications either need to be
4371re-linked against the new shared library or the GCC 3.1 and GCC 3.3
4372versions of the @samp{libstdc++} shared object needs to be available
4373to the AIX runtime loader.  The GCC 3.1 @samp{libstdc++.so.4}, if
4374present, and GCC 3.3 @samp{libstdc++.so.5} shared objects can be
4375installed for runtime dynamic loading using the following steps to set
4376the @samp{F_LOADONLY} flag in the shared object for @emph{each}
4377multilib @file{libstdc++.a} installed:
4378
4379Extract the shared objects from the currently installed
4380@file{libstdc++.a} archive:
4381@smallexample
4382% ar -x libstdc++.a libstdc++.so.4 libstdc++.so.5
4383@end smallexample
4384
4385Enable the @samp{F_LOADONLY} flag so that the shared object will be
4386available for runtime dynamic loading, but not linking:
4387@smallexample
4388% strip -e libstdc++.so.4 libstdc++.so.5
4389@end smallexample
4390
4391Archive the runtime-only shared object in the GCC 3.4
4392@file{libstdc++.a} archive:
4393@smallexample
4394% ar -q libstdc++.a libstdc++.so.4 libstdc++.so.5
4395@end smallexample
4396
4397Eventually, the
4398@uref{./configure.html#WithAixSoname,,@option{--with-aix-soname=svr4}}
4399configure option may drop the need for this procedure for libraries that
4400support it.
4401
4402Linking executables and shared libraries may produce warnings of
4403duplicate symbols.  The assembly files generated by GCC for AIX always
4404have included multiple symbol definitions for certain global variable
4405and function declarations in the original program.  The warnings should
4406not prevent the linker from producing a correct library or runnable
4407executable.
4408
4409AIX 4.3 utilizes a ``large format'' archive to support both 32-bit and
441064-bit object modules.  The routines provided in AIX 4.3.0 and AIX 4.3.1
4411to parse archive libraries did not handle the new format correctly.
4412These routines are used by GCC and result in error messages during
4413linking such as ``not a COFF file''.  The version of the routines shipped
4414with AIX 4.3.1 should work for a 32-bit environment.  The @option{-g}
4415option of the archive command may be used to create archives of 32-bit
4416objects using the original ``small format''.  A correct version of the
4417routines is shipped with AIX 4.3.2 and above.
4418
4419Some versions of the AIX binder (linker) can fail with a relocation
4420overflow severe error when the @option{-bbigtoc} option is used to link
4421GCC-produced object files into an executable that overflows the TOC@.  A fix
4422for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND -BBIGTOC) is
4423available from IBM Customer Support and from its
4424@uref{https://techsupport.services.ibm.com/,,techsupport.services.ibm.com}
4425website as PTF U455193.
4426
4427The AIX 4.3.2.1 linker (bos.rte.bind_cmds Level 4.3.2.1) will dump core
4428with a segmentation fault when invoked by any version of GCC@.  A fix for
4429APAR IX87327 is available from IBM Customer Support and from its
4430@uref{https://techsupport.services.ibm.com/,,techsupport.services.ibm.com}
4431website as PTF U461879.  This fix is incorporated in AIX 4.3.3 and above.
4432
4433The initial assembler shipped with AIX 4.3.0 generates incorrect object
4434files.  A fix for APAR IX74254 (64BIT DISASSEMBLED OUTPUT FROM COMPILER FAILS
4435TO ASSEMBLE/BIND) is available from IBM Customer Support and from its
4436@uref{https://techsupport.services.ibm.com/,,techsupport.services.ibm.com}
4437website as PTF U453956.  This fix is incorporated in AIX 4.3.1 and above.
4438
4439AIX provides National Language Support (NLS)@.  Compilers and assemblers
4440use NLS to support locale-specific representations of various data
4441formats including floating-point numbers (e.g., @samp{.}  vs @samp{,} for
4442separating decimal fractions).  There have been problems reported where
4443GCC does not produce the same floating-point formats that the assembler
4444expects.  If one encounters this problem, set the @env{LANG}
4445environment variable to @samp{C} or @samp{En_US}.
4446
4447A default can be specified with the @option{-mcpu=@var{cpu_type}}
4448switch and using the configure option @option{--with-cpu-@var{cpu_type}}.
4449
4450@html
4451<hr />
4452@end html
4453@anchor{iq2000-x-elf}
4454@heading iq2000-*-elf
4455Vitesse IQ2000 processors.  These are used in embedded
4456applications.  There are no standard Unix configurations.
4457
4458@html
4459<hr />
4460@end html
4461@anchor{lm32-x-elf}
4462@heading lm32-*-elf
4463Lattice Mico32 processor.
4464This configuration is intended for embedded systems.
4465
4466@html
4467<hr />
4468@end html
4469@anchor{lm32-x-uclinux}
4470@heading lm32-*-uclinux
4471Lattice Mico32 processor.
4472This configuration is intended for embedded systems running uClinux.
4473
4474@html
4475<hr />
4476@end html
4477@anchor{loongarch}
4478@heading LoongArch
4479LoongArch processor.
4480The following LoongArch targets are available:
4481@table @code
4482@item loongarch64-linux-gnu*
4483LoongArch processor running GNU/Linux.  This target triplet may be coupled
4484with a small set of possible suffixes to identify their default ABI type:
4485@table @code
4486@item f64
4487Uses @code{lp64d/base} ABI by default.
4488@item f32
4489Uses @code{lp64f/base} ABI by default.
4490@item sf
4491Uses @code{lp64s/base} ABI by default.
4492@end table
4493
4494@item loongarch64-linux-gnu
4495Same as @code{loongarch64-linux-gnuf64}, but may be used with
4496@option{--with-abi=*} to configure the default ABI type.
4497@end table
4498
4499More information about LoongArch can be found at
4500@uref{https://github.com/loongson/LoongArch-Documentation}.
4501
4502@html
4503<hr />
4504@end html
4505@anchor{m32c-x-elf}
4506@heading m32c-*-elf
4507Renesas M32C processor.
4508This configuration is intended for embedded systems.
4509
4510@html
4511<hr />
4512@end html
4513@anchor{m32r-x-elf}
4514@heading m32r-*-elf
4515Renesas M32R processor.
4516This configuration is intended for embedded systems.
4517
4518@html
4519<hr />
4520@end html
4521@anchor{m68k-x-x}
4522@heading m68k-*-*
4523By default,
4524@samp{m68k-*-elf*}, @samp{m68k-*-rtems},  @samp{m68k-*-uclinux} and
4525@samp{m68k-*-linux}
4526build libraries for both M680x0 and ColdFire processors.  If you only
4527need the M680x0 libraries, you can omit the ColdFire ones by passing
4528@option{--with-arch=m68k} to @command{configure}.  Alternatively, you
4529can omit the M680x0 libraries by passing @option{--with-arch=cf} to
4530@command{configure}.  These targets default to 5206 or 5475 code as
4531appropriate for the target system when
4532configured with @option{--with-arch=cf} and 68020 code otherwise.
4533
4534The @samp{m68k-*-netbsd} and
4535@samp{m68k-*-openbsd} targets also support the @option{--with-arch}
4536option.  They will generate ColdFire CFV4e code when configured with
4537@option{--with-arch=cf} and 68020 code otherwise.
4538
4539You can override the default processors listed above by configuring
4540with @option{--with-cpu=@var{target}}.  This @var{target} can either
4541be a @option{-mcpu} argument or one of the following values:
4542@samp{m68000}, @samp{m68010}, @samp{m68020}, @samp{m68030},
4543@samp{m68040}, @samp{m68060}, @samp{m68020-40} and @samp{m68020-60}.
4544
4545GCC requires at least binutils version 2.17 on these targets.
4546
4547@html
4548<hr />
4549@end html
4550@anchor{m68k-x-uclinux}
4551@heading m68k-*-uclinux
4552GCC 4.3 changed the uClinux configuration so that it uses the
4553@samp{m68k-linux-gnu} ABI rather than the @samp{m68k-elf} ABI.
4554It also added improved support for C++ and flat shared libraries,
4555both of which were ABI changes.
4556
4557@html
4558<hr />
4559@end html
4560@anchor{microblaze-x-elf}
4561@heading microblaze-*-elf
4562Xilinx MicroBlaze processor.
4563This configuration is intended for embedded systems.
4564
4565@html
4566<hr />
4567@end html
4568@anchor{mips-x-x}
4569@heading mips-*-*
4570If on a MIPS system you get an error message saying ``does not have gp
4571sections for all it's [sic] sectons [sic]'', don't worry about it.  This
4572happens whenever you use GAS with the MIPS linker, but there is not
4573really anything wrong, and it is okay to use the output file.  You can
4574stop such warnings by installing the GNU linker.
4575
4576It would be nice to extend GAS to produce the gp tables, but they are
4577optional, and there should not be a warning about their absence.
4578
4579The libstdc++ atomic locking routines for MIPS targets requires MIPS II
4580and later.  A patch went in just after the GCC 3.3 release to
4581make @samp{mips*-*-*} use the generic implementation instead.  You can also
4582configure for @samp{mipsel-elf} as a workaround.  The
4583@samp{mips*-*-linux*} target continues to use the MIPS II routines.  More
4584work on this is expected in future releases.
4585
4586@c If you make --with-llsc the default for another target, please also
4587@c update the description of the --with-llsc option.
4588
4589The built-in @code{__sync_*} functions are available on MIPS II and
4590later systems and others that support the @samp{ll}, @samp{sc} and
4591@samp{sync} instructions.  This can be overridden by passing
4592@option{--with-llsc} or @option{--without-llsc} when configuring GCC.
4593Since the Linux kernel emulates these instructions if they are
4594missing, the default for @samp{mips*-*-linux*} targets is
4595@option{--with-llsc}.  The @option{--with-llsc} and
4596@option{--without-llsc} configure options may be overridden at compile
4597time by passing the @option{-mllsc} or @option{-mno-llsc} options to
4598the compiler.
4599
4600MIPS systems check for division by zero (unless
4601@option{-mno-check-zero-division} is passed to the compiler) by
4602generating either a conditional trap or a break instruction.  Using
4603trap results in smaller code, but is only supported on MIPS II and
4604later.  Also, some versions of the Linux kernel have a bug that
4605prevents trap from generating the proper signal (@code{SIGFPE}).  To enable
4606the use of break, use the @option{--with-divide=breaks}
4607@command{configure} option when configuring GCC@.  The default is to
4608use traps on systems that support them.
4609
4610@html
4611<hr />
4612@end html
4613@anchor{moxie-x-elf}
4614@heading moxie-*-elf
4615The moxie processor.
4616
4617@html
4618<hr />
4619@end html
4620@anchor{msp430-x-elf}
4621@heading msp430-*-elf*
4622TI MSP430 processor.
4623This configuration is intended for embedded systems.
4624
4625@samp{msp430-*-elf} is the standard configuration with most GCC
4626features enabled by default.
4627
4628@samp{msp430-*-elfbare} is tuned for a bare-metal environment, and disables
4629features related to shared libraries and other functionality not used for
4630this device.  This reduces code and data usage of the GCC libraries, resulting
4631in a minimal run-time environment by default.
4632
4633Features disabled by default include:
4634@itemize
4635@item transactional memory
4636@item __cxa_atexit
4637@end itemize
4638
4639@html
4640<hr />
4641@end html
4642@anchor{nds32le-x-elf}
4643@heading nds32le-*-elf
4644Andes NDS32 target in little endian mode.
4645
4646@html
4647<hr />
4648@end html
4649@anchor{nds32be-x-elf}
4650@heading nds32be-*-elf
4651Andes NDS32 target in big endian mode.
4652
4653@html
4654<hr />
4655@end html
4656@anchor{nvptx-x-none}
4657@heading nvptx-*-none
4658Nvidia PTX target.
4659
4660Instead of GNU binutils, you will need to install
4661@uref{https://github.com/MentorEmbedded/nvptx-tools/,,nvptx-tools}.
4662Tell GCC where to find it:
4663@option{--with-build-time-tools=[install-nvptx-tools]/nvptx-none/bin}.
4664
4665You will need newlib 3.1.0 or later.  It can be
4666automatically built together with GCC@.  For this, add a symbolic link
4667to nvptx-newlib's @file{newlib} directory to the directory containing
4668the GCC sources.
4669
4670Use the @option{--disable-sjlj-exceptions} and
4671@option{--enable-newlib-io-long-long} options when configuring.
4672
4673@html
4674<hr />
4675@end html
4676@anchor{or1k-x-elf}
4677@heading or1k-*-elf
4678The OpenRISC 1000 32-bit processor with delay slots.
4679This configuration is intended for embedded systems.
4680
4681@html
4682<hr />
4683@end html
4684@anchor{or1k-x-linux}
4685@heading or1k-*-linux
4686The OpenRISC 1000 32-bit processor with delay slots.
4687
4688@html
4689<hr />
4690@end html
4691@anchor{powerpc-x-x}
4692@heading powerpc-*-*
4693You can specify a default version for the @option{-mcpu=@var{cpu_type}}
4694switch by using the configure option @option{--with-cpu-@var{cpu_type}}.
4695
4696You will need GNU binutils 2.20 or newer.
4697
4698@html
4699<hr />
4700@end html
4701@anchor{powerpc-x-darwin}
4702@heading powerpc-*-darwin*
4703PowerPC running Darwin (Mac OS X kernel).
4704
4705Pre-installed versions of Mac OS X may not include any developer tools,
4706meaning that you will not be able to build GCC from source.  Tool
4707binaries are available at
4708@uref{https://opensource.apple.com}.
4709
4710This version of GCC requires at least cctools-590.36.  The
4711cctools-590.36 package referenced from
4712@uref{https://gcc.gnu.org/ml/gcc/2006-03/msg00507.html} will not work
4713on systems older than 10.3.9 (aka darwin7.9.0).
4714
4715@html
4716<hr />
4717@end html
4718@anchor{powerpc-x-elf}
4719@heading powerpc-*-elf
4720PowerPC system in big endian mode, running System V.4.
4721
4722@html
4723<hr />
4724@end html
4725@anchor{powerpc-x-linux-gnu}
4726@heading powerpc*-*-linux-gnu*
4727PowerPC system in big endian mode running Linux.
4728
4729@html
4730<hr />
4731@end html
4732@anchor{powerpc-x-netbsd}
4733@heading powerpc-*-netbsd*
4734PowerPC system in big endian mode running NetBSD@.
4735
4736@html
4737<hr />
4738@end html
4739@anchor{powerpc-x-eabisim}
4740@heading powerpc-*-eabisim
4741Embedded PowerPC system in big endian mode for use in running under the
4742PSIM simulator.
4743
4744@html
4745<hr />
4746@end html
4747@anchor{powerpc-x-eabi}
4748@heading powerpc-*-eabi
4749Embedded PowerPC system in big endian mode.
4750
4751@html
4752<hr />
4753@end html
4754@anchor{powerpcle-x-elf}
4755@heading powerpcle-*-elf
4756PowerPC system in little endian mode, running System V.4.
4757
4758@html
4759<hr />
4760@end html
4761@anchor{powerpcle-x-eabisim}
4762@heading powerpcle-*-eabisim
4763Embedded PowerPC system in little endian mode for use in running under
4764the PSIM simulator.
4765
4766@html
4767<hr />
4768@end html
4769@anchor{powerpcle-x-eabi}
4770@heading powerpcle-*-eabi
4771Embedded PowerPC system in little endian mode.
4772
4773@html
4774<hr />
4775@end html
4776@anchor{rl78-x-elf}
4777@heading rl78-*-elf
4778The Renesas RL78 processor.
4779This configuration is intended for embedded systems.
4780
4781@html
4782<hr />
4783@end html
4784@anchor{riscv32-x-elf}
4785@heading riscv32-*-elf
4786The RISC-V RV32 instruction set.
4787This configuration is intended for embedded systems.
4788This (and all other RISC-V) targets require the binutils 2.30 release.
4789
4790@html
4791<hr />
4792@end html
4793@anchor{riscv32-x-linux}
4794@heading riscv32-*-linux
4795The RISC-V RV32 instruction set running GNU/Linux.
4796This (and all other RISC-V) targets require the binutils 2.30 release.
4797
4798@html
4799<hr />
4800@end html
4801@anchor{riscv64-x-elf}
4802@heading riscv64-*-elf
4803The RISC-V RV64 instruction set.
4804This configuration is intended for embedded systems.
4805This (and all other RISC-V) targets require the binutils 2.30 release.
4806
4807@html
4808<hr />
4809@end html
4810@anchor{riscv64-x-linux}
4811@heading riscv64-*-linux
4812The RISC-V RV64 instruction set running GNU/Linux.
4813This (and all other RISC-V) targets require the binutils 2.30 release.
4814
4815@html
4816<hr />
4817@end html
4818@anchor{rx-x-elf}
4819@heading rx-*-elf
4820The Renesas RX processor.
4821
4822@html
4823<hr />
4824@end html
4825@anchor{s390-x-linux}
4826@heading s390-*-linux*
4827S/390 system running GNU/Linux for S/390@.
4828
4829@html
4830<hr />
4831@end html
4832@anchor{s390x-x-linux}
4833@heading s390x-*-linux*
4834zSeries system (64-bit) running GNU/Linux for zSeries@.
4835
4836@html
4837<hr />
4838@end html
4839@anchor{s390x-ibm-tpf}
4840@heading s390x-ibm-tpf*
4841zSeries system (64-bit) running TPF@.  This platform is
4842supported as cross-compilation target only.
4843
4844@html
4845<hr />
4846@end html
4847@c Please use Solaris 2 to refer to all release of Solaris, starting
4848@c with 2.0 until 2.6, 7, 8, etc.  Solaris 1 was a marketing name for
4849@c SunOS 4 releases which we don't use to avoid confusion.  Solaris
4850@c alone is too unspecific and must be avoided.
4851@anchor{x-x-solaris2}
4852@heading *-*-solaris2*
4853Support for Solaris 10 has been removed in GCC 10.  Support for Solaris
48549 has been removed in GCC 5.  Support for Solaris 8 has been removed in
4855GCC 4.8.  Support for Solaris 7 has been removed in GCC 4.6.
4856
4857Solaris 11.3 provides GCC 4.5.2, 4.7.3, and 4.8.2 as
4858@command{/usr/gcc/4.5/bin/gcc} or similar.  Newer Solaris versions
4859provide one or more of GCC 5, 7, and 9.  Alternatively,
4860you can install a pre-built GCC to bootstrap and install GCC.  See the
4861@uref{binaries.html,,binaries page} for details.
4862
4863The Solaris 2 @command{/bin/sh} will often fail to configure
4864@samp{libstdc++-v3}.  We therefore recommend using the
4865following initial sequence of commands
4866
4867@smallexample
4868% CONFIG_SHELL=/bin/ksh
4869% export CONFIG_SHELL
4870@end smallexample
4871
4872@noindent
4873and proceed as described in @uref{configure.html,,the configure instructions}.
4874In addition we strongly recommend specifying an absolute path to invoke
4875@command{@var{srcdir}/configure}.
4876
4877In Solaris 11, you need to check for @code{system/header},
4878@code{system/linker}, and @code{developer/assembler} packages.
4879
4880Trying to use the linker and other tools in
4881@file{/usr/ucb} to install GCC has been observed to cause trouble.
4882For example, the linker may hang indefinitely.  The fix is to remove
4883@file{/usr/ucb} from your @env{PATH}.
4884
4885The build process works more smoothly with the legacy Solaris tools so, if you
4886have @file{/usr/xpg4/bin} in your @env{PATH}, we recommend that you place
4887@file{/usr/bin} before @file{/usr/xpg4/bin} for the duration of the build.
4888
4889We recommend the use of the Solaris assembler or the GNU assembler, in
4890conjunction with the Solaris linker.  The GNU @command{as}
4891versions included in Solaris 11.3,
4892from GNU binutils 2.23.1 or newer (in @file{/usr/bin/gas} and
4893@file{/usr/gnu/bin/as}), are known to work.
4894The current version, from GNU binutils 2.34,
4895is known to work as well.  Note that your mileage may vary
4896if you use a combination of the GNU tools and the Solaris tools: while the
4897combination GNU @command{as} + Solaris @command{ld} should reasonably work,
4898the reverse combination Solaris @command{as} + GNU @command{ld} may fail to
4899build or cause memory corruption at runtime in some cases for C++ programs.
4900@c FIXME: still?
4901GNU @command{ld} usually works as well.  Again, the current
4902version (2.34) is known to work, but generally lacks platform specific
4903features, so better stay with Solaris @command{ld}.  To use the LTO linker
4904plugin (@option{-fuse-linker-plugin}) with GNU @command{ld}, GNU
4905binutils @emph{must} be configured with @option{--enable-largefile}.
4906
4907To enable symbol versioning in @samp{libstdc++} with the Solaris linker,
4908you need to have any version of GNU @command{c++filt}, which is part of
4909GNU binutils.  @samp{libstdc++} symbol versioning will be disabled if no
4910appropriate version is found.  Solaris @command{c++filt} from the Solaris
4911Studio compilers does @emph{not} work.
4912
4913In order to build the GNU D compiler, GDC, a working @samp{libphobos} is
4914needed.  That library wasn't built by default in GCC 9--11 on SPARC, or
4915on x86 when the Solaris assembler is used, but can be enabled by
4916configuring with @option{--enable-libphobos}.  Also, GDC 9.4.0 is
4917required on x86, while GDC 9.3.0 is known to work on SPARC.
4918
4919The versions of the GNU Multiple Precision Library (GMP), the MPFR
4920library and the MPC library bundled with Solaris 11.3 and later are
4921usually recent enough to match GCC's requirements.  There are two
4922caveats:
4923
4924@itemize @bullet
4925@item
4926While the version of the GMP library in Solaris 11.3 works with GCC, you
4927need to configure with @option{--with-gmp-include=/usr/include/gmp}.
4928
4929@item
4930The version of the MPFR libary included in Solaris 11.3 is too old; you
4931need to provide a more recent one.
4932
4933@end itemize
4934
4935@html
4936<hr />
4937@end html
4938@anchor{sparc-x-x}
4939@heading sparc*-*-*
4940This section contains general configuration information for all
4941SPARC-based platforms.  In addition to reading this section, please
4942read all other sections that match your target.
4943
4944Newer versions of the GNU Multiple Precision Library (GMP), the MPFR
4945library and the MPC library are known to be miscompiled by earlier
4946versions of GCC on these platforms.  We therefore recommend the use
4947of the exact versions of these libraries listed as minimal versions
4948in @uref{prerequisites.html,,the prerequisites}.
4949
4950@html
4951<hr />
4952@end html
4953@anchor{sparc-sun-solaris2}
4954@heading sparc-sun-solaris2*
4955When GCC is configured to use GNU binutils 2.14 or later, the binaries
4956produced are smaller than the ones produced using Solaris native tools;
4957this difference is quite significant for binaries containing debugging
4958information.
4959
4960Starting with Solaris 7, the operating system is capable of executing
496164-bit SPARC V9 binaries.  GCC 3.1 and later properly supports
4962this; the @option{-m64} option enables 64-bit code generation.
4963However, if all you want is code tuned for the UltraSPARC CPU, you
4964should try the @option{-mtune=ultrasparc} option instead, which produces
4965code that, unlike full 64-bit code, can still run on non-UltraSPARC
4966machines.
4967
4968When configuring the GNU Multiple Precision Library (GMP), the MPFR
4969library or the MPC library on a Solaris 7 or later system, the canonical
4970target triplet must be specified as the @command{build} parameter on the
4971configure line.  This target triplet can be obtained by invoking @command{./config.guess} in the toplevel source directory of GCC (and
4972not that of GMP or MPFR or MPC).  For example on a Solaris 11 system:
4973
4974@smallexample
4975% ./configure --build=sparc-sun-solaris2.11 --prefix=xxx
4976@end smallexample
4977
4978@html
4979<hr />
4980@end html
4981@anchor{sparc-x-linux}
4982@heading sparc-*-linux*
4983
4984@html
4985<hr />
4986@end html
4987@anchor{sparc64-x-solaris2}
4988@heading sparc64-*-solaris2*
4989When configuring a 64-bit-default GCC on Solaris/SPARC, you must use a
4990build compiler that generates 64-bit code, either by default or by
4991specifying @samp{CC='gcc -m64' CXX='gcc-m64'} to @command{configure}.
4992Additionally, you @emph{must} pass @option{--build=sparc64-sun-solaris2.11}
4993or @option{--build=sparcv9-sun-solaris2.11} because @file{config.guess}
4994misdetects this situation, which can cause build failures.
4995
4996When configuring the GNU Multiple Precision Library (GMP), the MPFR
4997library or the MPC library, the canonical target triplet must be specified
4998as the @command{build} parameter on the configure line.  For example
4999on a Solaris 11 system:
5000
5001@smallexample
5002% ./configure --build=sparc64-sun-solaris2.11 --prefix=xxx
5003@end smallexample
5004
5005@html
5006<hr />
5007@end html
5008@anchor{sparcv9-x-solaris2}
5009@heading sparcv9-*-solaris2*
5010This is a synonym for @samp{sparc64-*-solaris2*}.
5011
5012@html
5013<hr />
5014@end html
5015@anchor{c6x-x-x}
5016@heading c6x-*-*
5017The C6X family of processors. This port requires binutils-2.22 or newer.
5018
5019@html
5020<hr />
5021@end html
5022@anchor{tilegx-*-linux}
5023@heading tilegx-*-linux*
5024The TILE-Gx processor in little endian mode, running GNU/Linux.  This
5025port requires binutils-2.22 or newer.
5026
5027@html
5028<hr />
5029@end html
5030@anchor{tilegxbe-*-linux}
5031@heading tilegxbe-*-linux*
5032The TILE-Gx processor in big endian mode, running GNU/Linux.  This
5033port requires binutils-2.23 or newer.
5034
5035@html
5036<hr />
5037@end html
5038@anchor{tilepro-*-linux}
5039@heading tilepro-*-linux*
5040The TILEPro processor running GNU/Linux.  This port requires
5041binutils-2.22 or newer.
5042
5043@html
5044<hr />
5045@end html
5046@anchor{visium-x-elf}
5047@heading visium-*-elf
5048CDS VISIUMcore processor.
5049This configuration is intended for embedded systems.
5050
5051@html
5052<hr />
5053@end html
5054@anchor{x-x-vxworks}
5055@heading *-*-vxworks*
5056Support for VxWorks is in flux.  At present GCC supports @emph{only} the
5057very recent VxWorks 5.5 (aka Tornado 2.2) release, and only on PowerPC@.
5058We welcome patches for other architectures supported by VxWorks 5.5.
5059Support for VxWorks AE would also be welcome; we believe this is merely
5060a matter of writing an appropriate ``configlette'' (see below).  We are
5061not interested in supporting older, a.out or COFF-based, versions of
5062VxWorks in GCC 3.
5063
5064VxWorks comes with an older version of GCC installed in
5065@file{@var{$WIND_BASE}/host}; we recommend you do not overwrite it.
5066Choose an installation @var{prefix} entirely outside @var{$WIND_BASE}.
5067Before running @command{configure}, create the directories @file{@var{prefix}}
5068and @file{@var{prefix}/bin}.  Link or copy the appropriate assembler,
5069linker, etc.@: into @file{@var{prefix}/bin}, and set your @var{PATH} to
5070include that directory while running both @command{configure} and
5071@command{make}.
5072
5073You must give @command{configure} the
5074@option{--with-headers=@var{$WIND_BASE}/target/h} switch so that it can
5075find the VxWorks system headers.  Since VxWorks is a cross compilation
5076target only, you must also specify @option{--target=@var{target}}.
5077@command{configure} will attempt to create the directory
5078@file{@var{prefix}/@var{target}/sys-include} and copy files into it;
5079make sure the user running @command{configure} has sufficient privilege
5080to do so.
5081
5082GCC's exception handling runtime requires a special ``configlette''
5083module, @file{contrib/gthr_supp_vxw_5x.c}.  Follow the instructions in
5084that file to add the module to your kernel build.  (Future versions of
5085VxWorks will incorporate this module.)
5086
5087@html
5088<hr />
5089@end html
5090@anchor{x86-64-x-x}
5091@heading x86_64-*-*, amd64-*-*
5092GCC supports the x86-64 architecture implemented by the AMD64 processor
5093(amd64-*-* is an alias for x86_64-*-*) on GNU/Linux, FreeBSD and NetBSD@.
5094On GNU/Linux the default is a bi-arch compiler which is able to generate
5095both 64-bit x86-64 and 32-bit x86 code (via the @option{-m32} switch).
5096
5097@html
5098<hr />
5099@end html
5100@anchor{x86-64-x-solaris2}
5101@heading x86_64-*-solaris2*
5102GCC also supports the x86-64 architecture implemented by the AMD64
5103processor (@samp{amd64-*-*} is an alias for @samp{x86_64-*-*}) on
5104Solaris 10 or later.  Unlike other systems, without special options a
5105bi-arch compiler is built which generates 32-bit code by default, but
5106can generate 64-bit x86-64 code with the @option{-m64} switch.  Since
5107GCC 4.7, there is also a configuration that defaults to 64-bit code, but
5108can generate 32-bit code with @option{-m32}.  To configure and build
5109this way, you have to provide all support libraries like @file{libgmp}
5110as 64-bit code, configure with @option{--target=x86_64-pc-solaris2.11}
5111and @samp{CC=gcc -m64}.
5112
5113@html
5114<hr />
5115@end html
5116@anchor{xtensa-x-elf}
5117@heading xtensa*-*-elf
5118This target is intended for embedded Xtensa systems using the
5119@samp{newlib} C library.  It uses ELF but does not support shared
5120objects.  Designed-defined instructions specified via the
5121Tensilica Instruction Extension (TIE) language are only supported
5122through inline assembly.
5123
5124The Xtensa configuration information must be specified prior to
5125building GCC@.  The @file{include/xtensa-config.h} header
5126file contains the configuration information.  If you created your
5127own Xtensa configuration with the Xtensa Processor Generator, the
5128downloaded files include a customized copy of this header file,
5129which you can use to replace the default header file.
5130
5131@html
5132<hr />
5133@end html
5134@anchor{xtensa-x-linux}
5135@heading xtensa*-*-linux*
5136This target is for Xtensa systems running GNU/Linux.  It supports ELF
5137shared objects and the GNU C library (glibc).  It also generates
5138position-independent code (PIC) regardless of whether the
5139@option{-fpic} or @option{-fPIC} options are used.  In other
5140respects, this target is the same as the
5141@uref{#xtensa*-*-elf,,@samp{xtensa*-*-elf}} target.
5142
5143@html
5144<hr />
5145@end html
5146@anchor{windows}
5147@heading Microsoft Windows
5148
5149@subheading Intel 16-bit versions
5150The 16-bit versions of Microsoft Windows, such as Windows 3.1, are not
5151supported.
5152
5153However, the 32-bit port has limited support for Microsoft
5154Windows 3.11 in the Win32s environment, as a target only.  See below.
5155
5156@subheading Intel 32-bit versions
5157The 32-bit versions of Windows, including Windows 95, Windows NT, Windows
5158XP, and Windows Vista, are supported by several different target
5159platforms.  These targets differ in which Windows subsystem they target
5160and which C libraries are used.
5161
5162@itemize
5163@item Cygwin @uref{#x-x-cygwin,,*-*-cygwin}: Cygwin provides a user-space
5164Linux API emulation layer in the Win32 subsystem.
5165@item MinGW @uref{#x-x-mingw32,,*-*-mingw32}: MinGW is a native GCC port for
5166the Win32 subsystem that provides a subset of POSIX.
5167@item MKS i386-pc-mks: NuTCracker from MKS.  See
5168@uref{https://www.mkssoftware.com} for more information.
5169@end itemize
5170
5171@subheading Intel 64-bit versions
5172GCC contains support for x86-64 using the mingw-w64
5173runtime library, available from @uref{https://www.mingw-w64.org/downloads/}.
5174This library should be used with the target triple x86_64-pc-mingw32.
5175
5176@subheading Windows CE
5177Windows CE is supported as a target only on Hitachi
5178SuperH (sh-wince-pe), and MIPS (mips-wince-pe).
5179
5180@subheading Other Windows Platforms
5181GCC no longer supports Windows NT on the Alpha or PowerPC.
5182
5183GCC no longer supports the Windows POSIX subsystem.  However, it does
5184support the Interix subsystem.  See above.
5185
5186Old target names including *-*-winnt and *-*-windowsnt are no longer used.
5187
5188PW32 (i386-pc-pw32) support was never completed, and the project seems to
5189be inactive.  See @uref{http://pw32.sourceforge.net/} for more information.
5190
5191UWIN support has been removed due to a lack of maintenance.
5192
5193@html
5194<hr />
5195@end html
5196@anchor{x-x-cygwin}
5197@heading *-*-cygwin
5198Ports of GCC are included with the
5199@uref{http://www.cygwin.com/,,Cygwin environment}.
5200
5201GCC will build under Cygwin without modification; it does not build
5202with Microsoft's C++ compiler and there are no plans to make it do so.
5203
5204The Cygwin native compiler can be configured to target any 32-bit x86
5205cpu architecture desired; the default is i686-pc-cygwin.  It should be
5206used with as up-to-date a version of binutils as possible; use either
5207the latest official GNU binutils release in the Cygwin distribution,
5208or version 2.20 or above if building your own.
5209
5210@html
5211<hr />
5212@end html
5213@anchor{x-x-mingw32}
5214@heading *-*-mingw32
5215GCC will build with and support only MinGW runtime 3.12 and later.
5216Earlier versions of headers are incompatible with the new default semantics
5217of @code{extern inline} in @code{-std=c99} and @code{-std=gnu99} modes.
5218
5219To support emitting DWARF debugging info you need to use GNU binutils
5220version 2.16 or above containing support for the @code{.secrel32}
5221assembler pseudo-op.
5222
5223@html
5224<hr />
5225@end html
5226@anchor{older}
5227@heading Older systems
5228GCC contains support files for many older (1980s and early
52291990s) Unix variants.  For the most part, support for these systems
5230has not been deliberately removed, but it has not been maintained for
5231several years and may suffer from bitrot.
5232
5233Starting with GCC 3.1, each release has a list of ``obsoleted'' systems.
5234Support for these systems is still present in that release, but
5235@command{configure} will fail unless the @option{--enable-obsolete}
5236option is given.  Unless a maintainer steps forward, support for these
5237systems will be removed from the next release of GCC@.
5238
5239Support for old systems as hosts for GCC can cause problems if the
5240workarounds for compiler, library and operating system bugs affect the
5241cleanliness or maintainability of the rest of GCC@.  In some cases, to
5242bring GCC up on such a system, if still possible with current GCC, may
5243require first installing an old version of GCC which did work on that
5244system, and using it to compile a more recent GCC, to avoid bugs in the
5245vendor compiler.  Old releases of GCC 1 and GCC 2 are available in the
5246@file{old-releases} directory on the @uref{../mirrors.html,,GCC mirror
5247sites}.  Header bugs may generally be avoided using
5248@command{fixincludes}, but bugs or deficiencies in libraries and the
5249operating system may still cause problems.
5250
5251Support for older systems as targets for cross-compilation is less
5252problematic than support for them as hosts for GCC; if an enthusiast
5253wishes to make such a target work again (including resurrecting any of
5254the targets that never worked with GCC 2, starting from the last
5255version before they were removed), patches
5256@uref{../contribute.html,,following the usual requirements} would be
5257likely to be accepted, since they should not affect the support for more
5258modern targets.
5259
5260For some systems, old versions of GNU binutils may also be useful,
5261and are available from @file{pub/binutils/old-releases} on
5262@uref{https://sourceware.org/mirrors.html,,sourceware.org mirror sites}.
5263
5264Some of the information on specific systems above relates to
5265such older systems, but much of the information
5266about GCC on such systems (which may no longer be applicable to
5267current GCC) is to be found in the GCC texinfo manual.
5268
5269@html
5270<hr />
5271@end html
5272@anchor{elf}
5273@heading all ELF targets (SVR4, Solaris 2, etc.)
5274C++ support is significantly better on ELF targets if you use the
5275@uref{./configure.html#with-gnu-ld,,GNU linker}; duplicate copies of
5276inlines, vtables and template instantiations will be discarded
5277automatically.
5278
5279
5280@html
5281<hr />
5282<p>
5283@end html
5284@ifhtml
5285@uref{./index.html,,Return to the GCC Installation page}
5286@end ifhtml
5287@end ifset
5288
5289@c ***GFDL********************************************************************
5290@ifset gfdlhtml
5291@include fdl.texi
5292@html
5293<hr />
5294<p>
5295@end html
5296@ifhtml
5297@uref{./index.html,,Return to the GCC Installation page}
5298@end ifhtml
5299@end ifset
5300
5301@c ***************************************************************************
5302@c Part 6 The End of the Document
5303@ifinfo
5304@comment node-name,     next,          previous, up
5305@node    Concept Index, , GNU Free Documentation License, Top
5306@end ifinfo
5307
5308@ifinfo
5309@unnumbered Concept Index
5310
5311@printindex cp
5312
5313@contents
5314@end ifinfo
5315@bye
5316