[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: request for configure clarifications on darwin10

From: Bob Friesenhahn
Subject: Re: request for configure clarifications on darwin10
Date: Wed, 16 Sep 2009 10:05:22 -0500 (CDT)

On Wed, 16 Sep 2009, Jack Howarth wrote:
  The question I have is, in such a case where the detected triplet from
config.guess reports a radically different architecture (i386-apple-darwin10)
than the actual default code execution and compiler code generation
(x86_64-apple-darwin10), might that not be considered a form of
cross-compilation requiring the user pass at least the --target triplet to
configure? Currently, many developers on darwin10 seem to be under the
impression that it is okay to leave configure believing the target is
i386-apple-darwin10 while the actual code generation is x86_64-apple-darwin10.
My view is that this is a misuse of configure since it is basically working
on incorrect assumptions about the architecture.

Autoconf won't think that the build is a cross-build unless config.guess output does not match the target output. By default, config.guess output is is used for all triplets so architecture details don't matter.

I think it is correct for the architecture type reported by config.guess to match the current execution architecture (which may not match the compiler).

Fixing config.guess to produce a more accurate architecture will not make configure run. To make configure run by default would require enhancements in Autoconf (or a new macro included in all projects) which tries to add necessary compiler options (e.g. -m32) so that output of the compiler will actually run. This sort of change would take years to implement and propagate. It is much easier to provide a macports build wrapper which sets compilation flags correctly.

It is good to keep in mind that while Apple's compiler could be considered the "system" compiler, it is an optional installation only usually installed by developers. It is easily replaced. Over the years config.guess has been used by far more than Autoconf and for more than software compilation. Ideally it should report the same results even if the optional compiler is not currently installed.

config.guess misreporting the architecture in this manner. The best approach would seem to be decoupling the architecture from the kernel type and instead relying on the actual code generation. I believe this is in fact done currently for solaris in config.guess...

The Solaris case is interesting but it is rarely used for anything. Last time I tried, GCC was not prepared to build with 64-bit default output on Solaris. 64-bit default output can be achieved using a small wrapper script. As implemented by Autoconf, results are not very accurate since if CC is set by it is (apparently) too late since config.guess has already been executed. That explains why all of my 64-bit Solaris builds still say "i386-pc-solaris2.10".

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

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