mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
configure: always check for atomic/sync builtins [Bug #17787]
Non-gcc compilers tend to have this intrinsic these days, e.g. xlc has `__sync` builtins.
This commit is contained in:
parent
8b7cab70eb
commit
4a6c7f8696
Notes:
git
2021-04-10 16:05:23 +09:00
1 changed files with 3 additions and 1 deletions
|
@ -1549,7 +1549,9 @@ AS_IF([test "$GCC" = yes], [
|
||||||
AC_DEFINE_UNQUOTED([RUBY_ALIAS_FUNCTION_VOID(prot, name, args)],
|
AC_DEFINE_UNQUOTED([RUBY_ALIAS_FUNCTION_VOID(prot, name, args)],
|
||||||
[RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)])
|
[RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)])
|
||||||
])
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
{
|
||||||
AC_CACHE_CHECK([for __atomic builtins], [rb_cv_gcc_atomic_builtins], [
|
AC_CACHE_CHECK([for __atomic builtins], [rb_cv_gcc_atomic_builtins], [
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned int atomic_var;]],
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned int atomic_var;]],
|
||||||
[[
|
[[
|
||||||
|
@ -1580,7 +1582,6 @@ AS_IF([test "$GCC" = yes], [
|
||||||
AS_IF([test "$rb_cv_gcc_sync_builtins" = yes], [
|
AS_IF([test "$rb_cv_gcc_sync_builtins" = yes], [
|
||||||
AC_DEFINE(HAVE_GCC_SYNC_BUILTINS)
|
AC_DEFINE(HAVE_GCC_SYNC_BUILTINS)
|
||||||
])
|
])
|
||||||
])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable,
|
AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable,
|
||||||
[RUBY_WERROR_FLAG(
|
[RUBY_WERROR_FLAG(
|
||||||
|
@ -1593,6 +1594,7 @@ AS_IF([test "$GCC" = yes], [
|
||||||
AS_IF([test "$rb_cv_func___builtin_unreachable" = yes], [
|
AS_IF([test "$rb_cv_func___builtin_unreachable" = yes], [
|
||||||
AC_DEFINE_UNQUOTED(UNREACHABLE, [__builtin_unreachable()])
|
AC_DEFINE_UNQUOTED(UNREACHABLE, [__builtin_unreachable()])
|
||||||
])
|
])
|
||||||
|
}
|
||||||
|
|
||||||
AC_CACHE_CHECK(for exported function attribute, rb_cv_func_exported, [
|
AC_CACHE_CHECK(for exported function attribute, rb_cv_func_exported, [
|
||||||
rb_cv_func_exported=no
|
rb_cv_func_exported=no
|
||||||
|
|
Loading…
Reference in a new issue