From subsecret
Jump to: navigation, search
Line 23: Line 23:


==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
  make install
  cd ..  
  cd ..


==GCC==
==GCC==

Revision as of 13:21, 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 ..

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.5.2.tar.bz2 
cd gcc-4.5.2

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

#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
#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_LINKER64 "/tools/lib/ld-linux-x86-64.so.2"
cd ..
mkdir 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++
make -j 12 
make install
cd ..
ln -s /tools/bin/gcc /tools/bin/cc

We are now ready for next step