This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Installing several versions of GCC
- To: gcc at gcc dot gnu dot org, subscript at free dot fr
- Subject: Re: Installing several versions of GCC
- From: mike stump <mrs at windriver dot com>
- Date: Thu, 14 Jun 2001 16:29:00 -0700 (PDT)
> From: wwp <subscript@free.fr>
> To: gcc@gcc.gnu.org
> Date: Wed, 13 Jun 2001 13:13:35 +0200
> 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.
--prefix has existing the compiler for quite a long time, it has been
documented for quite a long time (more than 10 years). It is and
always has been the canonical way to have multiple compilers.
The way to make it work, is to pick something like
/usr/local/gcc-2.95.3, and mkdir it, and them configure
--prefix=/usr/local/gcc-2.95.3...
If the mkdir fails, pick another name.
To use, add /usr/local/gcc-2.95.3/bin to the front of your path, or
add a script called gcc to your path that does exec
/usr/local/gcc-2.95.3/bin/gcc ${1+"$@"} or symlink gcc into your path.
> 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?
Please ignore the -V option, it doesn't work, is misguided, and can
only confuse users.
> - is it possible to install concurrent versions of gcc (especially
> egcs-2.91.66 and 2.95.3)?
Sure.
> - is it preferable to keep the SuSE rpm-installed egcs version instead?
Sure.