[前][次][番号順一覧][スレッド一覧]

ruby-changes:65835

From: Nobuyoshi <ko1@a...>
Date: Sat, 10 Apr 2021 16:05:16 +0900 (JST)
Subject: [ruby-changes:65835] 4a6c7f8696 (master): configuRe: always check for atomic/sync builtins [Bug #17787]

https://git.ruby-lang.org/ruby.git/commit/?id=4a6c7f8696

From 4a6c7f8696f3a5df36fb752990f037b8ba9b5937 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 9 Apr 2021 17:51:31 +0900
Subject: 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.
---
 configure.ac | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 6b5dc36..6fe43bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1549,7 +1549,9 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L1549
 	AC_DEFINE_UNQUOTED([RUBY_ALIAS_FUNCTION_VOID(prot, name, args)],
 			   [RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)])
     ])
+])
 
+{
     AC_CACHE_CHECK([for __atomic builtins], [rb_cv_gcc_atomic_builtins], [
 	AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned int atomic_var;]],
 		    [[
@@ -1580,7 +1582,6 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L1582
     AS_IF([test "$rb_cv_gcc_sync_builtins" = yes], [
 	AC_DEFINE(HAVE_GCC_SYNC_BUILTINS)
     ])
-])
 
     AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable,
     [RUBY_WERROR_FLAG(
@@ -1593,6 +1594,7 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L1594
     AS_IF([test "$rb_cv_func___builtin_unreachable" = yes], [
 	AC_DEFINE_UNQUOTED(UNREACHABLE, [__builtin_unreachable()])
     ])
+}
 
 AC_CACHE_CHECK(for exported function attribute, rb_cv_func_exported, [
 rb_cv_func_exported=no
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]