Maciej W. Rozycki - Re: Updating top-level autoconf to 2.59 (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: "Maciej W. Rozycki"
- To: Ian Lance Taylor
- Cc: Alexandre Oliva , Michael Eager , "Joseph S. Myers" , Daniel Jacobowitz , Paolo Bonzini , gcc-patches at gcc dot gnu dot org, binutils at sourceware dot org, newlib at sourceware dot org
- Date: Fri, 9 Feb 2007 10:53:11 +0000 (GMT)
- Subject: Re: Updating top-level autoconf to 2.59
- References: 20070111225346.GA1335@nevyn.them.org <20070207193352.GA13757@nevyn.them.org> <Pine.LNX.4.64.0702072344050.7123@digraph.polyomino.org.uk> <20070208032909.GA8419@nevyn.them.org> <45CADD5E.404@lu.unisi.ch> <Pine.LNX.4.64.0702081239290.12368@digraph.polyomino.org.uk> <45CB1C16.10407@lu.unisi.ch> <Pine.LNX.4.64.0702081251340.12368@digraph.polyomino.org.uk> <20070208131821.GA2860@nevyn.them.org> <45CB28BB.8050805@lu.unisi.ch> <20070208141800.GA6649@nevyn.them.org> <Pine.LNX.4.64.0702081442160.25268@digraph.polyomino.org.uk> <m37iuslmod.fsf@localhost.localdomain> <45CB5453.3080109@eagercon.com> <or64ab9ajc.fsf@free.oliva.athome.lsd.ic.unicamp.br> <m3veibg9bb.fsf@localhost.localdomain>
On Fri, 8 Feb 2007, Ian Lance Taylor wrote:
Per autoconf docs, --host is supposed to mean --cross. --native is the absence of --host. No room for inconsistencies in options.
The options are consistent, but, to me, they don't make sense. That is why I completely understand what people mean when they speak of reverse engineering the autoconf options. I know what I want to do, autoconf just doesn't let me specify it in a natural way. There is no obvious reason why I can't specify the host when not building with a cross compiler. From my perspective it's just an odd autoconf rule.
I took part in a discussion about these options a while ago -- when I got rid of autoconf 2.13 and discovered some oddities when trying to treat the top-level configure.in with 2.5x (x being sufficiently low back then for autoconf to be considered in its early atge after the big rewrite). I was surprised with the new convention too, but I got convinced even though I'll have to rewrite some scripts eventually. There are a number of cases to be considered and with the new syntax none is unobvious. They are as follows:
- A fully native build:
$ ./configure
- A fully native build with a selected build alias:
$ ./configure --build=i386-linux
- A native build of a cross-compiler:
$ ./configure --target=alpha-linux
- A native build of a cross-compiler with a selected build alias:
$ ./configure --build=i386-linux --target=alpha-linux
- A cross-build of a native compiler:
$ ./configure --host=mipsel-linux
- A cross-build of a native compiler with a selected build alias:
$ ./configure --build=i386-linux --host=mipsel-linux
- A cross-build of a cross-compiler:
$. ./configure --host=mipsel-linux --target=alpha-linux
- A cross-build of a cross-compiler with a selected build alias:
$ ./configure --build=i386-linux --host=mipsel-linux --target=alpha-linux
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.
The old version of autoconf indeed tried doing guessing whether build == host by trying to run an executable built by the selected compiler, but it is an error-prone approach as there are cases of one-way compatibility systems.
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?
Maciej
- Follow-Ups:
- Re: Updating top-level autoconf to 2.59
* From: Ian Lance Taylor
- Re: Updating top-level autoconf to 2.59
- References:
- Re: Updating top-level autoconf to 2.59
* From: Daniel Jacobowitz - Re: Updating top-level autoconf to 2.59
* From: Joseph S. Myers - Re: Updating top-level autoconf to 2.59
* From: Daniel Jacobowitz - Re: Updating top-level autoconf to 2.59
* From: Paolo Bonzini - Re: Updating top-level autoconf to 2.59
* From: Joseph S. Myers - Re: Updating top-level autoconf to 2.59
* From: Paolo Bonzini - Re: Updating top-level autoconf to 2.59
* From: Joseph S. Myers - Re: Updating top-level autoconf to 2.59
* From: Daniel Jacobowitz - Re: Updating top-level autoconf to 2.59
* From: Paolo Bonzini - Re: Updating top-level autoconf to 2.59
* From: Daniel Jacobowitz - Re: Updating top-level autoconf to 2.59
* From: Joseph S. Myers - Re: Updating top-level autoconf to 2.59
* From: Ian Lance Taylor - Re: Updating top-level autoconf to 2.59
* From: Michael Eager - Re: Updating top-level autoconf to 2.59
* From: Alexandre Oliva - Re: Updating top-level autoconf to 2.59
* From: Ian Lance Taylor
- Re: Updating top-level autoconf to 2.59
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |