install new version gcc
时间:2007-02-27 来源:alula418
Sometimes we should install a new version gcc for special use, this time I install gcc-3.3.4 version on my linux.
The step is as below:
1.download gcc source code
2.uncompress the tar package
3.make a new directory name it gcc-build
4.In directory gcc-build configure:
../gcc-3.3.4/configure --prefix=$HOME/GCC --mandir=$HOME/GCC/share/man --infodir=$HOME/GCC/share/info \
--enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,java,ada \
--enable-java-awt=gtk --disable-dssi --enable-plugin --with-cpu=generic --host=i386-redhat-linux
we plan install gcc to directory $HOME/GCC
5. execute $make bootstrap
6. execute $make install
7. set environment variables:
export PATH=$HOME/GCC/bin:$PATH
export PATH
LD_LIBRARY_PATH=$HOME/GCC/lib:LD_LIBRARY_PATH
export LD_LIBRARY_PATH
MANPATH=$HOME/GCC/man:$MANPATH
export MANPATH
INFODIR=$HOME/GCC/info:$INFODIR
exprot INFODIR
INFOPATH=$HOME/GCC/info:$INFOPATH
export INFOPATH
8. change into directory $HOME/GCC/bin
execute $ln -s gcc cc
9. relogin
The step is as below:
1.download gcc source code
2.uncompress the tar package
3.make a new directory name it gcc-build
4.In directory gcc-build configure:
../gcc-3.3.4/configure --prefix=$HOME/GCC --mandir=$HOME/GCC/share/man --infodir=$HOME/GCC/share/info \
--enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,java,ada \
--enable-java-awt=gtk --disable-dssi --enable-plugin --with-cpu=generic --host=i386-redhat-linux
we plan install gcc to directory $HOME/GCC
5. execute $make bootstrap
6. execute $make install
7. set environment variables:
export PATH=$HOME/GCC/bin:$PATH
export PATH
LD_LIBRARY_PATH=$HOME/GCC/lib:LD_LIBRARY_PATH
export LD_LIBRARY_PATH
MANPATH=$HOME/GCC/man:$MANPATH
export MANPATH
INFODIR=$HOME/GCC/info:$INFODIR
exprot INFODIR
INFOPATH=$HOME/GCC/info:$INFOPATH
export INFOPATH
8. change into directory $HOME/GCC/bin
execute $ln -s gcc cc
9. relogin
相关阅读 更多 +