On 2/1/2012 4:14 PM, Christopher Samuel wrote:
On 02/02/12 10:38, Paul H. Hargrove wrote:
> I am not sure if one should fix this by:
> a) Document the need for CFLAGS=-qhalt=e
> b) Force "-qhalt=e" at configure time when CC=xlc
> c) Find some other way to fix the configure probe
>
> My vote is for "(b)"
Mine too, either that or:
d) Exit saying the user has to set it, or use a different compiler.
I think I'd like to change my vote to (d) IFF we can determine the flag
is needed but not set.
Something like (untested):
AC_COMPILE_IFELSE([
extern int one_arg(int x);
extern int two_arg(int x, int y);
int foo(void) { return one_arg(1, 2) + two_arg(3); }
], [
AC_MSG_WARN([Your C compiler does not consider incorrect argument
counts to be a fatal error.])
if test "$hwloc_check_compiler_vendor_result" = "ibm"; then
AC_MSG_WARN([For XLC you may try appending '-qhalt=-e' to the
value of CFLAGS.])
AC_MSG_WARN([Alternatively you may configure with a different
compiler.])
else
AC_MSG_WARN([Please report this failure, and configure using a
different C compiler if possible.])
fi
AC_MSG_ERROR([Cannot continue.])
])
-Paul
--
Paul H. Hargrove phhargr...@lbl.gov
Future Technologies Group
HPC Research Department Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900