Re: More about cross compiling
Re: More about cross compiling
- Subject: Re: More about cross compiling
- From: Markus Hitter <email@hidden>
- Date: Thu, 28 Oct 2004 14:35:58 +0200
Am 25.10.2004 um 03:56 schrieb Jeff Laing:
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.
Not necessarily. Depends on where you draw the line between "native"
and "cross". If you want an environment for generating Linux-PPC
binaries on OS X, the processor and maybe even the hardware is the
same, still most people will consider it as an cross compiler.
I can't think of a good reason why Apple would do this as their
standard product.
If you draw the line between major Mac OS X releases? Consider OS X
10.2 as a different platform than OS X 10.3? You need a different set
of headers and libraries to get the right output. This ist what Apple
did and why they call it cross compilation.
While in theory, you could serve all three OS X (10.1, 10.2, 10.3)
environments with a single compiler, Apple has choosen to use the
compiler recommended for each release just before the next release came
out. This is gcc-2.95.2 for OS X 10.1, gcc-3.1 for OS X 10.2 and the
current gcc for the current OS X.
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.
-mcpu=750, for example. This switches between different PPC versions.
For a completely different CPU like MIPS, Sparc, x86, etc., you have to
switch at gcc compile time.
As to whether its safe or not to download and compile gcc yourself,
the answer is "it depends on where you download from".
I'd always recommend the sources you would use in the native enironment
of your target. This is FSF gcc for (almost) any target other than
Darwin/OS X.
Cheers,
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
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