This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Installing several versions of GCC


Hello,

I'm trying to figure out how to install several version of GCC on by 
GNU/linux box (i686-pc-linux-gnu). Only a few documentation appears in 2.95.x 
docs, nothing (?) in egcs versions.

**

At first, installing a Suse 6.3, I've got egcs-1.1.2 (`gcc --version` says 
"egcs-2.91.66").
I'm trying to install gcc 2.95.3 from tgz. Compilation is successfull, but if 
I install it, it will overwrite the existing gcc (binaries, lib and includes)!

Am I wrong, or since several versions of gcc are not installed in the same 
--prefix base path, the gcc -V <version> option will not work?

So I removed the rpm package from SuSE, installed egcs-2.91.66 gcc from tgz 
with ./configure --enableversion-specific-runtime-lib and 
--prefix=/usr/local/gcc-2.91.66, and installed 2.95.3 gcc from tgz with 
--prefix=/usr/local/gcc-2.95.3, making links to binaries in /usr/local/bin 
(forgcc, c++, g++, and so on).

Using -V still doesn't work, so I've linked each 
gcc-*/lib/gcc-lib/i686-pc-linux-gnu/<version> to each other so that each gcc 
version can recognize each other!

Making links so that the default gcc is 2.91.66 works OK, but since I try to 
use -V 2.95.3, it fails on finding cpp binary. I guessed that if I include 
both bin/ directories in my $PATH, it will not especially get the relevant 
binary, mixing call to both versions' binaries.

**

So, my questions are:
- is it possible to install concurrent versions of gcc (especially 
egcs-2.91.66 and 2.95.3)?
- is it preferable to keep the SuSE rpm-installed egcs version instead?
- how does -V really check for installed versions? What would the correct 
--prefix when installing concurrent gcc versions (the same, different ones, 
making some crossed-links?) ?


Thank you in advance for providing help, I'm a little bit confused with that..

wwp


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]