autoconf
[Top][All Lists]
Advanced

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

Re: Intended behavior if "--build" and "--host" are set to the same valu


From: Nick Bowler
Subject: Re: Intended behavior if "--build" and "--host" are set to the same value
Date: Wed, 25 Jul 2012 15:51:42 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On 2012-07-25 19:21 +0200, Sven Joachim wrote:
> Hello,
> 
> I have been wondering¹ what the intended behavior of `configure' is if
> both "--build" and "--host" are given and are identical.  The manual
> says
> 
> ,----
> |    They all default to the result of running `config.guess', unless you
> | specify either `--build' or `--host'.  In this case, the default
> | becomes the system type you specified.  If you specify both, and
> | they're different, `configure' enters cross compilation mode, so it
> | doesn't run any tests that require execution.
> `----
> 
> This seems to imply "if they are not different, `configure' does not
> enter cross compilation mode", and this is how it actually has been
> behaving for the last twelve years.  However, the manual also says

OK, so according to your own tests, autoconf behaves as documented above
when both --build and --host are specified, which is good.

> ,----
> |    Now, `configure' enters cross-compilation mode if and only if
> | `--host' is passed.
> `----

Given the rest of the document, and the actual behaviour of autoconf, I
think this is simply a typo, and should read:

  Now, `configure' enters cross-compilation mode only if `--host' is
  passed.

that is, configure will never enter cross compilation mode unless
--host appears on the configure command line (although this is still
not strictly true, since you can also enter cross compilation mode by
setting cross_compiling=yes).

In fact, just below the above quoted passage the document explains
precisely what happens when only --host (and not --build) is specified:

  If you specify --host, but not --build, when configure performs the
  first compiler test it tries to run an executable produced by the
  compiler. If the execution fails, it enters cross-compilation mode.

> contradicting that.  What is the intended behavior that will be
> implemented when hell freez^W^W autoconf 2.13 bug compatibility gets
> finally removed?

Presumably when the compatibility is removed, then --build will default
to config.guess in all operating modes, the magic autodetection of cross
compilation will go away, and we will all be happier for it.

Cheers,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)




reply via email to

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