[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: fix cross-compilation detection on Blue Gene/L
From: |
Steven G. Johnson |
Subject: |
PATCH: fix cross-compilation detection on Blue Gene/L |
Date: |
Mon, 08 Jun 2009 21:42:36 -0400 |
User-agent: |
Thunderbird 2.0.0.21 (Macintosh/20090302) |
As I discussed recently on the autoconf mailing list, the cross-compiler
detection on the IBM Blue Gene (when you pass --host but not --build)
gives a false negative, because no-op executables still run on the build
machine.
The attached patch fixes the false negative, by creating a file in the
test program that is run. This should be safe because our other
autoconf tests (e.g. AC_COMPUTE_INT) already assume that files can be
created (via fopen/fclose) when not cross-compiling, so it's checking
for a feature we rely on anyway.
The patch is against git head, and 'make check' passes for me. My
copyright assignment for autoconf is already on file with the FSF for
many years now.
Regards,
Steven G. Johnson
2009-06-08 Steven G. Johnson <address@hidden>
Create a file in test program when detecting cross-compilation.
* lib/autoconf/lang.m4 (_AC_LANG_IO_PROGRAM): New macro, returns
program that creates a file.
(_AC_COMPILER_EXEEXT,_AC_COMPILER_EXEEXT_WORKS): Call new macro
and document why it's needed to robustly detect cross-compiling.
* lib/autoconf/c.m4 (_AC_LANG_IO_PROGRAM): Implement new macro.
* lib/autoconf/fortran.m4 (_AC_LANG_IO_PROGRAM): Likewise.
* lib/autoconf/erlang.m4 (_AC_LANG_IO_PROGRAM): Likewise.
patch.out
Description: Binary data
- PATCH: fix cross-compilation detection on Blue Gene/L,
Steven G. Johnson <=