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]

Re: How do I use 2 versions of gcc on the same system?


On Mon, Jul 16, 2001 at 09:19:00PM -0500, Luke Mauldin wrote:
> Do I just need to install gcc 3.1 in a
> different location such as /opt/gcc31 and then when I want to use gcc 3.1 do
> /opt/gcc31/bin/gcc or what do I need to do?

Yes, exactly that.  In particular, ignore gcc's -B option.  :-)  The
installation instructions webpage recommends that you use entirely separate
--prefix's when configuring different versions of GCC.

Be aware that if you're using shared libraries, you may need to play games
with things like LD_RUN_PATH, LD_LIBRARY_PATH, linker options to encode
the run path, etc, so that the correct copy of the shared libs are found.
(Sometimes it won't matter, sometimes it will, depending on what you're
trying to do.)


Phil

-- 
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
                                     - anonymous Egyptian scribe, c.1700 BC


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