Versions of GCC prior to 11 also allow bootstrapping with an ISO C++98 compiler, versions of GCC prior to 4.8 also allow bootstrapping with a ISO C89 compiler, and versions of GCC prior to 3.4 also allow bootstrapping with a traditional (K&R) C compiler.
To build all languages in a cross-compiler or other configuration where 3-stage bootstrap is not performed, you need to start with an existing GCC binary (version 4.8 or later) because source code for language frontends other than C might use GCC extensions.
Note that to bootstrap GCC with versions of GCC earlier than 4.8, you
may need to use --disable-stage1-checking, though
bootstrapping the compiler with such earlier compilers is strongly
discouraged.
This affects the popular `x86_64-pc-linux-gnu' platform (among
other multilib targets), for which 64-bit (`x86_64') and 32-bit
(`i386') libc headers are usually packaged separately. If you do a
build of a native compiler on `x86_64-pc-linux-gnu', make sure you
either have the 32-bit libc developer package properly installed (the exact
name of the package depends on your distro) or you must build GCC as a
64-bit only compiler by configuring with the option
--disable-multilib. Otherwise, you may encounter an error such as
`fatal error: gnu/stubs-32.h: No such file'
This includes GNAT tools such as gnatmake and gnatlink, since the Ada front end is written in Ada and uses some GNAT-specific extensions.
In order to build a cross compiler, it is strongly recommended to install the new compiler as native first, and then use it to build the cross compiler. Other native compiler versions may work but this is not guaranteed and will typically fail with hard to understand compilation errors during the build.
Similarly, it is strongly recommended to use an older version of GNAT to build GNAT. More recent versions of GNAT than the version built are not guaranteed to work and will often fail during the build with compilation errors.
Note that configure does not test whether the GNAT installation works and has a sufficiently recent version; if too old a GNAT version is installed and --enable-languages=ada is used, the build will fail.
ADA_INCLUDE_PATH and ADA_OBJECT_PATH environment variables
must not be set when building the Ada compiler, the Ada tools, or the
Ada runtime libraries. You can check that your build environment is clean
by verifying that `gnatls -v' lists only one explicit path in each
section.
So on some platforms /bin/ksh is sufficient, on others it isn't. See the host/target specific instructions for your platform, or use bash to be sure. Then set CONFIG_SHELL in your environment to your “good” shell prior to running configure/make.
zsh is not a fully compliant POSIX shell and will not
work when configuring GCC.
Necessary when regenerating Makefile dependencies in libiberty. Necessary when regenerating libiberty/functions.texi. Necessary when generating manpages from Texinfo manuals. Used by various scripts to generate some files included in the source repository (mainly Unicode-related and rarely changing) from source tables.
Used by automake.
Several support libraries are necessary to build GCC, some are required, others optional. While any sufficiently new version of required tools usually work, library requirements are generally stricter. Newer versions may work in some cases, but it's safer to use the exact versions documented. We appreciate bug reports about problems with newer versions, though. If your OS vendor provides packages for the support libraries then using those packages may be the simplest way to install the libraries.
Much of GCC does not use automake, so directly edit the Makefile.in file. Specifically this applies to the gcc, intl, libcpp, libiberty, libobjc directories as well as any of their subdirectories.
For directories that use automake, GCC requires the latest release in
the 1.15 series, which is currently 1.15.1. When regenerating a directory
to a newer version, please update all the directories using an older 1.15
to the latest released version.
Necessary to run the GCC testsuite; see the section on testing for
details.
Necessary to run `make check' for fixinc.
Necessary to regenerate the top level Makefile.in file from
Makefile.tpl and Makefile.def.
Necessary to build GCC during development because the generated output
files are not included in the version-controlled source repository.
They are included in releases.
Necessary for running make dvi or make pdf to create printable documentation in DVI or PDF format. Texinfo version 4.8 or later is required for make pdf.
Necessary to build GCC documentation during development because the
generated output files are not included in the repository. They are
included in releases.