mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) abe2e7de4d: [Backport #16774]
Don't require sub-word atomics On some architectures (like RISC-V) sub-word atomics are only available when linking against -latomic, but the configure script doesn't do that, causing the atomic checks to fail and the resulting ruby binary is non-functional. Ruby does not use sub-word atomic operations, rb_atomic_t is defined to unsigned int, so use unsigned int when checking for atomic operations. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
This commit is contained in:
parent
c98aa2db60
commit
ba6f087944
2 changed files with 3 additions and 3 deletions
|
|
@ -1457,7 +1457,7 @@ AS_IF([test "$GCC" = yes], [
|
|||
])
|
||||
|
||||
AC_CACHE_CHECK([for __atomic builtins], [rb_cv_gcc_atomic_builtins], [
|
||||
AC_TRY_LINK([unsigned char atomic_var;],
|
||||
AC_TRY_LINK([unsigned int atomic_var;],
|
||||
[
|
||||
__atomic_exchange_n(&atomic_var, 0, __ATOMIC_SEQ_CST);
|
||||
__atomic_exchange_n(&atomic_var, 1, __ATOMIC_SEQ_CST);
|
||||
|
|
@ -1472,7 +1472,7 @@ AS_IF([test "$GCC" = yes], [
|
|||
])
|
||||
|
||||
AC_CACHE_CHECK([for __sync builtins], [rb_cv_gcc_sync_builtins], [
|
||||
AC_TRY_LINK([unsigned char atomic_var;],
|
||||
AC_TRY_LINK([unsigned int atomic_var;],
|
||||
[
|
||||
__sync_lock_test_and_set(&atomic_var, 0);
|
||||
__sync_lock_test_and_set(&atomic_var, 1);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
||||
#define RUBY_VERSION_TEENY 3
|
||||
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
||||
#define RUBY_PATCHLEVEL 165
|
||||
#define RUBY_PATCHLEVEL 166
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2021
|
||||
#define RUBY_RELEASE_MONTH 3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue