Steven G. Johnson schrieb:
Christian Rössel wrote:
Therefore I usually specify --host *and* --build if I want to cross
compile. If $host != $build, configure sets cross_compiling to yes
Ah yes, that is an easier workaround than hacking the configure script.
Hi Steven,
I don't think that this is a workaround. The documentation
(http://www.gnu.org/software/autoconf/manual/autoconf.html#Hosts-and-Cross_002dCompilation)
clearly states:
...
If you specify both, and they're different, configure enters cross
compilation mode, so it doesn't run any tests that require execution.
...
Whenever you specify --host, be sure to specify --build too.
However, this doesn't change the fact that there is a bug: autoconf's
detection of cross-compiling when cross_compiling=maybe should be fixed
on BlueGene. Specifying --build is only a workaround, not a fix.
cross_compiling=maybe has nothing to do with Blue Gene. Just search your
configure scripts for following lines:
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
I never had a problem switching to cross compile mode when I specified
both, --host and --build, so I don't see a bug there.
Note that we are working on some heuristics to detect supercomputer
platforms like Blue Gene, Cray, NEC etc. that require cross
compilation. This detection will be available as a macro soon and
render it unnecessary that the user specifies --host and --build on
the supported platforms.
I'm not sure that's the right approach. The default when running
configure should be to compile for the build host (i.e., the front-end
nodes on BlueGene etc.). Also, the autoconf philosophy is to do feature
tests rather than platform-specific heuristics whenever possible.
Therefore I'm not sure if my macro will be general enough to be included
in config.guess. But a macro
AC_SET_HOST_FOR_CROSS_COMPILE_SUPERCOMPUTERS will be useful for many
applications.
Christian
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf