From subsecret
Jump to: navigation, search
(Created page with "==libelf== tar xf libelf-0.8.13.tar.gz cd libelf-0.8.13 ./configure --prefix=/tools/ make -j 12 make install cd .. ==GMP== tar xf gmp-5.0.1.tar.gz cd gmp-5.0.1 ./c...")
 
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
==libelf==
==libelf==
  tar xf libelf-0.8.13.tar.gz
  tar xf libelf-0.8.9.tar.gz
  cd libelf-0.8.13
  cd libelf-0.8.9
  ./configure --prefix=/tools/
  ./configure --prefix=/tools/
  make -j 12
  make -j 8
  make install
  make install
  cd ..
  cd ..


==GMP==
==GMP==
  tar xf gmp-5.0.1.tar.gz
  tar xf gmp-5.1.1.tar.xz
  cd gmp-5.0.1
  cd gmp-5.1.1
  ./configure --prefix=/tools/
  ./configure --prefix=/tools/
  make -j 12
  make -j 8
  make install
  make install
  cd ..
  cd ..


==MPFR==
==MPFR==
  tar xf mpfr-3.0.0.tar.gz
  tar xf mpfr-3.1.2.tar.xz
  cd mpfr-3.0.0
  cd mpfr-3.1.2
  ./configure --with-gmp=/tools --prefix=/tools/
  ./configure --with-gmp=/tools --prefix=/tools/
  make -j 12 install
  make -j 8 install
  cd ..
  cd ..


==MPC==
==MPC==
  tar xf mpc-0.9.tar.gz
  tar xf mpc-1.0.1.tar.gz
  cd mpc-0.9
  cd mpc-1.0.1
  ./configure --with-gmp=/tools --with-mpfr=/tools --prefix=/tools/
  ./configure --with-gmp=/tools --with-mpfr=/tools --prefix=/tools/
  make -j 12
  make -j 8
make install
cd ..
 
==ISL==
tar xf isl-0.11.1.tar.bz2
cd isl-0.11.1/
./configure --prefix=/tools/ --with-gmp-prefix=/tools
make -j 8
make install
cd ..
 
==ClooG==
tar xf cloog-0.18.0.tar.gz
cd cloog-0.18.0/
./configure --with-gmp-prefix=/tools/ --prefix=/tools/
make -j 8
  make install
  make install
  cd ..  
  cd ..


==GCC==
==GCC==
Line 38: Line 50:


  export LD_LIBRARY_PATH=/tools/lib
  export LD_LIBRARY_PATH=/tools/lib
  tar xf gcc-4.5.2.tar.bz2  
  tar xf gcc-4.8.0.tar.bz2
  cd gcc-4.5.2
  cd gcc-4.8.0/
Go to gcc/config/i386 and edit linux64.h and linux.h.
   
   
Go to gcc/config/i386 and edit linux64.h or linux.h.
in linux.h
#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"


#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
in linux64.h
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
Is changed to:
  #define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-linux.so.2"
  #define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-linux.so.2"
  #define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld-linux-x86-64.so.2"
  #define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld-linux-x86-64.so.2"  


  cd ..
  cd ..
  mkdir gccbuild
  mkdir gccbuild
  cd gccbuild
  cd gccbuild
  ../gcc-4.5.2/configure --disable-multilib --with-mpfr=/tools --with-gmp=/tools --with-mpc=/tools --prefix=/tools/ --enable-languages=c,c++
#GCC 4.8.0 is broken with regards to ISL 0.11.1, when its fixed: add --with-isl=/tools
  make -j 12
  ../gcc-4.8.0/configure --disable-multilib --with-mpfr=/tools --with-gmp=/tools --with-mpc=/tools --prefix=/tools/ --enable-languages=c,c++
  make -j 8
  make install
  make install
  cd ..
  cd ..

Latest revision as of 14:42, 21 April 2013

libelf

tar xf libelf-0.8.9.tar.gz
cd libelf-0.8.9
./configure --prefix=/tools/
make -j 8
make install
cd ..

GMP

tar xf gmp-5.1.1.tar.xz
cd gmp-5.1.1
./configure --prefix=/tools/
make -j 8
make install
cd ..

MPFR

tar xf mpfr-3.1.2.tar.xz
cd mpfr-3.1.2
./configure --with-gmp=/tools --prefix=/tools/
make -j 8 install
cd ..

MPC

tar xf mpc-1.0.1.tar.gz
cd mpc-1.0.1
./configure --with-gmp=/tools --with-mpfr=/tools --prefix=/tools/
make -j 8
make install
cd ..

ISL

tar xf isl-0.11.1.tar.bz2
cd isl-0.11.1/
./configure --prefix=/tools/ --with-gmp-prefix=/tools
make -j 8
make install
cd ..

ClooG

tar xf cloog-0.18.0.tar.gz
cd cloog-0.18.0/
./configure --with-gmp-prefix=/tools/ --prefix=/tools/
make -j 8
make install
cd ..

GCC

Now we change dynamic linker variable for compiling GCC with right version of libraries.

export LD_LIBRARY_PATH=/tools/lib
tar xf gcc-4.8.0.tar.bz2
cd gcc-4.8.0/

Go to gcc/config/i386 and edit linux64.h and linux.h.

in linux.h

#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"

in linux64.h

#define GLIBC_DYNAMIC_LINKER32 "/tools/lib/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/tools/lib/ld-linux-x86-64.so.2" 
cd ..
mkdir gccbuild
cd gccbuild
#GCC 4.8.0 is broken with regards to ISL 0.11.1, when its fixed: add --with-isl=/tools
../gcc-4.8.0/configure --disable-multilib --with-mpfr=/tools --with-gmp=/tools --with-mpc=/tools --prefix=/tools/ --enable-languages=c,c++
make -j 8
make install
cd ..
ln -s /tools/bin/gcc /tools/bin/cc

We are now ready for next step