Hello, Ian!

>    My idea was that the absence of "--cross" should make "configure" stop
>    with an error and give you a chance to fix your system or try harder with
>    "--cross" if the compiler produces non-execuable files.
> 
> I assume you mean in the absence of an explicit --build or --host
> option.

The problem is that not every "configure" accepts "--host" but every
package should be cross-compilable. Perhaps those simple packages that
don't know about "--host" are most portable and suited for
cross-compilation.

I tend to agree with you that we should not introduce a new option without
trying to reuse the existing ones.

Perhaps the simple packages that don't use AC_CANONICAL_* and don't have
config.{guess,sub} could still understand "--host". But it will have only
limited effects:

- $host_alias and $ac_tool_prefix will be defined
- "configure" will assume that we are cross-compiling
- AC_TRY_RUN tests will not be run
- AC_PATH_TOOL will test for tools beginning with $ac_tool_prefix

Note that the value of $host_alias will not be compared to anything. I.e.
if you specify "--host" you are cross-compiling. $host, $host_os,
$host_cpu and $host_vendor will never be defined.

Packages that include AC_CANONICAL_* will have all those variables
defined. $host will be compared with $build. Cross-compiling will be
assumed when and only when $host != $build

Does this sound reasonable?

Regards,
Pavel Roskin

Reply via email to