Wednesday, September 17, 2014

install gcc notes

1) Get the desired version from SVN, e.g. from svn://gcc.gnu.org/svn/gcc/tags/gcc_3_4_6_release
(To install SVN, see how to Work with SVN) 

2) Check to make sure install.sh, config.sub and config.guess files are present in your gcc directory. If not, copy them into your unzipped gcc directory:

me@there:~/tools/gcc> cp -p /usr/share/automake-1.9/install-sh .
me@there:~/tools/gcc> cp -p /usr/share/automake-1.9/config.sub .
me@there:~/tools/gcc> cp -p /usr/share/automake-1.9/config.guess .

3) Sample config for SUSE 10 Linux, x86_64

me@there:~/tools/gcc> mkdir objdir
me@there:~/tools/gcc> cd objdir
me@there:~/tools/gcc/objdir> ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local
            --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
            --enable-languages=c,c++,objc,fortran,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.1.0
            --enable-ssp --disable-libssp --enable-java-awt=gtk --enable-gtk-cairo --disable-libjava-multilib --with-slibdir=/lib64
            --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --without-system-libunwind
            --with-cpu=generic --host=x86_64-suse-linux
Instructions on how to install GCC can be found here: http://gcc.gnu.org/install/

or...

1) Search for an rpm package for your specific OS, e.g.:

http://rpm.pbone.net/index.php3/stat/3/srodzaj/1/search/gcc34

2) You can make a symbolic link to the newly uploaded gcc in /usr/bin

No comments: