On Jun 19, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote:
> I'm sorry, but I disagree. The only sane and simple definition of
> cross-compilation is when --host is specified.
It might be simple, but I'm not sure it's sane. If host and build are
identical, it doesn't make sense to assume we're cross-compiling.
> For instance you might be willing to use --host = --build just to
> check how your configure behaves in a (comfortable)
> cross-compilation situation.
I don't buy that. I could just specify any other arbitrary --host to
check how configure would behave, or specify a minimally different
--build system.
> From a physicist point of view, --host is necessarily *the* right
> solution: it is extremely simple, and explains everything.
But it is confusing.
> The situation we're coming from is incredibly messy, and there were
> numerous complaints about it. We finally fixed these issues.
But the fix is not backward compatible, and this is just the first of
a series of big problems we're probably going to have to face because
of this change.
IMO, we should take smaller steps in the right direction. Since we're
going to introduce an incompatible change, we should first warn about
the change in behavior, give people time to get used to it, then make
the final change. Meanwhile, we may have to support a messy set-up,
but that's the right way to deal with users.
So I amend my suggestion as follows:
Alexandre> If only one of --build, --host and TRIPLET is specified,
Alexandre> use it for host and build, and assume not cross-compiling.
If only --host was specified, warn the user that he probably meant
--build, and proceed as above.
Alexandre> If at least two of --build, --host and TRIPLET are
Alexandre> specified, assume cross compilation if they differ.
Alexandre> TRIPLET would be used as the default for either --host or
Alexandre> --build, whichever was not specified.
Alexandre> TRIPLET, if specified, would also be used as the default
Alexandre> for target, unless --target is specified. If all of
Alexandre> --build, --host, --target and TRIPLET are specified, issue
Alexandre> an error (warning?) message indicating that TRIPLET is
Alexandre> useless.
If TRIPLET is specified, emit a warning suggesting that the user
should have used --build, --host and/or --target instead.
> Really, I find this very messy. Messy to implement, to document, and
> to understand. How can you reasonably understand what is going to
> happen? When will you know that what-is-typed-is-what-you-meant?
The rule is simple: --build specifies the build system and the default
for --host. --host specifies the host system and the default for
--target; if it differs from --build, assume a cross-compiler is in
use; for backward compatibility, if --build is not specified, warn and
default it to --host. --target specifies the target platform, when
creating compilers/assemblers/linkers/debuggers/etc. TRIPLET produces
a warning and overrides any other defaults, and is provided only for
backward compatibility.
> This solution is about as atrocious as the old one was.
Indeed. But, IMO, it's a step in the right direction, that won't hurt
anyone like the installed change did. We really need a
backward-compatible change, at least for some time, so that people
(including Cygnus customers that have been trained by Cygnus people
and/or documentation) can be made aware of the change, start doing the
right thing, so that we can discontinue the old, wrong way of doing
it.
> PS/ IIUC, it's been a while the Cygnus guys were talking about this
> issue in Autoconf.
Nope. This discussion started in a Cygnus-internal mailing list about
3 weeks ago, and I raised it here about 1.5 weeks afterwards, when I
was back and could deal with all the e-mail that accumulated while I
was away.
> I would have appreciated that the Autoconf people were involved too.
And they'd have appreciated that the Cygnus people were involved in
the discussion when it started here :_)
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me