From 4a959b98461d6e1de39aba974d5b767b5295a199 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Fri, 17 Jan 2020 19:56:49 +0200 Subject: [PATCH] Disable pthread assert for riscv Let's see how far this can go in testing. Signed-off-by: David Abdurachmanov --- riscv-disable-pthread.patch | 14 -------------- ruby-2.6.5-disable-assert.patch | 13 +++++++++++++ ruby.spec | 6 +++--- 3 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 riscv-disable-pthread.patch create mode 100644 ruby-2.6.5-disable-assert.patch diff --git a/riscv-disable-pthread.patch b/riscv-disable-pthread.patch deleted file mode 100644 index 0528ff1..0000000 --- a/riscv-disable-pthread.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 363afee..3276ade 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -770,6 +770,9 @@ AS_CASE(["$target_os"], - enable_pthread=yes - ]) - -+# Disable pthread on RISC-V until compile assert is sorted out -+AS_CASE(["$target_cpu"],[riscv*],[enable_pthread=no],[]) -+ - dnl Checks for libraries. - AS_CASE(["$target_os"],[*bsd*|dragonfly*],[],[ac_cv_func_daemon=no]) - diff --git a/ruby-2.6.5-disable-assert.patch b/ruby-2.6.5-disable-assert.patch new file mode 100644 index 0000000..b93cc43 --- /dev/null +++ b/ruby-2.6.5-disable-assert.patch @@ -0,0 +1,13 @@ +diff --git a/thread_pthread.c b/thread_pthread.c +index 670e917..d466d10 100644 +--- a/thread_pthread.c ++++ b/thread_pthread.c +@@ -1992,7 +1992,7 @@ rb_sigwait_fd_put(const rb_thread_t *th, int fd) + + VM_ASSERT(signal_self_pipe.normal[0] == fd); + old = ATOMIC_PTR_EXCHANGE(sigwait_th, THREAD_INVALID); +- if (old != th) assert(old == th); ++ /* if (old != th) assert(old == th); */ + } + + #ifndef HAVE_PPOLL diff --git a/ruby.spec b/ruby.spec index 3c0f96f..f47c39c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -148,8 +148,8 @@ Patch12: rubygems-3.0.3-Avoid-rdoc-hook-when-its-failed-to-load-rdoc-library.pat # https://github.com/ruby/openssl/pull/216 Patch22: ruby-2.6.0-config-support-include-directive.patch -# Disable pthread on Linux RISC-V (riscv64) -Patch30: riscv-disable-pthread.patch +# Disable pthread assert on Linux RISC-V (riscv64) +Patch30: ruby-2.6.5-disable-assert.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -1183,7 +1183,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Tue Jul 23 2019 David Abdurachmanov - 2.6.5-124.0.riscv64 -- Disable pthread on RISC-V (riscv64) +- Disable pthread assert on RISC-V (riscv64) * Tue Oct 08 2019 Slava Kardakov - 2.6.5-124 - Update to Ruby 2.6.5.