Installing multiple GCC versions
Tue Apr 27 13:19:00 GMT 2004

Martin Baute <> 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

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.

More information about the Gcc-help mailing list