Home | History | Annotate | Line # | Download | only in INSTALL
prerequisites.html revision 1.1
      1  1.1  mrg <html lang="en">
      2  1.1  mrg <head>
      3  1.1  mrg <title>Prerequisites for GCC</title>
      4  1.1  mrg <meta http-equiv="Content-Type" content="text/html">
      5  1.1  mrg <meta name="description" content="Prerequisites for GCC">
      6  1.1  mrg <meta name="generator" content="makeinfo 4.12">
      7  1.1  mrg <link title="Top" rel="top" href="#Top">
      8  1.1  mrg <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
      9  1.1  mrg <!--
     10  1.1  mrg Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
     11  1.1  mrg 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
     12  1.1  mrg 2009, 2010, 2011 Free Software Foundation, Inc.
     13  1.1  mrg 
     14  1.1  mrg    Permission is granted to copy, distribute and/or modify this document
     15  1.1  mrg under the terms of the GNU Free Documentation License, Version 1.2 or
     16  1.1  mrg any later version published by the Free Software Foundation; with no
     17  1.1  mrg Invariant Sections, the Front-Cover texts being (a) (see below), and
     18  1.1  mrg with the Back-Cover Texts being (b) (see below).  A copy of the
     19  1.1  mrg license is included in the section entitled "GNU Free Documentation License".
     20  1.1  mrg 
     21  1.1  mrg (a) The FSF's Front-Cover Text is:
     22  1.1  mrg 
     23  1.1  mrg      A GNU Manual
     24  1.1  mrg 
     25  1.1  mrg (b) The FSF's Back-Cover Text is:
     26  1.1  mrg 
     27  1.1  mrg      You have freedom to copy and modify this GNU Manual, like GNU
     28  1.1  mrg      software.  Copies published by the Free Software Foundation raise
     29  1.1  mrg      funds for GNU development.-->
     30  1.1  mrg <meta http-equiv="Content-Style-Type" content="text/css">
     31  1.1  mrg <style type="text/css"><!--
     32  1.1  mrg   pre.display { font-family:inherit }
     33  1.1  mrg   pre.format  { font-family:inherit }
     34  1.1  mrg   pre.smalldisplay { font-family:inherit; font-size:smaller }
     35  1.1  mrg   pre.smallformat  { font-family:inherit; font-size:smaller }
     36  1.1  mrg   pre.smallexample { font-size:smaller }
     37  1.1  mrg   pre.smalllisp    { font-size:smaller }
     38  1.1  mrg   span.sc    { font-variant:small-caps }
     39  1.1  mrg   span.roman { font-family:serif; font-weight:normal; } 
     40  1.1  mrg   span.sansserif { font-family:sans-serif; font-weight:normal; } 
     41  1.1  mrg --></style>
     42  1.1  mrg </head>
     43  1.1  mrg <body>
     44  1.1  mrg <h1 class="settitle">Prerequisites for GCC</h1>
     45  1.1  mrg <a name="index-Prerequisites-1"></a>
     46  1.1  mrg GCC requires that various tools and packages be available for use in the
     47  1.1  mrg build procedure.  Modifying GCC sources requires additional tools
     48  1.1  mrg described below.
     49  1.1  mrg 
     50  1.1  mrg <h3 class="heading"><a name="TOC0"></a>Tools/packages necessary for building GCC</h3>
     51  1.1  mrg 
     52  1.1  mrg      <dl>
     53  1.1  mrg <dt>ISO C90 compiler<dd>Necessary to bootstrap GCC, although versions of GCC prior
     54  1.1  mrg to 3.4 also allow bootstrapping with a traditional (K&amp;R) C compiler.
     55  1.1  mrg 
     56  1.1  mrg      <p>To build all languages in a cross-compiler or other configuration where
     57  1.1  mrg 3-stage bootstrap is not performed, you need to start with an existing
     58  1.1  mrg GCC binary (version 2.95 or later) because source code for language
     59  1.1  mrg frontends other than C might use GCC extensions.
     60  1.1  mrg 
     61  1.1  mrg      <br><dt>GNAT<dd>
     62  1.1  mrg In order to build the Ada compiler (GNAT) you must already have GNAT
     63  1.1  mrg installed because portions of the Ada frontend are written in Ada (with
     64  1.1  mrg GNAT extensions.)  Refer to the Ada installation instructions for more
     65  1.1  mrg specific information.
     66  1.1  mrg 
     67  1.1  mrg      <br><dt>A &ldquo;working&rdquo; POSIX compatible shell, or GNU bash<dd>
     68  1.1  mrg Necessary when running <samp><span class="command">configure</span></samp> because some
     69  1.1  mrg <samp><span class="command">/bin/sh</span></samp> shells have bugs and may crash when configuring the
     70  1.1  mrg target libraries.  In other cases, <samp><span class="command">/bin/sh</span></samp> or <samp><span class="command">ksh</span></samp>
     71  1.1  mrg have disastrous corner-case performance problems.  This
     72  1.1  mrg can cause target <samp><span class="command">configure</span></samp> runs to literally take days to
     73  1.1  mrg complete in some cases.
     74  1.1  mrg 
     75  1.1  mrg      <p>So on some platforms <samp><span class="command">/bin/ksh</span></samp> is sufficient, on others it
     76  1.1  mrg isn't.  See the host/target specific instructions for your platform, or
     77  1.1  mrg use <samp><span class="command">bash</span></samp> to be sure.  Then set <samp><span class="env">CONFIG_SHELL</span></samp> in your
     78  1.1  mrg environment to your &ldquo;good&rdquo; shell prior to running
     79  1.1  mrg <samp><span class="command">configure</span></samp>/<samp><span class="command">make</span></samp>.
     80  1.1  mrg 
     81  1.1  mrg      <p><samp><span class="command">zsh</span></samp> is not a fully compliant POSIX shell and will not
     82  1.1  mrg work when configuring GCC.
     83  1.1  mrg 
     84  1.1  mrg      <br><dt>A POSIX or SVR4 awk<dd>
     85  1.1  mrg Necessary for creating some of the generated source files for GCC. 
     86  1.1  mrg If in doubt, use a recent GNU awk version, as some of the older ones
     87  1.1  mrg are broken.  GNU awk version 3.1.5 is known to work.
     88  1.1  mrg 
     89  1.1  mrg      <br><dt>GNU binutils<dd>
     90  1.1  mrg Necessary in some circumstances, optional in others.  See the
     91  1.1  mrg host/target specific instructions for your platform for the exact
     92  1.1  mrg requirements.
     93  1.1  mrg 
     94  1.1  mrg      <br><dt>gzip version 1.2.4 (or later) or<dt>bzip2 version 1.0.2 (or later)<dd>
     95  1.1  mrg Necessary to uncompress GCC <samp><span class="command">tar</span></samp> files when source code is
     96  1.1  mrg obtained via FTP mirror sites.
     97  1.1  mrg 
     98  1.1  mrg      <br><dt>GNU make version 3.80 (or later)<dd>
     99  1.1  mrg You must have GNU make installed to build GCC.
    100  1.1  mrg 
    101  1.1  mrg      <br><dt>GNU tar version 1.14 (or later)<dd>
    102  1.1  mrg Necessary (only on some platforms) to untar the source code.  Many
    103  1.1  mrg systems' <samp><span class="command">tar</span></samp> programs will also work, only try GNU
    104  1.1  mrg <samp><span class="command">tar</span></samp> if you have problems.
    105  1.1  mrg 
    106  1.1  mrg      <br><dt>GNU Multiple Precision Library (GMP) version 4.3.2 (or later)<dd>
    107  1.1  mrg Necessary to build GCC.  If you do not have it installed in your
    108  1.1  mrg library search path, you will have to configure with the
    109  1.1  mrg <samp><span class="option">--with-gmp</span></samp> configure option.  See also <samp><span class="option">--with-gmp-lib</span></samp>
    110  1.1  mrg and <samp><span class="option">--with-gmp-include</span></samp>.  Alternatively, if a GMP source
    111  1.1  mrg distribution is found in a subdirectory of your GCC sources named
    112  1.1  mrg <samp><span class="file">gmp</span></samp>, it will be built together with GCC.
    113  1.1  mrg 
    114  1.1  mrg      <br><dt>MPFR Library version 2.4.2 (or later)<dd>
    115  1.1  mrg Necessary to build GCC.  It can be downloaded from
    116  1.1  mrg <a href="http://www.mpfr.org/">http://www.mpfr.org/</a>.  The <samp><span class="option">--with-mpfr</span></samp> configure
    117  1.1  mrg option should be used if your MPFR Library is not installed in your
    118  1.1  mrg default library search path.  See also <samp><span class="option">--with-mpfr-lib</span></samp> and
    119  1.1  mrg <samp><span class="option">--with-mpfr-include</span></samp>.  Alternatively, if a MPFR source
    120  1.1  mrg distribution is found in a subdirectory of your GCC sources named
    121  1.1  mrg <samp><span class="file">mpfr</span></samp>, it will be built together with GCC.
    122  1.1  mrg 
    123  1.1  mrg      <br><dt>MPC Library version 0.8.1 (or later)<dd>
    124  1.1  mrg Necessary to build GCC.  It can be downloaded from
    125  1.1  mrg <a href="http://www.multiprecision.org/">http://www.multiprecision.org/</a>.  The <samp><span class="option">--with-mpc</span></samp>
    126  1.1  mrg configure option should be used if your MPC Library is not installed
    127  1.1  mrg in your default library search path.  See also <samp><span class="option">--with-mpc-lib</span></samp>
    128  1.1  mrg and <samp><span class="option">--with-mpc-include</span></samp>.  Alternatively, if an MPC source
    129  1.1  mrg distribution is found in a subdirectory of your GCC sources named
    130  1.1  mrg <samp><span class="file">mpc</span></samp>, it will be built together with GCC.
    131  1.1  mrg 
    132  1.1  mrg      <br><dt>Parma Polyhedra Library (PPL) version 0.10<dd>
    133  1.1  mrg Necessary to build GCC with the Graphite loop optimizations. 
    134  1.1  mrg It can be downloaded from <a href="http://www.cs.unipr.it/ppl/Download/">http://www.cs.unipr.it/ppl/Download/</a>.
    135  1.1  mrg 
    136  1.1  mrg      <p>The <samp><span class="option">--with-ppl</span></samp> configure option should be used if PPL is not
    137  1.1  mrg installed in your default library search path.
    138  1.1  mrg 
    139  1.1  mrg      <br><dt>CLooG-PPL version 0.15<dd>
    140  1.1  mrg Necessary to build GCC with the Graphite loop optimizations.  It can
    141  1.1  mrg be downloaded from <a href="ftp://gcc.gnu.org/pub/gcc/infrastructure/">ftp://gcc.gnu.org/pub/gcc/infrastructure/</a>. 
    142  1.1  mrg The code in <samp><span class="file">cloog-ppl-0.15.tar.gz</span></samp> comes from a branch of CLooG
    143  1.1  mrg available from <a href="http://repo.or.cz/w/cloog-ppl.git">http://repo.or.cz/w/cloog-ppl.git</a>.  CLooG-PPL
    144  1.1  mrg should be configured with <samp><span class="option">--with-ppl</span></samp>.
    145  1.1  mrg 
    146  1.1  mrg      <p>The <samp><span class="option">--with-cloog</span></samp> configure option should be used if CLooG is
    147  1.1  mrg not installed in your default library search path.
    148  1.1  mrg 
    149  1.1  mrg      <br><dt><samp><span class="command">jar</span></samp>, or InfoZIP (<samp><span class="command">zip</span></samp> and <samp><span class="command">unzip</span></samp>)<dd>
    150  1.1  mrg Necessary to build libgcj, the GCJ runtime.
    151  1.1  mrg 
    152  1.1  mrg      <br><dt>libelf version 0.8.12 (or later)<dd>
    153  1.1  mrg Necessary to build link-time optimization (LTO) support.  It can be
    154  1.1  mrg downloaded from <a href="http://www.mr511.de/software/libelf-0.8.12.tar.gz">http://www.mr511.de/software/libelf-0.8.12.tar.gz</a>,
    155  1.1  mrg though it is commonly available in several systems.  The versions in
    156  1.1  mrg IRIX 5 and 6 don't work since they lack <samp><span class="file">gelf.h</span></samp>.  The version in
    157  1.1  mrg Solaris 2 does work.
    158  1.1  mrg 
    159  1.1  mrg      <p>The <samp><span class="option">--with-libelf</span></samp> configure option should be used if libelf is
    160  1.1  mrg not installed in your default library search patch.
    161  1.1  mrg 
    162  1.1  mrg </dl>
    163  1.1  mrg 
    164  1.1  mrg <h3 class="heading"><a name="TOC1"></a>Tools/packages necessary for modifying GCC</h3>
    165  1.1  mrg 
    166  1.1  mrg      <dl>
    167  1.1  mrg <dt>autoconf version 2.64<dt>GNU m4 version 1.4.6 (or later)<dd>
    168  1.1  mrg Necessary when modifying <samp><span class="file">configure.ac</span></samp>, <samp><span class="file">aclocal.m4</span></samp>, etc. 
    169  1.1  mrg to regenerate <samp><span class="file">configure</span></samp> and <samp><span class="file">config.in</span></samp> files.
    170  1.1  mrg 
    171  1.1  mrg      <br><dt>automake version 1.11.1<dd>
    172  1.1  mrg Necessary when modifying a <samp><span class="file">Makefile.am</span></samp> file to regenerate its
    173  1.1  mrg associated <samp><span class="file">Makefile.in</span></samp>.
    174  1.1  mrg 
    175  1.1  mrg      <p>Much of GCC does not use automake, so directly edit the <samp><span class="file">Makefile.in</span></samp>
    176  1.1  mrg file.  Specifically this applies to the <samp><span class="file">gcc</span></samp>, <samp><span class="file">intl</span></samp>,
    177  1.1  mrg <samp><span class="file">libcpp</span></samp>, <samp><span class="file">libiberty</span></samp>, <samp><span class="file">libobjc</span></samp> directories as well
    178  1.1  mrg as any of their subdirectories.
    179  1.1  mrg 
    180  1.1  mrg      <p>For directories that use automake, GCC requires the latest release in
    181  1.1  mrg the 1.11 series, which is currently 1.11.1.  When regenerating a directory
    182  1.1  mrg to a newer version, please update all the directories using an older 1.11
    183  1.1  mrg to the latest released version.
    184  1.1  mrg 
    185  1.1  mrg      <br><dt>gettext version 0.14.5 (or later)<dd>
    186  1.1  mrg Needed to regenerate <samp><span class="file">gcc.pot</span></samp>.
    187  1.1  mrg 
    188  1.1  mrg      <br><dt>gperf version 2.7.2 (or later)<dd>
    189  1.1  mrg Necessary when modifying <samp><span class="command">gperf</span></samp> input files, e.g. 
    190  1.1  mrg <samp><span class="file">gcc/cp/cfns.gperf</span></samp> to regenerate its associated header file, e.g. 
    191  1.1  mrg <samp><span class="file">gcc/cp/cfns.h</span></samp>.
    192  1.1  mrg 
    193  1.1  mrg      <br><dt>DejaGnu 1.4.4<dt>Expect<dt>Tcl<dd>
    194  1.1  mrg Necessary to run the GCC testsuite; see the section on testing for details.
    195  1.1  mrg 
    196  1.1  mrg      <br><dt>autogen version 5.5.4 (or later) and<dt>guile version 1.4.1 (or later)<dd>
    197  1.1  mrg Necessary to regenerate <samp><span class="file">fixinc/fixincl.x</span></samp> from
    198  1.1  mrg <samp><span class="file">fixinc/inclhack.def</span></samp> and <samp><span class="file">fixinc/*.tpl</span></samp>.
    199  1.1  mrg 
    200  1.1  mrg      <p>Necessary to run &lsquo;<samp><span class="samp">make check</span></samp>&rsquo; for <samp><span class="file">fixinc</span></samp>.
    201  1.1  mrg 
    202  1.1  mrg      <p>Necessary to regenerate the top level <samp><span class="file">Makefile.in</span></samp> file from
    203  1.1  mrg <samp><span class="file">Makefile.tpl</span></samp> and <samp><span class="file">Makefile.def</span></samp>.
    204  1.1  mrg 
    205  1.1  mrg      <br><dt>Flex version 2.5.4 (or later)<dd>
    206  1.1  mrg Necessary when modifying <samp><span class="file">*.l</span></samp> files.
    207  1.1  mrg 
    208  1.1  mrg      <p>Necessary to build GCC during development because the generated output
    209  1.1  mrg files are not included in the SVN repository.  They are included in
    210  1.1  mrg releases.
    211  1.1  mrg 
    212  1.1  mrg      <br><dt>Texinfo version 4.7 (or later)<dd>
    213  1.1  mrg Necessary for running <samp><span class="command">makeinfo</span></samp> when modifying <samp><span class="file">*.texi</span></samp>
    214  1.1  mrg files to test your changes.
    215  1.1  mrg 
    216  1.1  mrg      <p>Necessary for running <samp><span class="command">make dvi</span></samp> or <samp><span class="command">make pdf</span></samp> to
    217  1.1  mrg create printable documentation in DVI or PDF format.  Texinfo version
    218  1.1  mrg 4.8 or later is required for <samp><span class="command">make pdf</span></samp>.
    219  1.1  mrg 
    220  1.1  mrg      <p>Necessary to build GCC documentation during development because the
    221  1.1  mrg generated output files are not included in the SVN repository.  They are
    222  1.1  mrg included in releases.
    223  1.1  mrg 
    224  1.1  mrg      <br><dt>TeX (any working version)<dd>
    225  1.1  mrg Necessary for running <samp><span class="command">texi2dvi</span></samp> and <samp><span class="command">texi2pdf</span></samp>, which
    226  1.1  mrg are used when running <samp><span class="command">make dvi</span></samp> or <samp><span class="command">make pdf</span></samp> to create
    227  1.1  mrg DVI or PDF files, respectively.
    228  1.1  mrg 
    229  1.1  mrg      <br><dt>SVN (any version)<dt>SSH (any version)<dd>
    230  1.1  mrg Necessary to access the SVN repository.  Public releases and weekly
    231  1.1  mrg snapshots of the development sources are also available via FTP.
    232  1.1  mrg 
    233  1.1  mrg      <br><dt>Perl version 5.6.1 (or later)<dd>
    234  1.1  mrg Necessary when regenerating <samp><span class="file">Makefile</span></samp> dependencies in libiberty. 
    235  1.1  mrg Necessary when regenerating <samp><span class="file">libiberty/functions.texi</span></samp>. 
    236  1.1  mrg Necessary when generating manpages from Texinfo manuals. 
    237  1.1  mrg Necessary when targetting Darwin, building libstdc++,
    238  1.1  mrg and not using <samp><span class="option">--disable-symvers</span></samp>. 
    239  1.1  mrg Used by various scripts to generate some files included in SVN (mainly
    240  1.1  mrg Unicode-related and rarely changing) from source tables.
    241  1.1  mrg 
    242  1.1  mrg      <br><dt>GNU diffutils version 2.7 (or later)<dd>
    243  1.1  mrg Useful when submitting patches for the GCC source code.
    244  1.1  mrg 
    245  1.1  mrg      <br><dt>patch version 2.5.4 (or later)<dd>
    246  1.1  mrg Necessary when applying patches, created with <samp><span class="command">diff</span></samp>, to one's
    247  1.1  mrg own sources.
    248  1.1  mrg 
    249  1.1  mrg      <br><dt>ecj1<dt>gjavah<dd>
    250  1.1  mrg If you wish to modify <samp><span class="file">.java</span></samp> files in libjava, you will need to
    251  1.1  mrg configure with <samp><span class="option">--enable-java-maintainer-mode</span></samp>, and you will need
    252  1.1  mrg to have executables named <samp><span class="command">ecj1</span></samp> and <samp><span class="command">gjavah</span></samp> in your path. 
    253  1.1  mrg The <samp><span class="command">ecj1</span></samp> executable should run the Eclipse Java compiler via
    254  1.1  mrg the GCC-specific entry point.  You can download a suitable jar from
    255  1.1  mrg <a href="ftp://sourceware.org/pub/java/">ftp://sourceware.org/pub/java/</a>, or by running the script
    256  1.1  mrg <samp><span class="command">contrib/download_ecj</span></samp>.
    257  1.1  mrg 
    258  1.1  mrg      <br><dt>antlr.jar version 2.7.1 (or later)<dt>antlr binary<dd>
    259  1.1  mrg If you wish to build the <samp><span class="command">gjdoc</span></samp> binary in libjava, you will
    260  1.1  mrg need to have an <samp><span class="file">antlr.jar</span></samp> library available. The library is
    261  1.1  mrg searched in system locations but can be configured with
    262  1.1  mrg <samp><span class="option">--with-antlr-jar=</span></samp> instead.  When configuring with
    263  1.1  mrg <samp><span class="option">--enable-java-maintainer-mode</span></samp>, you will need to have one of
    264  1.1  mrg the executables named <samp><span class="command">cantlr</span></samp>, <samp><span class="command">runantlr</span></samp> or
    265  1.1  mrg <samp><span class="command">antlr</span></samp> in your path.
    266  1.1  mrg 
    267  1.1  mrg </dl>
    268  1.1  mrg 
    269  1.1  mrg    <p><hr />
    270  1.1  mrg <p><a href="./index.html">Return to the GCC Installation page</a>
    271  1.1  mrg 
    272  1.1  mrg <!-- ***Downloading the source************************************************** -->
    273  1.1  mrg <!-- ***Configuration*********************************************************** -->
    274  1.1  mrg <!-- ***Building**************************************************************** -->
    275  1.1  mrg <!-- ***Testing***************************************************************** -->
    276  1.1  mrg <!-- ***Final install*********************************************************** -->
    277  1.1  mrg <!-- ***Binaries**************************************************************** -->
    278  1.1  mrg <!-- ***Specific**************************************************************** -->
    279  1.1  mrg <!-- ***Old documentation****************************************************** -->
    280  1.1  mrg <!-- ***GFDL******************************************************************** -->
    281  1.1  mrg <!-- *************************************************************************** -->
    282  1.1  mrg <!-- Part 6 The End of the Document -->
    283  1.1  mrg </body></html>
    284  1.1  mrg 
    285