Akim Demaille wrote:
>
> >>>>> "Ralf" == Ralf Corsepius <[EMAIL PROTECTED]> writes:
>
> >> Well, I hear you Pavel. I'm going to rewrite my patch, and submit
> >> it. It will try to warn when --host, --build or --target is used
> >> when it is not supposed to be.
>
> Ralf> I hope you consider that passing all three (including --target)
> Ralf> can give sense occasionally.
>
> Ralf> Example: A toplevel configure.in configuring packages in
> Ralf> subdirectories in a similar way to what the toplevel
> Ralf> Cygnus-configure in Cygnus source-tree does. [Imagine rewriting
> Ralf> the toplevel Cygnus configure with autoconf.]
>
> I don't understand your point. Are you saying that it can happen that
> you cross-configure a deep package with parts of which can be
> cross-compiled, and others not? And then you;d like configure to be
> quiet?
>
> I'm not sure that's the most helping choice?
>
> But the patch I'm referring to does enable the three options when they
> make sense.
>
> >> But I do understand that the present case is somewhat different,
> >> and if knowledgeable people agree it should die, I will follow you,
> >> of course.
>
> Ralf> IMO, passing --target rarely gives sense, but it sometimes does.
> Ralf> Therefore, if it shall be removed from AC_CANONICAL_SYSTEM, then
> Ralf> a AC_CANONICAL_TARGET macro should be provided instead.
>
> We have to keep AC_CAN_SYS for backward compatibility.
>
> Because of the defaults, AC_C_TAR requires AC_C_HOST which requires
> AC_C_BUILD, so indeed AC_C_TAR == AC_C_SYS.
>
> >> I have one question. It seems to me that --build always makes
> >> sense.
> Ralf> Agreed, it would then play the role $host* has been playing
> Ralf> until now, therefore it should be treated like $host has been
> Ralf> treated before.
>
> Ralf> Therefore in case of a package not explicitly considering
> Ralf> cross-compilation (esp. if not using AC_CHECK_TOOLS and
> Ralf> AC_CANONICAL_HOST), it should be setup identical as $host* has
> Ralf> been setup until now, with $host now defaulting from $build.
>
> I think I agree, but I don't quite get your point :) But my question
> is more or less `should AC_C_BUILD always be used', which means that
> config.* should always be shipped. I'm not sure people want this.
>
> >> Still, should it be ``accepted'' only when some AC_CANONICAL_stuff
> >> was required?
>
> Ralf> AC_CANONICAL_* implies adding config.guess and config.sub.
>
> Ralf> To avoid always having to add config.guess and config.sub,
> Ralf> $build* and $host* should be both available in native-only
> Ralf> cases, but should abort if host!=build.
>
> Ralf> Then, host!=build should only be accepted if AC_CANONICAL_* (and
> Ralf> therefore config.guess/config.sub, too) is present.
>
> Hm, I think I'm starting to understand what you mean. But I'd like to
> hear more comments about this.
>
I am talking about a toplevel configure.in, which sets up build
subdirectories and environment variables, depending on subpackages'
purposes, eg. the toplevel configure of the gnu toolchain.
This toplevel configure takes --target and evaluates $target_alias and
then sets up configure arguments of subpackages.
If using autoconf / automake generated configure scripts instead of
cygnus configure for similar purposes, until now the only way to get
--target was AC_CANONICAL_SYSTEM.
Actually, --target in such configure scripts is a package-dependent,
specialized option, so using --enable-target instead would have been
much cleaner.
However, until now autoconf has no generic macro to translate
configuration arguments into canonicalization triples (aliases), which
prevents using --enable-target. AC_CANONICAL_SYSTEM however does it
automatically.
Below you find a small example which should demonstrate what I mean.
To try:
tar xzvf cross-test-0.tar.gz
cd cross-test-0
./bootstrap
./configure --target=<cross-target>
./make
Requirements:
autoconf-2.13, automake-2.14, + cross-toolchain
Ralf
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:[EMAIL PROTECTED] FAX: +49/731/501-999
http://www.faw.uni-ulm.de
cross-test-0.tar.gz