configure.build_arch

Jack Howarth howarth at bromo.med.uc.edu
Wed Sep 16 08:14:23 PDT 2009


On Wed, Sep 16, 2009 at 04:45:09PM +0200, Anders F Björklund wrote:
>
> Passing a --target to configure is reasonable, and different from
> patching "config.guess" to return something not from uname(1)...
> (Maybe it changed in Snow Leopard, but it used to detect something
> like "i386-apple-darwin10.0.1" with a lot of decimals like that ?)

Anders,
    However config.guess upstream still needs to adapt to the new
situation where the default architecture detected in darwin10 via uname -p,
for EMT64 capable hardware, diverges from that of the architecture of
the code genererated by the default system compiler. 

>
> I believe that when you are trying a GNU-style cross-compile
> by setting --target and friends, you also need to set up the
> matching compiler symlinks for this newly invented "platform".
> Normally the system gcc would expect you to use -arch instead ?
>

My argument is that the current situation is already effectively
a cross-compilation when the current config.guess is used on
EMT64 capable hardware under darwin10. The architecture reported
by config.guess is i386 so that configure believes it is working
with and generating code for a 32-bit architecture whereas the
compiler is silently generating 64-bit code behind configure's
back. Not good in concept.
             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...

> To compile a program to run on a host type that differs from the build type, 
> use the configure option --host=hosttype, where hosttype uses the same syntax as buildtype. 
> The host type normally defaults to the build type.
>
> To configure a cross-compiler, cross-assembler, or what have you, you should specify a 
> target different from the host, using the configure option ‘--target=targettype’. The 
> syntax for targettype is the same as for the host type. So the command would look like this:
>
>     ./configure --host=hosttype --target=targettype
>
> The target type normally defaults to the host type. Programs for which cross-operation is 
> not meaningful need not accept the ‘--target’ option, because configuring an entire operating 
> system for cross-operation is not a meaningful operation.

If you look at fink 10.4 unstable, you will find that combination is commonly used as...

./configure %c --build=%m-apple-darwin`uname -r|cut -f1 -d.` --host =%m-apple-darwin`uname -r|cut -f1 -d.`

to deal with this schizophrenia between the reported and true architecture
for EMT64 on darwin10.




More information about the macports-dev mailing list