RE: More about cross compiling
RE: More about cross compiling
- Subject: RE: More about cross compiling
- From: Jeff Laing <email@hidden>
- Date: Mon, 25 Oct 2004 11:56:44 +1000
> Then I guess the big question is, is it safe to download the gcc
> package and compile it from the command line?
> By the answers I've gotten I have to assume apple did not compile the
> gcc binary they distribute as cross compiler
I'm not sure you understand what a cross compiler is.
A compiler is used to turn human-readable source code into machine-readable
object code.
The machine-readable code generated by a given instance of a compiler is
usually only for a single target CPU, although variations may be supported
(like the differences between G3, G4, G5, or the presence/absence of
altivec, etc)
Typically a compiler will generate object code for the architecture that it
is executing on.
Thus, the XCODE gcc runs on a PPC cpu, and generates output for a PPC cpu.
To "compile gcc as a cross compiler" would mean, for example, that Apple
would have a gcc that runs on a PPC cpu, but generates output for an INTEL
cpu. I can't think of a good reason why Apple would do this as their
standard product.
As far as I know, this is no magic command-line switch that can be passed to
gcc to have it generate code targetting a different CPU.
As to whether its safe or not to download and compile gcc yourself, the
answer is "it depends on where you download from". Apple has made its own
PPC-MacOSX specific changes to the gcc codestream, and you have to be
careful to get a consistent toolset.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden