Le 02/02/2012 11:54, Samuel Thibault a écrit :
> Paul H. Hargrove, le Thu 02 Feb 2012 01:43:45 +0100, a écrit :
>>
>> 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):
> I would actually say both: pass -qhalt=e to xlc

Is "vendor=ibm" equivalent to "compiler=xlc"?
The current vendor detection code looks for __xlC__ __IBMC__ and
__IBMCPP__ before falling back to __AIX without __GNUC__. Can we pass
-qhalt=e in all these cases? Or should we grep for xlc in the version
output like [1] ?

Brice


[1] http://web.archiveorange.com/archive/v/5XO9yHnzrWVNchqS9lgc


$ git diff
diff --git a/config/hwloc.m4 b/config/hwloc.m4
index fa91721..db92796 100644
--- a/config/hwloc.m4
+++ b/config/hwloc.m4
@@ -268,7 +268,9 @@ EOF])
     _HWLOC_C_COMPILER_VENDOR([hwloc_c_vendor])
     _HWLOC_CHECK_ATTRIBUTES
     _HWLOC_CHECK_VISIBILITY
-    HWLOC_CFLAGS="$HWLOC_FLAGS $HWLOC_VISIBILITY_CFLAGS"
+    HWLOC_CFLAGS="$HWLOC_FLAGS $HWLOC_VENDOR_CFLAGS $HWLOC_VISIBILITY_CFLAGS"
+    AS_IF([test "$HWLOC_VENDOR_CFLAGS" != ""],
+          [AC_MSG_WARN(["$HWLOC_VENDOR_CFLAGS" has been added to the hwloc 
CFLAGS])])
     AS_IF([test "$HWLOC_VISIBILITY_CFLAGS" != ""],
           [AC_MSG_WARN(["$HWLOC_VISIBILITY_CFLAGS" has been added to the hwloc 
CFLAGS])])

diff --git a/config/hwloc_check_vendor.m4 b/config/hwloc_check_vendor.m4
index 1a9b944..9053734 100644
--- a/config/hwloc_check_vendor.m4
+++ b/config/hwloc_check_vendor.m4
@@ -146,7 +146,8 @@ AC_DEFUN([_HWLOC_CHECK_COMPILER_VENDOR], [
     # IBM XL C/C++
     AS_IF([test "$hwloc_check_compiler_vendor_result" = "unknown"],
           [HWLOC_IF_IFELSE([defined(__xlC__) || defined(__IBMC__) || 
defined(__IBMCPP__)],
-               [hwloc_check_compiler_vendor_result="ibm"],
+               [hwloc_check_compiler_vendor_result="ibm"
+               HWLOC_VENDOR_CFLAGS="-qhalt=e"],
                [HWLOC_IF_IFELSE([defined(_AIX) && !defined(__GNUC__)],
                     [hwloc_check_compiler_vendor_result="ibm"])])])



Reply via email to