Compare commits
10 Commits
master
...
master-ris
Author | SHA1 | Date | |
---|---|---|---|
3e5b20e2a9 | |||
120ff99bc9 | |||
03cb588be8 | |||
98349071bc | |||
f297a7ee61 | |||
4a959b9846 | |||
4916a7212e | |||
60baed04d5 | |||
d2b1e688a4 | |||
0645d264b1 |
37
abe2e7de4d1f2d5861d7c9ab9c7e778f2ee1dcd2.patch
Normal file
37
abe2e7de4d1f2d5861d7c9ab9c7e778f2ee1dcd2.patch
Normal file
@ -0,0 +1,37 @@
|
||||
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);
|
13
ruby-2.7.1-disable-riscv64-clocks.patch
Normal file
13
ruby-2.7.1-disable-riscv64-clocks.patch
Normal file
@ -0,0 +1,13 @@
|
||||
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)
|
||||
}
|
33
ruby.spec
33
ruby.spec
@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
%global release 130
|
||||
%{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
|
||||
%{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}.0.riscv64%{?dist}}
|
||||
|
||||
# The RubyGems library has to stay out of Ruby directory tree, since the
|
||||
# RubyGems should be share by all Ruby implementations.
|
||||
@ -159,6 +159,14 @@ Patch13: ruby-2.8.0-remove-unneeded-gem-require-for-ipaddr.patch
|
||||
# https://github.com/ruby/openssl/pull/216
|
||||
Patch22: ruby-2.6.0-config-support-include-directive.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}
|
||||
Suggests: rubypick
|
||||
Recommends: ruby(rubygems) >= %{rubygems_version}
|
||||
@ -569,6 +577,11 @@ rm -rf ext/fiddle/libffi*
|
||||
%patch13 -p1
|
||||
%patch22 -p1
|
||||
|
||||
%ifarch riscv64
|
||||
%patch30 -p1
|
||||
%patch31 -p1
|
||||
%endif
|
||||
|
||||
# Provide an example of usage of the tapset:
|
||||
cp -a %{SOURCE3} .
|
||||
|
||||
@ -853,10 +866,23 @@ MSPECOPTS="$MSPECOPTS -P 'File.lchmod raises a NotImplementedError when called'"
|
||||
# Increase timeout for TestBugReporter#test_bug_reporter_add test, which fails
|
||||
# quite often.
|
||||
# https://bugs.ruby-lang.org/issues/16492
|
||||
%ifarch s390x
|
||||
%ifarch s390x riscv64
|
||||
sed -i '/assert_in_out_err/ s/)/, timeout: 30)/' test/-ext-/bug_reporter/test_bug_reporter.rb
|
||||
%endif
|
||||
|
||||
%ifarch riscv64
|
||||
# TestRubyOptions#test_segv_setproctitle: execution of assert_in_out_err expired timeout (10 sec)
|
||||
# TestRubyOptions#test_segv_loaded_features: execution of assert_in_out_err expired timeout (10 sec)
|
||||
# TestJIT#test_compile_insn_once: gcc: internal compiler error: Segmentation fault signal terminated program cc1
|
||||
# The following timeout on QEMU:
|
||||
# Racc::TestRaccCommand#test_cast: execution of assert_ruby_status expired timeout (10 sec)
|
||||
# Racc::TestRaccCommand#test_riml: execution of assert_ruby_status expired timeout (10 sec)
|
||||
# TestBugReporter#test_bug_reporter_add: execution of assert_in_out_err expired timeout (30 sec)
|
||||
# TestFiber#test_many_fibers_with_threads: execution of assert_normal_exit expired timeout (60 sec)
|
||||
# TestRubyOptions#test_segv_test: execution of assert_in_out_err expired timeout (10 sec)
|
||||
DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|loaded_features\)/ -n !/test_compile_insn_once/ -n !/test_cast/ -n !/test_riml/ -n !/test_bug_reporter_add/ -n !/test_many_fibers_with_threads/ -n !/test_segv_test/"
|
||||
%endif
|
||||
|
||||
make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS"
|
||||
|
||||
%files
|
||||
@ -1270,6 +1296,9 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS"
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Apr 20 2020 David Abdurachmanov <david.abdurachmanov@sifive.com> - 2.7.1-130.0.riscv64
|
||||
- Disable pthread assert on RISC-V (riscv64)
|
||||
|
||||
* Wed Apr 08 2020 Vít Ondruch <vondruch@redhat.com> - 2.7.1-130
|
||||
- Bundle did_you_mean into StdLib.
|
||||
Resolves: rhbz#1817178
|
||||
|
Loading…
Reference in New Issue
Block a user