configure.build_arch
Jack Howarth
howarth at bromo.med.uc.edu
Wed Sep 16 13:02:32 PDT 2009
On Wed, Sep 16, 2009 at 09:47:39PM +0200, Anders F Björklund wrote:
>
> It just seems that the value of `uname -p` isn't useful for
> determining the true architecture of the Mac operating system,
> whether it's on "ppc-apple-darwin8" (that might run ppc64 too)
> or "i686-apple-darwin10" (that might run x86_64 code as well)
>
Mike Stump (who is the one of the remaining darwin maintainers
for FSF gcc) agreed that arch was probably the only thing that
should be changed. My radar report for that isn't closed but is
marked as a duplicate. If you read over the arch manpage, it
really makes sense that arch without arguments should return
the 'preferred' architecture and not the 'base' one. If Apple
fixed that in Snow Leopard, it would provide quick access to
determining the native code type on a Mac.
> I just don't think that you can use the detected $build_cpu
> for anything "useful" on the Mac OS X operating system...
> Even if CVOG is "ppc-apple-darwin8" or "i686-apple-darwin10",
> it might still be generating code for something else too ?
>
> * CVOG = %{cpu}-%{vendor}-%{os}%{?gnu}, a.k.a. %{platform}
>
> Sometimes it is useful to "pretend" to be cross-compiling
> to another system, by passing --target and setting symlinks,
> but for the general configure it's close enough with uname(1).
> Sometimes it breaks, like for FSF GCC, but that's rare enough ?
>
Actually I misspoke about what fink does most commonly. They
don't pass --target= but rather...
--build=%m-apple-darwin`uname -r|cut -f1 -d.` --h ost=%m-apple-darwin`uname -r|cut -f1 -d.`
does that make more sense?
Jack
>> ps From my reading of...
>>
>> http://www.gnu.org/prep/standards/html_node/Configuration.html
>>
>> we actually should be passing --host=x86_64-apple-darwin10 --
>> target=x86_64-apple-darwin10
>> to configure...
>
>
> For this to work in the same GNU-style, you would also need
> a "x86_64-apple-darwin10-gcc" cross-compiler set up so that
> you wouldn't have to pass the -m64 (or even -arch x86_64)
> to get it to generate the proper code for the new --target.
>
> I think you mentioned that you had done so with "wrappers"
> in Fink, but it's not something that comes with the system ?
> So I don't think that MacPorts will be changing either the
> installed config.guess or the default --target parameters...
>
> --anders
More information about the macports-dev
mailing list