This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: Cross compilation


Mahoney, David M. kirjoitti:
Hello,

How do I configure GCC to use the PowerPC backend? I'm running Linux on
PC (Intel Architecture) and I want GCC to generate a PowerPC executable
in ELF format.
The "ELF" is object format like "COFF" (SVR3.2) and "PE" (WinNT4.0/PPC). It is not a target
system for which to create an executable ! Possible target systems which use ELF as their object
format, are Linux/PPC, FreeBSD/PPC, NetBSD/PPC and those 'powerpc-eabi*' embedded
targets.... So, what is your "target" ?


Via the 'http://www.ocdemon.com' it was possible to find a prebuilt 'powerpc-eabi' targeted
crosstoolchain for the Linux/x86 host system. Maybe there are also prebuilt downloadable tools
for Linux/x86-to-Linux/PPC too.


Generally building a cross-GCC should be much easier than producing a native GCC when only
one build stage is required, not any wacky "three-stage bootstrap", as usually happens with a
native GCC build. But unfortunately it isn't because at least one workaround is required because
of a bug/feature which has been there in the GCC sources the last 10 years :-( I'm meaning the
GCC build, of course the target binutils and the target C library (taken from the target system, if
that is a "system") must pre-exist, the binutils been built and the C library be copied...


If the goal is to generate PowerPC "code" in symbolic assembly format, neither binutils, nor the
C library for the target is required. Producing objects requires an assembler for the target and
producing executables requires a linker and the target C library, including the startups....



Thank,

Dave Mahoney
Northrop Grumman ES
Software Engineer

Phone: 410.993.9008
Email: david.mahoney@ngc.com





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