This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: compiling gcc for multiple targets?
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: "Carl B. Constantine" <cconstan at csc dot uvic dot ca>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 30 Mar 2004 22:44:21 -0500
- Subject: Re: compiling gcc for multiple targets?
- References: <20040330232033.GA1522@csc>
"Carl B. Constantine" <cconstan@csc.uvic.ca> writes:
> Is there any way to compile gcc and related utils (binutils, gdb) for
> multiple targets in one binary? So I want to compile it to support both
> Solaris intel and m68hc11 in one gcc instead of having separate binaries
> for each?
For gcc, no. For gas and gdb, sometimes. For the binutils and ld,
yes (use --enable-targets).
> If I cannot do this, but have to compile separate versions
> (--program-prefix=m6811-elf) are there any issues wrt to libraries if
> they are installed to the same place? libiberty.so for example?
libiberty.so is target independent, so it is safe to install the
libiberty.so for multiple targets in the same place. The target
libraries, such as libstdc++-v3, will by default be installed in
directories whose names depend upon the target, so they should not
ordinarily cause any conflicts. You should avoid building a shared
libbfd.so, as it will be target-dependent; that is, do not configure
the GNU binutils with --enable-shared.
Ian