Skip to content

Commit 409a3bf

Browse files
committed
configury: abort when builtin atomics cannot be built and configure'd with --enable-builtin-atomics
Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent b1e639e commit 409a3bf

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

config/opal_config_asm.m4

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -970,16 +970,15 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
970970
971971
AC_ARG_ENABLE([builtin-atomics],
972972
[AC_HELP_STRING([--enable-builtin-atomics],
973-
[Enable use of __sync builtin atomics (default: enabled)])],
974-
[], [enable_builtin_atomics="yes"])
973+
[Enable use of __sync builtin atomics (default: enabled)])])
975974
976975
opal_cv_asm_builtin="BUILTIN_NO"
977-
if test "$opal_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" = "yes" ; then
978-
OPAL_CHECK_GCC_ATOMIC_BUILTINS([opal_cv_asm_builtin="BUILTIN_GCC"], [])
979-
fi
980-
if test "$opal_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" = "yes" ; then
981-
OPAL_CHECK_SYNC_BUILTINS([opal_cv_asm_builtin="BUILTIN_SYNC"], [])
982-
fi
976+
AS_IF([test "$opal_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" != "no"],
977+
[OPAL_CHECK_GCC_ATOMIC_BUILTINS([opal_cv_asm_builtin="BUILTIN_GCC"], [])])
978+
AS_IF([test "$opal_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" != "no"],
979+
[OPAL_CHECK_SYNC_BUILTINS([opal_cv_asm_builtin="BUILTIN_SYNC"], [])])
980+
AS_IF([test "$opal_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" = "yes"],
981+
[AC_MSG_ERROR([__sync builtin atomics requested but not found.])])
983982
984983
OPAL_CHECK_ASM_PROC
985984
OPAL_CHECK_ASM_TEXT

0 commit comments

Comments
 (0)