[Top][All Lists]

[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

From: Mojca Miklavec
Subject: Re: Patch for config.guess for "cross-compiling" x86_64 -> powerpc on Mac OS X <= 10.6
Date: Tue, 18 Apr 2017 17:44:53 +0200

On 18 April 2017 at 17:27, Jan Engelhardt wrote:
> On Tuesday 2017-04-18 17:18, Mojca Miklavec wrote:
>>I would like to request a patch for config.guess to partially address
>>some problems experienced when setting
>>    CC="gcc -arch ppc"
>>on Mac OS X 10.4-10.6 i386 or x86_64.
> At least on my side of the ocean, when cross-compiling, specifying the
> triplet is the correct way.
>  ./configure --host=powerpc-unknown-linux-gnu

Do you also run
    ./configure --host=i686-unknown-linux-gnu
when you want to compile 32-bit binaries on 64-bit linux?

> That will invoke /usr/bin/powerpc-unknown-linux-gnu-gcc etc., which can either
> be the PPC compiler, or a shell script invoking an existing native-by-default
> gcc with more arguments.

The problem of this approach is that the configure scripts etc. then
assume that the computer where you run the configuration is not able
to run the resulting binaries.

So AC macros like AC_RUN_IFELSE and AC_TRY_RUN are kind of doomed.

Building for i386 or ppc is not really cross-compiling in the
traditional sense. An x86_64 machine can still run the ppc binaries
without problems and that's considerably different from the case when
cross-compiling on linux for windows for example.

(And if that was true ... why is then config.guess calling the
compiler to differentiate between 32-bit and 64-bit darwin instead of
simply asking the OS whether it's 64-bit capable?)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]