This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Installing multiple GCC versions
- From: llewelly at xmission dot com
- To: Martin Baute <solar at rootdirectory dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 27 Apr 2004 07:19:00 -0600
- Subject: Re: Installing multiple GCC versions
- References: <opr63l1iw443mbml@auth.mail.onlinehome.de>
Martin Baute <solar@rootdirectory.de> writes:
> Hi there,
>
> I'm using multiple configurations of binutils/GCC in parallel -
> Cygwin, MinGW, an i586-elf and a arm-wince cross compiler.
>
> I know my way around in a Unix environment, but the fine print
> of administering a system escapes me. Thus, so far my four
> compilers are scattered all over the filesystem. The preinstalled
> Cygwin and MinGW installations are in /usr, and the cross-
> compilers I installed in /usr/cross-elf and /usr/cross-arm
> using the "configure --prefix" option.
>
> This is unwieldly. I've seen the GCC "-b" option that apparently
> allows to specify the target machine in some kind of parallel
> GCC setup (as in "gcc -b i586-elf", if I understood it correctly),
> and would much prefer to enable that.
>
> But search as I might (including several Google's for "parallel
> GCC installation" or "cross-compiler parallel" or ...), I haven't
> found any guideline on how to add additional targets to an existing
> GCC installation.
>
> I see that target-specific directories should end up in /usr,
> where already /usr/i686-pc-cygwin and /usr/i686-pc-mingw32 reside.
> But if I just "configure --prefix=/usr --target=i586-elf", I would
> overwrite those parts of the existing installation that reside in
> /usr/bin and /usr/lib, no?
>
> How do I set up multiple parallel GCC installtions?
I use a different --prefix for each gcc install because I've had
strange behaviors from installing multiple gccs to the same
prefix.
I use a different --program-suffix for each gcc install so I can put
all of the bin directories in my path, and get the compiler I
want, without typing the full path to it.
I don't know if this is the best way. It's just what I do.