Install GCC-4.4.3, make sure make version above 3.8.0 I installed make-3.8.2, latest
Install the GCC-4.4.3, make sure the make version is above 3.8.0
I installed make-3.8.2, ftp://ftp.gnu.org/gnu/make/
Steps for installing make3.8.2:
Tar-zxvf make3.8.2.tar.gz
In the make-3.8.2 directory
./Configure
Make
Make install
Normally, no error occurs. in/usr/local/bin, you can obtain the new version of make, which is copied to/usr/bin.
After the new make version is ready,Install three GCC dependent Libraries.
Gmp-4.3.2.tar.bz2 mpfr-3.1.0.tar.gz mpc-0.8.1.tar.gz three. Ftp://gcc.gnu.org/pub/gcc/infrastructure/
WhereBytes
First install gmp-4.3.2.tar.bz2 and its next mpfr-3.1.0.tar.gz, and the last is the mpc-0.8.1.tar.gz.
First, install gmp.
Tar-jzvf gmp-4.3.2.tar.bz2 //
Mkdir-p gmp-build //
Cd gmp-build
../Gmp-4.3.2/configure -- prefix =/usr/local/gmp-4.3.2
Make // Delete the wrong line of code directly if there is an error
Make install
Secondly, install mpfr
Tar-zxvf mpfr-3.1.0.tar.gz
Mkdir-p mpfr-build
Cd mpfr-build
../Mpfr-3.1.0/configure -- prefix =/usr/local/mpfr-3.1.0 -- with-gmp =/usr/local/gmp-4.3.2
Make // Delete the wrong line of code directly if there is an error
Make install
Finally, install the mpc.
Tar-zxvf mpc-0.8.1.tar.gz
Mkdir-p mpfr-build
Cd mpfr-build
../Mpc-0.8.1/configure -- prefix =/usr/local/mpc-0.8.1 -- with-gmp =/usr/local/gmp-4.3.2 -- with-mpfr =/usr/local/mpfr-3.1.0
Make // Delete the wrong line of code directly if there is an error
Make install
Finally, the prerequisites are ready, and the boss is coming later.
Install GCC4.4.3
To be safe,
Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-4.3.2/lib:/usr/local/mpfr-3.1.0/lib
Then start the installation,Use the new make version
Tar-jzvf gcc-4.4.3.tar.bz2
Mkdir-p gcc-build
Cd gcc-build
../Gcc-4.3.3/configure -- prefix =/usr/local/gcc-4.4.3
-- Enable-threads = posix
-- Disable-checking
-- Disable-multilib
-- Enable-languages ages = c, c ++
-- With-gmp =/usr/local/gmp-4.3.2
-- With-mpfr =/usr/local/mpfr-3.1.0
-- With-mpc =/usr/local/mpc-0.8.1
Make // about an hour
Make install
After compilation, you can find the new GCC and G ++ versions in/usr/local/gcc-4.4.3/bin. Copy to usr/bin.
IfI don't want to generate environment variables every time I use GCC.You can/Etc/bashrc, Add the following
LD_LIBRARY_PATH =:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-4.3.2/lib:/usr/local/mpfr-3.1.0/lib:/usr/local/gcc-4.4.3/lib
Export LD_LIBRARY_PATH
Save.
In/etc/profile
# Path manipulation
If ["$ EUID" = "0"]; then
Pathmunge/sbin
Pathmunge/usr/sbin
Pathmunge/usr/local/sbin
Pathmunge/usr/local/gcc-4.3.2/bin(Add this row)
Fi
Save.
Source/etc/profile
Run an example
Gcc-v to view the gcc version
Gcc-o hello. c
GCC4.4.3 installation is complete.