config-patches
[Top][All Lists]
Advanced

[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: Bruno Haible
Subject: Re: Patch for config.guess for "cross-compiling" x86_64 -> powerpc on Mac OS X <= 10.6
Date: Wed, 19 Apr 2017 12:46:09 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-72-generic; KDE/5.18.0; x86_64; ; )

Mojca Miklavec writes:
> >   - 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:
> >       $ ./a.out
> >       -bash: ./a.out: Bad CPU type in executable
> 
> What do you actually get in that case?
> 
> I thought it would return powerpc64, but I'm not 100% sure how the
> flow goes in that case.

The output of config.guess in this case is irrelevant. config.guess
is designed to guess a default for the --build option. When you set
CC to a compiler that produces binaries that cannot be executed on the
current machine, you should also pass a matching --host option.

> >> (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.
> 
> There might not be an unique answer, but there are usually reasonable
> defaults (which could often be extracted without consulting the
> compiler). And config.guess probably comes the closest to any other
> alternative when determining that for such a wide range of platforms.

This is irrelevant for config.guess. config.guess has not been designed
to answer the question "which binaries should I download".

Bruno




reply via email to

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