Jump to: navigation, search
Navigation: > CTools > ICI 


Getting the source code

ICI source code is managed using Git, a distributed version control system. The main repository is hosted on under project name gcc-ici.

The simplest way of accessing the source code is to clone the main repository using the so-called clone URL of an existing repository. For ICI on Gitorious, the Git clone URL is git://

me@mymachine:somedir$ git clone git://

If your environment (company, university, hotel) does not let the Git traffic through, you can use the HTTP interface and the HTTP clone URL, which is

me@mymachine:somedir$ git clone

Whichever URL you use, this will create a directory named mainline in the current directory and populate it with an exact copy (a clone...) of the master branch from the main repository. The contents of other branches is downloaded as well, but by default it is not exposed to the user. The sections below explain how to access these "hidden" branches.

The repository is quite large - it contains approximately 180,000 files occupying 2.2 GB of disk space.  Git does a good job compressing it before the transfer by an average factor of 1:9, but keep in mind that this still leaves some 240MB to be effectively transferred.  Since the Gitorious site can sustain a bandwidth of approximately 2MBit/s, the cloning will take a minimum of 20 minutes - or longer, depending on the dowload speed of your connection.


Several third-party tools are needed to compile gfortran and GRAPHITE:

  • GMP 4.2.4
  • MPFR 2.3.2
  • PPL 0.10
  • CLOOG from GIT 20081130

Their sources are in the src_third_party.tar.gz archive in the GIT master branch. When this file is (g)unzipped and untarred relative to the mainline directory, all the sources are already in the proper directories to be built by the script.  If you have them installed already in system-wide locations, you can skip the building of dependencies and et the GCC configure script detect and use the system-wide installation(s).

Preparation phase: select and check out the branch you want to use

By default, the Git repository cloning step replicates the complete repository content, but shows only the master branch.  In order to use another branch, you have to tell Git to fetch and check out that branch from the repository copy.  This is a local action and does not require access to the Gitorious site:

Enter the mainline directory, then select the branch you want to build and check it out; e.g. gcc-submission:

me@mymachine:somedir$ cd mainline
me@mymachine:mainline$ git fetch git:// gcc-submission:gcc-submission
me@mymachine:mainline$ git branch                           # check that the branch is available locally
* gcc-4.2.4
me@mymachine:mainline$ git checkout gcc-submission          # check out the branch
Checking out files: 100% (94889/94889), done.
Switched to branch "gcc-submission"
me@mymachine:mainline$ git branch                           # check that the branch was changed correctly
* gcc-submission

Automated build ("master" and "gcc-submission" branch)

Step 1: Select and check out the branch you want to build from (cf. above).

Step 2: untar the third-party sources

me@mymachine:mainline$ mkdir ../build/gcc-ici
me@mymachine:mainline$ cd ../build/gcc-ici

Step 3: Run the script located in the mainline directory. The default installation prefix is ../install-x8664 and can be changed by editing the BUILDEXT and BUILDDIR variables in the script.

me@mymachine:mainline$ ./
... output from the script ...

The build will take a substantial amount of time - one hour or more, depending on your hardware (number of cores, amount and speed of memory, etc.). You may want to consider using the ccache utility (available in most Linux/*BSD distributions and here) to speed up the build process.

Classical GCC-style build ("gcc-4.2.4" branch - and others, if you fancy it :-)

Once the gcc-4.2.4 branch of GCC ICI is checked out, the build process follows the regular GCC build procedure.  This is done in order to minimize the change in production environments, so that an ICI-enabled GCC 4.2.4 can be easily substituted in place of the official GCC 4.2.4 release.

Step 1: Select, update and check out the "gcc-4.2.4" branch from the local Git repository

me@mymachine:somedir$ cd mainline
me@mymachine:mainline$ git fetch git:// gcc-4.2.4:gcc-4.2.4
From git://
me@mymachine:mainline$ git checkout gcc-4.2.4
Checking out files: 100% (95526/95526), done.

Step 2: Select/create a build directory outside the source tree that will hold the build and cd to it

me@mymachine:mainline$ mkdir ../build
me@mymachine:mainline$ cd ../build

Step 3: Configure, build and install GCC as usual

me@mymachine:build$ ../mainline/trunk/configure --prefix=<installation_prefix> [other configure options]
... output from configure ...
me@mymachine:build$ make
... output from make ...
me@mymachine:build$ make install
... output from make install ...

At this point you're done building GCC with plugin support.  The next step is configuring the plugin environment...

Useful links, tips, and tricks

Locations of visitors to this page