[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for config.guess for "cross-compiling" x86_64 -> powerpc on Ma
Re: Patch for config.guess for "cross-compiling" x86_64 -> powerpc on Mac OS X <= 10.6
Wed, 19 Apr 2017 03:52:12 +0200
KMail/5.1.3 (Linux/4.4.0-72-generic; KDE/5.18.0; x86_64; ; )
The patch looks good to me:
- I confirm that executables built on Mac OS X 10.5.8 (Darwin 9.8.0)
with "gcc -arch ppc" are of type 'Mach-O executable ppc' and
are directly executable on x86_64 Mac OS X 10.5.8.
- This is a vendor-provided feature; I have this feature on x86_64
Mac OS X 10.5.8 although I haven't installed or configured or
enabled anything special.
- On a PowerPC Mac OS X 10.5.8 the result of config.guess is
powerpc-apple-darwin9.8.0, and the patch makes it return the same
triple for CC="gcc -arch ppc" on x86_64 Mac OS X 10.5.8.
- The patch is complete: When you compile with "gcc -arch ppc64" you
get executables of type 'Mach-O 64-bit executable ppc64' but such
files are not directly executable on x86_64 Mac OS X 10.5.8:
-bash: ./a.out: Bad CPU type in executable
> The main problem is that config.guess is being used by various
> software packages to answer two completely different questions and the
> answer might not always be the same:
> (1) Which platform am I building for?
> (2) Which platform am I running on / which binaries should I download?
config.guess is the answer for (1). That's why it uses $CC_FOR_BUILD.
For (2) there is no simple answer on bi-arch systems.
Re: Patch for config.guess for "cross-compiling" x86_64 -> powerpc on Mac OS X <= 10.6,
Bruno Haible <=