- Aim:
- 1)To compile gcc version 4.4.2,
2)To detect simple 'if-else' statements after reading source file c-parser.c of gcc. - 3)Generate exception to handle 'if detection'.
4)Use git commands to point out difference made in newer compiled gcc from existing gcc on system.
1) DOWNLOAD MPFR tar file. It can be downloaded from http://www.mpfr.org/.
2) EXTRACT it in home.
2.1) tar -xvf MPFR-4.2.tar.gz
3) CONFIGURE it and install.
3.1)cd mpfr-4.2
3.2) ./configure
3.3) make
3.4) make install (in root)
B)To compile/install gcc
1) DOWNLOAD gcc-4.4.2 tar ball file. It can be downloaded from ftp://gd.tuwien.ac.at/gnu/gcc/releases/
2) EXTRACT gcc-4.4.2 from tar file.
2.1) mkdir gcc1
2.2) cd gcc1
2.3) tar -xvf gcc-4.4.2.tar.gz
2.4) set srcdir = "/home/swati/gcc1/gcc-4.4.2"
set objdir = "/home/swati/gcc1/gcc-bin"
set insdir = "/home/swati/gcc1//usr/local"
2.5) mkdir -p srcdir
mkdir -p objdir
mkdir -p insdir
2.6) cd objdir
2.7)CONFIGURE : /home/swati/gcc1/gcc-4.4.2/configure --prefix=$insdir
2.8) make bootstrap -j3
2.9) make install (in root)
2.10) cd gcc1
2.11) SELECT NEW INSTALLED gcc: export PATH=$insdir/bin/:$PATH
3) COMPILE this new version gcc1
3.1) gcc hello.c -v
References:
http://www.faqs.org/docs/ldev/0130091154_78.htm
http://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/install_gcc.html
No comments:
Post a Comment