* Paolo Bonzini wrote on Fri, Aug 07, 2009 at 04:52:32PM CEST: > On 08/07/2009 01:51 PM, Paolo Bonzini wrote: > > > >Yes, I was thinking of "return atoi(argv[1]);" and check the exit status. > > Alternatively, can you try this patch? It would only work for a > cross-compilation setting, forcing you to specify --host=FOO or > appropriate LDFLAGS if compiling natively on a platform lacking > printf. Is this at all possible for RTEMS?
> commit 1bf41a68050d04c57be42a5cb334294913684933 > Author: Paolo Bonzini <[email protected]> > Date: Fri Aug 7 16:40:34 2009 +0200 > > use a separate program to test whether the compiler works > > * lib/autoconf/c.m4 (_AC_LANG_NULL_PROGRAM(C)): New. > * lib/autoconf/erlang.m4 (_AC_LANG_NULL_PROGRAM(Erlang)): New. > * lib/autoconf/lang.m4 (AC_LANG_DEFINE): Copy _AC_LANG_NULL_PROGRAM. > (_AC_LANG_NULL_PROGRAM(), _AC_LANG_NULL_PROGRAM): New. > (_AC_COMPILER_EXEEXT_DEFAULT): Print here "whether the xyz compiler > works", > before exiting. > (_AC_COMPILER_EXEEXT_WORKS): Merge into _AC_COMPILER_EXEEXT_CROSS, remove > the "whether the xyz compiler works" message, use conftest$ac_cv_exeext > instead of $ac_file. > (_AC_COMPILER_EXEEXT): Try _AC_COMPILER_EXEEXT_DEFAULT using the > null program, and clean conftest.out only after _AC_COMPILER_EXEEXT_CROSS. Doesn't this patch have to introduce _AC_LANG_NULL_PROGRAM(...) for F77 and FC? One of the fears is that third party packages use the undocumented macros (e.g., GCC overrides _AC_COMPILER_EXEEXT; its use seems to be safe with this change, but I haven't checked other packages). Thanks, Ralf
