From f040ef09ff015c2104048ea5cd4ededd7d52166e Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 18 Feb 2015 03:23:52 -0800 Subject: [PATCH] libfabric: properly define HAVE_ALIAS_ATTRIBUTE @ggouaillardet identified that HAVE_ALIAS_ATTRIBUTE was not properly being defined in the embedded libfabric. This is because the embedded configury missed the test for it (i.e., the real configure.ac for libfabric always defines HAVE_ALIAS_ATTRIBUTE to 0 or 1 -- we didn't emulate that properly here in libfabric's configure.m4). Also, fix some grammar and properly escape another AC_MSG_CHECKING message in libfabric's configure.m4. --- opal/mca/common/libfabric/configure.m4 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/opal/mca/common/libfabric/configure.m4 b/opal/mca/common/libfabric/configure.m4 index 07a8827b8b..2a4a62e16b 100644 --- a/opal/mca/common/libfabric/configure.m4 +++ b/opal/mca/common/libfabric/configure.m4 @@ -205,7 +205,7 @@ AC_DEFUN([_OPAL_COMMON_LIBFABRIC_SETUP_LIBFABRIC_EMBEDDED],[ # support. # Check for gcc atomic intrinsics - AC_MSG_CHECKING(compiler support for c11 atomics) + AC_MSG_CHECKING([if compiler support for c11 atomics]) AC_TRY_LINK([#include ], [atomic_int a; atomic_init(&a, 0); @@ -221,6 +221,21 @@ AC_DEFUN([_OPAL_COMMON_LIBFABRIC_SETUP_LIBFABRIC_EMBEDDED],[ ], [AC_MSG_RESULT(no)]) + AC_MSG_CHECKING([if linker supports the alias attribute]) + AC_LINK_IFELSE( + [AC_LANG_SOURCE[ + int foo(int arg); + int foo(int arg) { return arg + 3; }; + int foo2(int arg) __attribute__ (( __alias__("foo"))); + ]], + [AC_MSG_RESULT([yes]) + opal_common_libfabric_alias_symbols=1], + [AC_MSG_RESULT([no]) + opal_common_libfabric_alias_symbols=0]) + AC_DEFINE_UNQUOTED([HAVE_ALIAS_ATTRIBUTE], + [$opal_common_libfabric_alias_symbols], + [Define to 1 if the linker supports alias attribute.]) + # Do stuff for specific providers _OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_USNIC _OPAL_COMMON_LIBFABRIC_EMBEDDED_PROVIDER_PSM