> [Posted and mailed]
> Gerald Gutierrez enlightened this group thus:
> > Hi all.
> > I have a RH5.2 system and I would like to upgrade the compiler to use egcs
> > 1.1.1. Unfortunately, previously with my 5.1 system when I installed egcs it
> > wiped out my gcc and as a result I could no longer compile the kernel. Is this
> > going to happen to me if I try to install egcs 1.1.1 in RH5.2? I believe RH5.2
> > has kernel 2.0.36.
> > If I really needed both egcs 1.1.1 and the ability to compile the kernel, what
> > could I do?
> > Also, will I have any trouble if I upgrade the kernel to 2.2?
> > Thanks.
> Install egcs in a different directory than gcc. If gcc is in /usr/bin then
> you can install egcs into /usr/local/bin. Then only way I know to do this
> is to install it from source code, and use the --prefix switch and run
> ./configure --prefix=/usr/local
> before you run make.
You don't have to do this on RedHat. Just install the egcs packages you want
to use, and then /usr/bin/egcs will use the egcs compiler, and /usr/bin/gcc
will use the 188.8.131.52 compiler. On my system, I nuked /usr/bin/gcc and made
gcc a symlink to egcs (but then I use the 2.2.x kernels).
Quote:> After egcs is installed, all you need to do is to check
> your PATH to determine which compiler is run. Which compiler is used will be
> the one found first in the PATH search. You can change your PATH on the fly
> to switch back and forth between compilers.
You could use the PATH trick, but having a directory that has gcc symlinked to
/usr/bin/egcs that occurs before /usr/bin, and in the kernel directory do
(assuming bash syntax):
To get /usr/bin on your path before your symlink for this one compile.
Michael Meissner, Cygnus Solutions
PO Box 98, Ayer Massachusetts, USA 01432-0098