it's not quite that easy to compile gcc 2.95
but first it's good you jusy did ./configure
that put the new gcc in /usr/local
and left your system compiler in /usr
you really don't want to overwrite your system compiler and you didn't bravo
now when you want to use gcc 2.95.3 you do
export PATH=/usr/local/gcc-2.95.3/bin:$PATH
and
export CC=/usr/local/gcc-2.95.3/bin/gcc
and your system will use it
next time you install another compiler remember to do ./configure --prefix=/opt/gcc-x.xx.x
or you overwrite your second one gcc 2.95 in /usr/local
OK back to compiling gcc-2.95.3
i think you should run that compile and install again so everything is ok just overtop of what you did
you are compiling one compiler with another version compiler so there needs to be some extra passes
so the 2.95 is all 2.95 and not just half 2.95 with code from the other compiler in it so after we get it going we ask it to compile itself "bootstrap" twice more and check itself against itself. Also i give you some other configuration options so you get threading and whatnot. (always check ./configure ---help especially if you have some special needs like languages or whatever) i only do for c and c++ which is all i use
there are some common patches to use in doing this and i think for your situation 3.2.1 to 2.95.3
i would use (i really think i have this right for your compiler version just do a fresh untar and start over if this compile fails because of these patches) i don't think the build will work at all without the first one. so go here
http://ftp.nluug.nl/ftp/pub/os/Linux...e-13/blfs.html
and get
gcc-2.95.3-1.patch
and
gcc-2.95.3-no-fixinc.patch
the first one fixes some symbol problems and the second keeps it from trying to rearange glibc headers for itself in it's private directory
now on to the build
from within the gcc directory after you untar it and with the patches in the directory above
Code:
patch -Np1 -i ../gcc-2.95.3-1.patch
patch -Np1 -i ../gcc-2.95.3-no-fixinc.patch
mkdir ../gcc-build
cd ../gcc-build
now for the configure -- this is all one command
Code:
../gcc-2.95.3/configure \
--enable-shared --enable-languages=c,c++ \
--enable-threads=posix
now to build and it will take some time
if this fails try
"make bootstrap4" to give it yet another pass (i think -- it's been along time since i had to do that)
now as root from here on out
Code:
make install
ln -sf gcc /usr/local/bin/cc
make sure /usr/local/lib is in
/etc/ld.so.conf
and run
ldconfig
as root
and one last thing to make some symlinks
run this to identify the lib name (all one command)
Code:
L=`find /usr/local/lib -name "*libstdc++*.so" -type f` &&
IL=`basename $L`
now make some links so the libs will run some precompiled packages
Code:
ln -sf $IL /usr/local/lib/libstdc++-libc6.1-1.so.2
ln -sf $IL /usr/local/lib/libstdc++-libc6.2-2.so.3
ln -sf $IL /usr/local/lib/libstdc++-libc6.3-2.so.3
all done