On 2012-04-23 19:32, Paul Eggert wrote: > On 04/23/2012 04:16 AM, Bruno Haible wrote: >> 2012-04-23 Bruno Haible <[email protected]> >> >> doc: Mention an effect of --build on AC_RUN_IFELSE. >> * doc/autoconf.texi (Specifying Target Triplets): Mention another >> effect of --build. > > Thanks, I pushed the following slightly-different > (and I hope clearer) patch. I don't understand > the disagreement about what --host and --build > should do (I try not to do cross-builds myself...)
Currently "./configure --host=foo --build=`./config.guess`" is different from "./configure --host=foo" on a build system that can execute host code (such as when doing Cygwin->MinGW or Linux-x86_64->Linux-x86 crosses) in that the former enters cross-compile mode, but the latter doesn't. It is clearly confusing that you get different behavior by explicitly specifying a default value. Bruno thinks it is bad to enter cross-compile mode when the build system can execute host code and wants to zap the warning that keeps nagging his use case (i.e. not specifying --build). I think it is bad that the variable 'cross_compiling' is set to the wrong thing and would rather get rid of the heuristic that sets it to "no" just because the build system happens to be able to run host code. People have been known to use the outcome of that test as an argument that they are not cross-compiling when in fact they are. But I also recognize that Bruno have a valid use case, but think executing the tests in cross-compile mode should perhaps be enabled by a specific option (e.g. --disable- cross-compile-mode) instead of by omitting --build. Cheers, Peter
