Compare commits
4 Commits
f33-riscv6
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
986dc48123 | ||
|
be9961f6d0 | ||
|
946f8b8693 | ||
|
8b746d13cf |
@ -1,37 +0,0 @@
|
|||||||
From abe2e7de4d1f2d5861d7c9ab9c7e778f2ee1dcd2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andreas Schwab <schwab@suse.de>
|
|
||||||
Date: Fri, 10 Apr 2020 15:34:52 +0200
|
|
||||||
Subject: [PATCH] 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(-)
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 7c12b9e5fb94..ba86deffbebb 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -1498,7 +1498,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);
|
|
||||||
@@ -1513,7 +1513,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);
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/spec/ruby/core/process/fixtures/clocks.rb b/spec/ruby/core/process/fixtures/clocks.rb
|
|
||||||
index 7537cfa..c4c647a 100644
|
|
||||||
--- a/spec/ruby/core/process/fixtures/clocks.rb
|
|
||||||
+++ b/spec/ruby/core/process/fixtures/clocks.rb
|
|
||||||
@@ -34,7 +34,7 @@ module ProcessSpecs
|
|
||||||
end
|
|
||||||
|
|
||||||
# These clocks in practice on ARM on Linux do not seem to match their reported resolution.
|
|
||||||
- platform_is :armv7, :armv8, :aarch64 do
|
|
||||||
+ platform_is :armv7, :armv8, :aarch64, :riscv64 do
|
|
||||||
clocks = clocks.reject { |clock, value|
|
|
||||||
[:CLOCK_PROCESS_CPUTIME_ID, :CLOCK_THREAD_CPUTIME_ID, :CLOCK_MONOTONIC_RAW].include?(clock)
|
|
||||||
}
|
|
34
ruby.spec
34
ruby.spec
@ -22,8 +22,8 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%global release 135
|
%global release 136
|
||||||
%{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}.0.riscv64%{?dist}}
|
%{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
|
||||||
|
|
||||||
# The RubyGems library has to stay out of Ruby directory tree, since the
|
# The RubyGems library has to stay out of Ruby directory tree, since the
|
||||||
# RubyGems should be share by all Ruby implementations.
|
# RubyGems should be share by all Ruby implementations.
|
||||||
@ -173,14 +173,6 @@ Patch19: ruby-2.7.1-Timeout-the-test_bug_reporter_add-witout-raising-err.patch
|
|||||||
# https://github.com/ruby/ruby/pull/3393
|
# https://github.com/ruby/ruby/pull/3393
|
||||||
Patch20: ruby-3.0.0-preview1-Enable-arm64-optimizations-that-exist-for-power-x86.patch
|
Patch20: ruby-3.0.0-preview1-Enable-arm64-optimizations-that-exist-for-power-x86.patch
|
||||||
|
|
||||||
# Disable pthread assert on Linux RISC-V (riscv64)
|
|
||||||
Patch30: abe2e7de4d1f2d5861d7c9ab9c7e778f2ee1dcd2.patch
|
|
||||||
|
|
||||||
# Same as for ARM.
|
|
||||||
# See: https://bugs.ruby-lang.org/issues/16007
|
|
||||||
# https://github.com/ruby/ruby/commit/324dd9d01f0c97631a2588f63231bcb651844cca
|
|
||||||
Patch31: ruby-2.7.1-disable-riscv64-clocks.patch
|
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Suggests: rubypick
|
Suggests: rubypick
|
||||||
Recommends: ruby(rubygems) >= %{rubygems_version}
|
Recommends: ruby(rubygems) >= %{rubygems_version}
|
||||||
@ -207,6 +199,7 @@ BuildRequires: procps
|
|||||||
%{?with_hostname:BuildRequires: %{_bindir}/hostname}
|
%{?with_hostname:BuildRequires: %{_bindir}/hostname}
|
||||||
BuildRequires: multilib-rpm-config
|
BuildRequires: multilib-rpm-config
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
BuildRequires: make
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
|
||||||
# This package provides %%{_bindir}/ruby-mri therefore it is marked by this
|
# This package provides %%{_bindir}/ruby-mri therefore it is marked by this
|
||||||
@ -597,11 +590,6 @@ rm -rf ext/fiddle/libffi*
|
|||||||
%patch19 -p1
|
%patch19 -p1
|
||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
|
|
||||||
%ifarch riscv64
|
|
||||||
%patch30 -p1
|
|
||||||
%patch31 -p1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Provide an example of usage of the tapset:
|
# Provide an example of usage of the tapset:
|
||||||
cp -a %{SOURCE3} .
|
cp -a %{SOURCE3} .
|
||||||
|
|
||||||
@ -882,18 +870,6 @@ MSPECOPTS="$MSPECOPTS -P 'File.utime allows Time instances in the far future to
|
|||||||
# https://bugs.ruby-lang.org/issues/16749
|
# https://bugs.ruby-lang.org/issues/16749
|
||||||
MSPECOPTS="$MSPECOPTS -P 'File.lchmod changes the file mode of the link and not of the file'"
|
MSPECOPTS="$MSPECOPTS -P 'File.lchmod changes the file mode of the link and not of the file'"
|
||||||
|
|
||||||
%ifarch riscv64
|
|
||||||
%define test_timeout_scale 100
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%ifarch riscv64
|
|
||||||
# TestBugReporter#test_bug_reporter_add -- killed by SIGABRT (signal 6) (core dumped)
|
|
||||||
# TestRubyOptions#test_segv_loaded_features -- Timeout::Error: execution of assert_in_out_err expired timeout (300.0 sec) // with timeout_scale set to 30
|
|
||||||
# TestRubyOptions#test_segv_setproctitle: execution of assert_in_out_err expired timeout
|
|
||||||
# TestRubyOptions#test_segv_test: Timeout::Error: execution of assert_in_out_err expired timeout (300.0 sec)
|
|
||||||
DISABLE_TESTS="$DISABLE_TESTS -n !/test_bug_reporter_add/ -n !/test_segv_\(setproctitle\|loaded_features\)/ -n !/test_segv_test/"
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Give an option to increase the timeout in tests.
|
# Give an option to increase the timeout in tests.
|
||||||
# https://bugs.ruby-lang.org/issues/16921
|
# https://bugs.ruby-lang.org/issues/16921
|
||||||
%{?test_timeout_scale:RUBY_TEST_TIMEOUT_SCALE="%{test_timeout_scale}"} \
|
%{?test_timeout_scale:RUBY_TEST_TIMEOUT_SCALE="%{test_timeout_scale}"} \
|
||||||
@ -1310,8 +1286,8 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_bug_reporter_add/ -n !/test_segv_\(setpr
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Nov 30 2020 David Abdurachmanov <david.abdurachmanov@sifive.com> - 2.7.2-135.0.riscv64
|
* Tue Nov 24 18:16:02 CET 2020 Vít Ondruch <vondruch@redhat.com> - 2.7.2-136
|
||||||
- Fix for riscv64
|
- Add explicit `BR: make`.
|
||||||
|
|
||||||
* Tue Oct 13 2020 Vít Ondruch <vondruch@redhat.com> - 2.7.2-135
|
* Tue Oct 13 2020 Vít Ondruch <vondruch@redhat.com> - 2.7.2-135
|
||||||
- Upgrade to Ruby 2.7.2.
|
- Upgrade to Ruby 2.7.2.
|
||||||
|
Loading…
Reference in New Issue
Block a user