Skip to content

Instantly share code, notes, and snippets.

@math314
Created June 28, 2013 07:28
Show Gist options
  • Select an option

  • Save math314/5883065 to your computer and use it in GitHub Desktop.

Select an option

Save math314/5883065 to your computer and use it in GitHub Desktop.
元URL : https://gist.github.com/masashinakata/5668219
### 補足 ###
# インストールする先は CentOS 5.9(final) x86_64(intelの64bitのこと)
# PATHは$HOME/usr/local/binと$HOME/usr/local/gcc-4.8.0/binへ、
# LD_LIBRARY_PATHは$HOME/usr/local/libを追加すると捗る
# お好みでmake checkする ただしPPLのmake checkは恐ろしく時間がかかる?
# Assuming that everything will reside on $HOME/usr/local directory as
# depicted below:
#
# $HOME
# `-- usr
# `-- local
# +-- bin
# `-- lib
#
# Also note that gcc, gcc-g++, glibc-devel.i386, libstdc++-devel.i386 and
# glibc-devel.x86_64 rpms should be installed prior to build.
#Installing or updateing glibc-devel.i386, libstdc++-devel.i386 and glibc-devel.x86_64
> yum -y install yum-downloadonly #おまけ
> yum -y install glibc-devel.i386 libstdc++-devel.i386 glibc-devel.x86_64
# Installing GMP.
> cd ~/usr/src
> wget http://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2
> tar jxvf gmp-5.1.2.tar.bz2
> cd gmp-5.1.2
> ./configure --prefix=$HOME/usr/local --enable-cxx
> make && make install
# Installing MPFR.
> cd ~/usr/src
> wget http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.bz2
> tar jxvf mpfr-3.1.2.tar.bz2
> cd ./mpfr-3.1.2
> ./configure --prefix=$HOME/usr/local --with-gmp=$HOME/usr/local
> make && make install
# Installing MPC.
> cd ~/usr/src
> wget http://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz
> tar zxvf mpc-1.0.1.tar.gz
> cd mpc-1.0.1
> ./configure \
--prefix=$HOME/usr/local \
--with-gmp=$HOME/usr/local \
--with-mpfr=$HOME/usr/local
> make && make install
# Installing PPL.
#
# You'd better to download the patch in advance from:
#
# http://abechin.sakura.ne.jp/sblo_files/k-tai-douga/gcc/ppl-1.0-gmp-5.1.0.diff
> cd ~/usr/src
> wget ftp://ftp.cs.unipr.it/pub/ppl/releases/1.0/ppl-1.0.tar.bz2
> tar jxvf ppl-1.0.tar.bz2
> mkdir patches; cd patches
> wget http://abechin.sakura.ne.jp/sblo_files/k-tai-douga/gcc/ppl-1.0-gmp-5.1.0.diff
> cd ../ppl-1.0
> patch -p1 < ../patches/ppl-1.0-gmp-5.1.0.diff
> ./configure --prefix=$HOME/usr/local --with-gmp=$HOME/usr/local
> make && make install
# Installing binutils.
> cd ~/usr/src
> wget http://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2
> tar jxvf binutils-2.23.2.tar.bz2
> cd ./binutils-2.23.2
> ./configure \
--prefix=$HOME/usr/local \
--with-gmp=$HOME/usr/local \
--with-mpfr=$HOME/usr/local \
--with-mpc=$HOME/usr/local \
--with-ppl=$HOME/usr/local
> make && make install
# Installing gcc.
> cd ~/usr/src
> wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.0.tar.bz2
> tar jxvf gcc-4.8.0.tar.bz2
> mkdir build
> cd build
> ../gcc-4.8.0/configure \
--prefix=$HOME/usr/local/gcc-4.8.0 \
--program-suffix=48 \
--enable-shared \
--enable-threads=posix \
--enable-checking=release \
--with-system-zlib \
--disable-libunwind-exceptions \
--enable-__cxa_atexit \
--enable-languages=c,c++ \
--with-gmp=$HOME/usr/local \
--with-mpc=$HOME/usr/local \
--with-mpfr=$HOME/usr/local \
--with-ppl=$HOME/usr/local
> PATH=$HOME/usr/local/bin:$PATH LD_LIBRARY_PATH=$HOME/usr/local/lib make && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment