This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Updating top-level autoconf to 2.59
"Maciej W. Rozycki" <macro@linux-mips.org> writes:
> All cases covered, no ambiguity. Now I gather the questionable case is
> something like:
>
> $ ./configure --build=i386-linux --host=i386-linux
>
> or:
>
> $ ./configure --build=i386-linux --host=i486-linux
>
> One can say that in the first case the host system is compatible with the
> build system. In the other one it may or it may not be. If the build
> system is actually i586-pc-linux-gnu, then it is compatible and if it is
> i386-pc-linux-gnu, then it is not. But how could autoconf guess? I guess
> it could guess by having a compatibility table, but is it worth the
> hassle? And confusion? You can repeat this with s/host/target/ and
> optionally s/build/host above similarly.
Nobody is saying that autoconf should guess. I'll skip replying to
your arguments about it, since they don't seem relevant.
> Now one could imagine adding options like --enable-cross-to-host and
> --enable-cross-to-target, but they would be redundant given the current
> option semantics and could produce even more surprising results when their
> complements are applied to configuration selections that are indeed
> cross-environments.
>
> Having given the reasoning above I gather rather than specifying:
>
> $ ./configure --build=i386-linux
>
> you'd prefer to say something like:
>
> $ ./configure --disable-cross-to-host --host=i386-linux
>
> What's the gain of the latter over the former?
Nothing. The gain comes when you realize that I'm building a lot of
different toolchains, both native and cross, both built with a
cross-compiler and built with a native compiler, and I just routinely
specify all of --build, --host, and --target. With autoconf's rules,
I have to do an odd little dance to remove --host and/or --target in
some cases. That dance is completely doable but it is not, I believe,
intuitive.
If we add options to say "build with native compiler/cross-compiler"
and "build a native toolchain/cross-compiler" then it becomes much
simpler to reason about what you want to happen.
And note that adding such options is completely backward compatible.
They would just override the way that autoconf makes assumptions.
Ian