Created
September 23, 2012 19:48
-
-
Save mantognini/3772804 to your computer and use it in GitHub Desktop.
Build GCC 4.6.3 -- How To
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| ## Build GCC 4.6.3 -- How To | |
| ## for icvdi.epfl.ch Ubuntu 10.04 VMs | |
| ## (without sudo command) | |
| ## | |
| ## 22.09.2012 | |
| ## Marco Antognini | |
| ## | |
| ## Based on | |
| ## http://gcc.gnu.org/install/ | |
| ## and INSTALL directory of downloaded GCC source | |
| ## | |
| ## everything will be installed into <somewhere>/root | |
| ## Read everything before doing anything; especially the not at the end | |
| ## In a tcsh shell run the following commands | |
| ## You can use other shell as well, just remember to translate 'setenv' command | |
| ## to something meaningful for your shell; like 'export var=val' in sh. | |
| ### Initial setup | |
| cd <somewhere> | |
| mkdir root | |
| cd root | |
| setenv PREFIX `pwd` | |
| cd .. | |
| mkdir tools | |
| cd tools | |
| ### GMP : http://gmplib.org/ | |
| mkdir gmp | |
| cd gmp | |
| wget ftp://ftp.gmplib.org/pub/gmp-5.0.5/gmp-5.0.5.tar.bz2 | |
| tar -xf gmp-5.0.5.tar.bz2 | |
| cd gmp-5.0.5 | |
| ./configure --prefix=$PREFIX --enable-cxx | |
| make -j 2 | |
| #optional: make check | |
| make install | |
| cd ../.. | |
| ### PPL : http://bugseng.com/products/ppl/ | |
| mkdir ppl | |
| cd ppl | |
| #wget ftp://ftp.cs.unipr.it/pub/ppl/releases/1.0/ppl-1.0.tar.bz2 | |
| #tar -xf ppl-1.0.tar.bz2 | |
| #cd ppl-1.0 | |
| ## apparently ppl 1.0 is too recent and is not supported by gcc 4.6 | |
| wget ftp://ftp.cs.unipr.it/pub/ppl/releases/0.11.2/ppl-0.11.2.tar.bz2 | |
| tar -xf ppl-0.11.2.tar.bz2 | |
| cd ppl-0.11.2 | |
| ./configure --prefix=$PREFIX --with-gmp=$PREFIX | |
| make -j 2 | |
| make install | |
| setenv LD_LIBRARY_PATH $PREFIX/lib | |
| cd ../.. | |
| ### MPFR : http://www.mpfr.org/ | |
| mkdir mpfr | |
| cd mpfr | |
| wget http://www.mpfr.org/mpfr-current/mpfr-3.1.1.tar.bz2 | |
| tar -xf mpfr-3.1.1.tar.bz2 | |
| cd mpfr-3.1.1 | |
| ./configure --prefix=$PREFIX --with-gmp=$PREFIX | |
| make -j 2 | |
| #optional: make check | |
| make install | |
| cd ../.. | |
| ### MPC : http://www.multiprecision.org/ | |
| mkdir mpc | |
| cd mpc | |
| wget http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz | |
| tar -xf mpc-1.0.1.tar.gz | |
| cd mpc-1.0.1 | |
| ./configure --prefix=$PREFIX --with-gmp=$PREFIX --with-mpfr=$PREFIX | |
| make -j 2 | |
| #optional: make check | |
| make install | |
| cd ../.. | |
| ### ISL : http://www.kotnet.org/~skimo/isl/ | |
| ## for cloog 0.17 so not required here (see below why) | |
| #mkdir isl | |
| #cd isl | |
| #wget ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.10.tar.bz2 | |
| #tar -xf isl-0.10.tar.bz2 | |
| #cd isl-0.10 | |
| #./configure --prefix=$PREFIX --with-gmp=$PREFIX | |
| #make -j 2 | |
| #make install | |
| #cd ../.. | |
| ### CLooG : http://www.cloog.org/ | |
| mkdir cloog | |
| cd cloog | |
| #wget ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.17.0.tar.gz | |
| #tar -xf cloog-0.17.0.tar.gz | |
| #cd cloog-0.17.0 | |
| ## apparently cloog 0.17 is not supported by gcc 4.6; use 0.15 instead | |
| wget ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.11.tar.gz | |
| tar -xf cloog-ppl-0.15.11.tar.gz | |
| cd cloog-ppl-0.15.11 | |
| #./configure --prefix=$PREFIX --with-isl=system --with-isl-prefix=$PREFIX --with-bits=gmp --with-gmp=system --with-gmp-prefix=$PREFIX --with-polylib=system --with-polylib-prefix=$PREFIX | |
| ./configure --prefix=$PREFIX --with-bits=gmp --with-gmp=$PREFIX --with-ppl=$PREFIX | |
| make -j 2 | |
| #optional: make check | |
| make install | |
| cd ../.. | |
| ### GCC : http://gcc.gnu.org/ | |
| mkdir gcc | |
| cd gcc | |
| wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.6.3/gcc-4.6.3.tar.bz2 | |
| tar -xf gcc-4.6.3.tar.bz2 | |
| cd gcc-4.6.3 | |
| # Note: in the following command, one can drop '--program-prefix=sv-' if needed | |
| ./configure --prefix=$PREFIX --program-prefix=sv- --with-local-prefix=$PREFIX --enable-languages=c,c++ --with-gmp=$PREFIX --with-mpfr=$PREFIX --with-mpc=$PREFIX --with-cloog=$PREFIX --with-ppl=$PREFIX | |
| make -j 2 | |
| #optionally, if low on space: make bootstrap-lean -j 2 | |
| #optional: make -k check | |
| #note: these tests require dejagnu, tcl and expect. | |
| make install | |
| #### | |
| ## Then, to use sv-gcc/sv-g++ one must : | |
| ## - update the PATH var : setenv PATH $PREFIX/bin:$PATH | |
| ## - set LD_RUN_PATH and LD_LIBRARY_PATH to $PREFIX/lib | |
| #### | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment