gccinstall: Prerequisites
1
1 2 Prerequisites
1 ***************
1
1 GCC requires that various tools and packages be available for use in the
1 build procedure. Modifying GCC sources requires additional tools
1 described below.
1
1 Tools/packages necessary for building GCC
1 =========================================
1
1 ISO C++98 compiler
1 Necessary to bootstrap GCC, although versions of GCC prior to 4.8
1 also allow bootstrapping with a ISO C89 compiler and versions of
1 GCC prior to 3.4 also allow bootstrapping with a traditional (K&R)
1 C compiler.
1
1 To build all languages in a cross-compiler or other configuration
1 where 3-stage bootstrap is not performed, you need to start with an
1 existing GCC binary (version 3.4 or later) because source code for
1 language frontends other than C might use GCC extensions.
1
1 Note that to bootstrap GCC with versions of GCC earlier than 3.4,
1 you may need to use '--disable-stage1-checking', though
1 bootstrapping the compiler with such earlier compilers is strongly
1 discouraged.
1
1 C standard library and headers
1
1 In order to build GCC, the C standard library and headers must be
1 present for all target variants for which target libraries will be
1 built (and not only the variant of the host C++ compiler).
1
1 This affects the popular 'x86_64-unknown-linux-gnu' platform (among
1 other multilib targets), for which 64-bit ('x86_64') and 32-bit
1 ('i386') libc headers are usually packaged separately. If you do a
1 build of a native compiler on 'x86_64-unknown-linux-gnu', make sure
1 you either have the 32-bit libc developer package properly
1 installed (the exact name of the package depends on your distro) or
1 you must build GCC as a 64-bit only compiler by configuring with
1 the option '--disable-multilib'. Otherwise, you may encounter an
1 error such as 'fatal error: gnu/stubs-32.h: No such file'
1
1 GNAT
1
1 In order to build the Ada compiler (GNAT) you must already have
1 GNAT installed because portions of the Ada frontend are written in
1 Ada (with GNAT extensions.) Refer to the Ada installation
1 instructions for more specific information.
1
1 A "working" POSIX compatible shell, or GNU bash
1
1 Necessary when running 'configure' because some '/bin/sh' shells
1 have bugs and may crash when configuring the target libraries. In
1 other cases, '/bin/sh' or 'ksh' have disastrous corner-case
1 performance problems. This can cause target 'configure' runs to
1 literally take days to complete in some cases.
1
1 So on some platforms '/bin/ksh' is sufficient, on others it isn't.
1 See the host/target specific instructions for your platform, or use
1 'bash' to be sure. Then set 'CONFIG_SHELL' in your environment to
1 your "good" shell prior to running 'configure'/'make'.
1
1 'zsh' is not a fully compliant POSIX shell and will not work when
1 configuring GCC.
1
1 A POSIX or SVR4 awk
1
1 Necessary for creating some of the generated source files for GCC.
1 If in doubt, use a recent GNU awk version, as some of the older
1 ones are broken. GNU awk version 3.1.5 is known to work.
1
1 GNU binutils
1
1 Necessary in some circumstances, optional in others. See the
1 host/target specific instructions for your platform for the exact
1 requirements.
1
1 gzip version 1.2.4 (or later) or
1 bzip2 version 1.0.2 (or later)
1
1 Necessary to uncompress GCC 'tar' files when source code is
1 obtained via FTP mirror sites.
1
1 GNU make version 3.80 (or later)
1
1 You must have GNU make installed to build GCC.
1
1 GNU tar version 1.14 (or later)
1
1 Necessary (only on some platforms) to untar the source code. Many
1 systems' 'tar' programs will also work, only try GNU 'tar' if you
1 have problems.
1
1 Perl version between 5.6.1 and 5.6.24
1
1 Necessary when targeting Darwin, building 'libstdc++', and not
1 using '--disable-symvers'. Necessary when targeting Solaris 2 with
1 Sun 'ld' and not using '--disable-symvers'. The bundled 'perl' in
1 Solaris 8 and up works.
1
1 Necessary when regenerating 'Makefile' dependencies in libiberty.
1 Necessary when regenerating 'libiberty/functions.texi'. Necessary
1 when generating manpages from Texinfo manuals. Used by various
1 scripts to generate some files included in the source repository
1 (mainly Unicode-related and rarely changing) from source tables.
1
1 Used by 'automake'.
1
1 Several support libraries are necessary to build GCC, some are
1 required, others optional. While any sufficiently new version of
1 required tools usually work, library requirements are generally
1 stricter. Newer versions may work in some cases, but it's safer to use
1 the exact versions documented. We appreciate bug reports about problems
1 with newer versions, though. If your OS vendor provides packages for
1 the support libraries then using those packages may be the simplest way
1 to install the libraries.
1
1 GNU Multiple Precision Library (GMP) version 4.3.2 (or later)
1
1 Necessary to build GCC. If a GMP source distribution is found in a
1 subdirectory of your GCC sources named 'gmp', it will be built
1 together with GCC. Alternatively, if GMP is already installed but
1 it is not in your library search path, you will have to configure
1 with the '--with-gmp' configure option. See also '--with-gmp-lib'
1 and '--with-gmp-include'. The in-tree build is only supported with
1 the GMP version that download_prerequisites installs.
1
1 MPFR Library version 2.4.2 (or later)
1
1 Necessary to build GCC. It can be downloaded from
1 <http://www.mpfr.org/>. If an MPFR source distribution is found in
1 a subdirectory of your GCC sources named 'mpfr', it will be built
1 together with GCC. Alternatively, if MPFR is already installed but
1 it is not in your default library search path, the '--with-mpfr'
1 configure option should be used. See also '--with-mpfr-lib' and
1 '--with-mpfr-include'. The in-tree build is only supported with
1 the MPFR version that download_prerequisites installs.
1
1 MPC Library version 0.8.1 (or later)
1
1 Necessary to build GCC. It can be downloaded from
1 <http://www.multiprecision.org/>. If an MPC source distribution is
1 found in a subdirectory of your GCC sources named 'mpc', it will be
1 built together with GCC. Alternatively, if MPC is already installed
1 but it is not in your default library search path, the '--with-mpc'
1 configure option should be used. See also '--with-mpc-lib' and
1 '--with-mpc-include'. The in-tree build is only supported with the
1 MPC version that download_prerequisites installs.
1
1 isl Library version 0.15 or later.
1
1 Necessary to build GCC with the Graphite loop optimizations. It
1 can be downloaded from <ftp://gcc.gnu.org/pub/gcc/infrastructure/>.
1 If an isl source distribution is found in a subdirectory of your
1 GCC sources named 'isl', it will be built together with GCC.
1 Alternatively, the '--with-isl' configure option should be used if
1 isl is not installed in your default library search path.
1
1 Tools/packages necessary for modifying GCC
1 ==========================================
1
1 autoconf version 2.64
1 GNU m4 version 1.4.6 (or later)
1
1 Necessary when modifying 'configure.ac', 'aclocal.m4', etc. to
1 regenerate 'configure' and 'config.in' files.
1
1 automake version 1.11.6
1
1 Necessary when modifying a 'Makefile.am' file to regenerate its
1 associated 'Makefile.in'.
1
1 Much of GCC does not use automake, so directly edit the
1 'Makefile.in' file. Specifically this applies to the 'gcc',
1 'intl', 'libcpp', 'libiberty', 'libobjc' directories as well as any
1 of their subdirectories.
1
1 For directories that use automake, GCC requires the latest release
1 in the 1.11 series, which is currently 1.11.6. When regenerating a
1 directory to a newer version, please update all the directories
1 using an older 1.11 to the latest released version.
1
1 Note that 'automake' 1.11.6 is incompatible with 'perl' version
1 5.6.26.
1
1 gettext version 0.14.5 (or later)
1
1 Needed to regenerate 'gcc.pot'.
1
1 gperf version 2.7.2 (or later)
1
1 Necessary when modifying 'gperf' input files, e.g.
1 'gcc/cp/cfns.gperf' to regenerate its associated header file, e.g.
1 'gcc/cp/cfns.h'.
1
1 DejaGnu 1.4.4
1 Expect
1 Tcl
1
1 Necessary to run the GCC testsuite; see the section on testing for
1 details. Tcl 8.6 has a known regression in RE pattern handling
1 that make parts of the testsuite fail. See
1 <http://core.tcl.tk/tcl/tktview/267b7e2334ee2e9de34c4b00d6e72e2f1997085f>
1 for more information. This bug has been fixed in 8.6.1.
1
1 autogen version 5.5.4 (or later) and
1 guile version 1.4.1 (or later)
1
1 Necessary to regenerate 'fixinc/fixincl.x' from
1 'fixinc/inclhack.def' and 'fixinc/*.tpl'.
1
1 Necessary to run 'make check' for 'fixinc'.
1
1 Necessary to regenerate the top level 'Makefile.in' file from
1 'Makefile.tpl' and 'Makefile.def'.
1
1 Flex version 2.5.4 (or later)
1
1 Necessary when modifying '*.l' files.
1
1 Necessary to build GCC during development because the generated
1 output files are not included in the version-controlled source
1 repository. They are included in releases.
1
1 Texinfo version 4.7 (or later)
1
1 Necessary for running 'makeinfo' when modifying '*.texi' files to
1 test your changes.
1
1 Necessary for running 'make dvi' or 'make pdf' to create printable
1 documentation in DVI or PDF format. Texinfo version 4.8 or later
1 is required for 'make pdf'.
1
1 Necessary to build GCC documentation during development because the
1 generated output files are not included in the repository. They
1 are included in releases.
1
1 TeX (any working version)
1
1 Necessary for running 'texi2dvi' and 'texi2pdf', which are used
1 when running 'make dvi' or 'make pdf' to create DVI or PDF files,
1 respectively.
1
1 Sphinx version 1.0 (or later)
1
1 Necessary to regenerate 'jit/docs/_build/texinfo' from the '.rst'
1 files in the directories below 'jit/docs'.
1
1 git (any version)
1 SSH (any version)
1
1 Necessary to access the source repository. Public releases and
1 weekly snapshots of the development sources are also available via
1 HTTPS.
1
1 GNU diffutils version 2.7 (or later)
1
1 Useful when submitting patches for the GCC source code.
1
1 patch version 2.5.4 (or later)
1
1 Necessary when applying patches, created with 'diff', to one's own
1 sources.
1