> -----Original Message-----
> From: Pavel Roskin [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 25, 2000 10:47 PM
> To: Ian Lance Taylor
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Is this a bug in autoconf? (patch included)
>
[snip}
>
> > As long as you don't run any intermediate programs on
> the build system,
> > you don't need to know whether you cross-compile or not.
> >
> > Agreed. But if you do run intermediate programs on the build
> > system--i.e., you call AC_TRY_RUN--you do need to know.
>
> Intermediate program for me is something like kaffeh - generator of
> headers for Kaffe, mfmt - generator of help file for MC, generator of
> Unicode tables for lynx and so on, i.e. programs that are used in the
> build process, not tests.
>
> If you persuade configure that build != host then you have to generate
> those tables, help files and headers somewhere else, which is
> ridiculous
> for e.g. i586->i386 cross-compilation.
>
In fact intermediate programs are just a matter of selecting the proper
compiler for the native system (CC_FOR_BUILD IIRC) as opposed to the host
system (CC usually). What would be needed is some way to select these
compilers automagically... For this one may expect that if $host-cc/gcc/c++
or cc/gcc/c++ exists is IS the proper value for CC, and if cc/gcc/c++ or
$build-cc/gcc/c++ exists (and work) is IS the proper value for CC_FOR_BUILD
(note that I purposely check $host-cc before cc and cc before $build-cc).
Then as soon as $build != $host, and if we get properly configured
cross-tools, (that could be documented and may be simply added to cross
tools that do not follow the $host-cc convention), we can use intermediate
programs even when cross-compiling.
Only AC_TRY_RUN would have to complain if a suitable default is not
available when cross-compiling.
This with
build ?= `config.guess
` host ?= $build
target ?= $host
should both simplify installing packages that do not expect to be
cross-compiled (or modify them to be cross-compiled if they need
intermediate programs and do not make use of CC_FOR_BUILD).
Just 2 cents from someone used to build and use (canadian-)? cross tools,
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingéniérie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
--------------------------------------------