From e56f6685c5ab8fb492bd9d7d2315f6de4bbd2266 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Aug 25 2021 18:07:43 +0000 Subject: Enable s390x --- diff --git a/rocksdb.spec b/rocksdb.spec index 13c6fe6..1ddb993 100644 --- a/rocksdb.spec +++ b/rocksdb.spec @@ -2,7 +2,7 @@ Name: rocksdb Version: 6.22.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A Persistent Key-Value Store for Flash and RAM Storage License: GPLv2 or ASL 2.0 and BSD @@ -14,10 +14,7 @@ URL: %{forgeurl} # # Fails to build on armv7hl: # https://bugzilla.redhat.com/show_bug.cgi?id=1997416 -# -# Fails to build on s390x: -# https://bugzilla.redhat.com/show_bug.cgi?id=1997426 -ExcludeArch: %{ix86} armv7hl s390x +ExcludeArch: %{ix86} armv7hl BuildRequires: gcc-c++ BuildRequires: gflags-devel @@ -33,6 +30,10 @@ Source: %{forgesource} # https://github.com/facebook/rocksdb/issues/8021 Patch0: gcc-c++-false-positive-warning.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1997426 +# https://github.com/facebook/rocksdb/issues/8698 +Patch1: toku_time-s390x.patch + %description RocksDB is a library that forms the core building block for a fast key value server, especially suited for storing data on flash drives. It has a @@ -53,6 +54,7 @@ Development files for rocksdb. %forgesetup %patch0 -p1 +%patch1 -p1 %build %{set_build_flags} @@ -81,6 +83,9 @@ make install-shared PREFIX=%{_prefix} LIBDIR=%{_libdir} DESTDIR=%{buildroot} %{_includedir}/rocksdb %changelog +* Wed Aug 25 2021 Yaakov Selkowitz - 6.22.1-3 +- Enabled s390x https://bugzilla.redhat.com/show_bug.cgi?id=1997426 + * Wed Aug 25 2021 Jonny Heggheim - 6.22.1-2 - Disabled armv7hl https://bugzilla.redhat.com/show_bug.cgi?id=1997416 - Disabled s390x https://bugzilla.redhat.com/show_bug.cgi?id=1997426 diff --git a/toku_time-s390x.patch b/toku_time-s390x.patch new file mode 100644 index 0000000..5a12a5b --- /dev/null +++ b/toku_time-s390x.patch @@ -0,0 +1,27 @@ +From 3013350e2ddc35715ab353bf9f129f241233410c Mon Sep 17 00:00:00 2001 +From: Vishwanatha Subbanna +Date: Tue, 24 Aug 2021 17:07:44 +0530 +Subject: [PATCH] Add support for s390x platform in toku_time + +Signed-off-by: Vishwanatha Subbanna +--- +https://bugzilla.redhat.com/show_bug.cgi?id=1997426 + + .../lock/range/range_tree/lib/portability/toku_time.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +index 4425a4a2e57..225e3fa7211 100644 +--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h ++++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +@@ -133,6 +133,10 @@ static inline tokutime_t toku_time_now(void) { + return result; + #elif defined(__powerpc__) + return __ppc_get_timebase(); ++#elif defined(__s390x__) ++ uint64_t result; ++ asm volatile("stckf %0" : "=Q"(result) : : "cc"); ++ return result; + #else + #error No timer implementation for this platform + #endif