Multiple GCC Installations
I have need of updating my gcc for testing purposes, but I want to keep my stable one (3.3.6) available as well.
Looking at an old, unrelated guide at the Gentoo site:
I see that there is a way to install multiple gcc's and switch between them with the gcc-config tool:
Now then...as a test, I attempted to install gcc-3.3.5. When run with "-pv", I see that it will downgrade my current compiler, not install an unrelated one.
This will also have the beneficial side-effect of installing the gcc-config package on your system, which can be used to switch back and forth between various installed versions of GCC.
My question is: how do I install a newer, ~x86 version of gcc while still keeping my current stable one around?
Installing multiple versions of gcc and using one which is required
The listed below are the basic steps and you would be done.. to read more articles you can visit http://www.tarunworld.com/linux/keep...ng-them-2.html
1. Copy the bz2 file to a director say /usr/src.
2. Make a dir say named gcc 3.5 in /usr/src.
3. Untar the contents of the zip file in this directory.
4. go to the directory gcc 3.5 as cd gcc3.5
5. on shell give the command as /usr/src/gcc3.5/configure --prefix=/opt/gcc
6. on shell run make bootstrap.
7. on shell run make install(do it as root).
8. The gcc would be compiled 3 times and you might have to wait a while.
9. After the process is completed on shell run export PATH=/opt/gcc/bin:$PATH.
10. This command appends the gcc path to the environment path variable.
11. Now check gcc --v and you would get version as 3.5.