Nick Bowler <nbowler@xxxxxxxxxx> writes: > On 2020-08-22, wferi@xxxxxxx <wferi@xxxxxxx> wrote: > >> https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html >> is rather hard to follow in general, but also contains the following >> clear-cut statement: "Now, configure enters cross-compilation mode if >> and only if --host is passed." >> >> However, if I pass in my build architecture Autoconf 2.69 reports: >> >> $ ./configure --host=x86_64-linux-gnu > > I imagine that the authors meant to write "only if", rather than > "if and only if" because indeed the statement as written is not true > (the manual immediately goes on to explain the actual behaviour). Thanks, that makes perfect sense. The documentation linked above is confusing because it describes the 2.13 behavior, the 2.50 behavior and the "backward compatibility scheme" together. For example it starts with "the chain of default is now simply: target defaults to host, host to build, and build to the result of config.guess", then later "when --host is specified but --build isn't, the build system is assumed to be the same as --host", which is a contradiction, although "eventually, this historically incorrect behavior will go away." So has this eventuality happened already? > Specifying --host alone *may* select cross compilation based on > heuristic (whether the compiler's output can be executed). As the > manual explains this is fragile and is provided for compatibility > with historical behaviour. It also mentions that "by the time the compiler test is performed, it may be too late to modify the build-system type". What would modify the build-system type anyway? Isn't this only about whether to enter cross-compilation mode? By the way: does "cross-compilation mode" equal that configure "doesn't run any tests that require execution", or is this only a single implication of it? > By specifying both --host and --build and then cross compilation mode > is enabled whenever they are different. This is the preferred method. I see. But what do I do in a true multiarch setup, for example when I compile for i386 on an x86_64 build system, which can transparently run the i386 binaries, and thus I don't want to throw away the tests requiring execution? Such setups are becoming more and more common. (Sorry for the avalance of questions. Please Cc me, I'm not subscribed.) -- Thanks, Feri