Skip to contentSkip to conversation

package/rocksdb: bump to version 6.10.1

PATCH New Fabrice Fontaine 2 participants 2 messages May 30, 2020 – Jul 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/rocksdb: bump to version 6.10.1

- Update indentation of hash file (two spaces)
- Remove first patch (already in version)
- Add link to upstream PR in second patch
- Add upstream patch to fix build on powerpc (patch does not apply cleanly on current version)
- Update hash of README.md, slack forum added with
https://github.com/facebook/rocksdb/commit/cf342464caf8155ab60f7a48e39a8d6ae3138a7a

Fixes:
- http://autobuild.buildroot.org/results/242db7139ce5dd6ece4a1eb50a1aa47c841a41b7

---
 .../rocksdb/0001-Check-for-sys-auxv.h.patch   |  111 -
 ...s-build_detect_platform-fix-C-tests.patch} |    1 +
 ...e-POWER-crc32c-with-C-implementation.patch | 4058 +++++++++++++++++
 package/rocksdb/rocksdb.hash                  |   10 +-
 package/rocksdb/rocksdb.mk                    |    2 +-
 5 files changed, 4065 insertions(+), 117 deletions(-)
 delete mode 100644 package/rocksdb/0001-Check-for-sys-auxv.h.patch
 rename package/rocksdb/{0002-build_tools-build_detect_platform-fix-C-tests.patch => 0001-build_tools-build_detect_platform-fix-C-tests.patch} (99%)
 create mode 100644 package/rocksdb/0002-replace-POWER-crc32c-with-C-implementation.patch
package/rocksdb/0001-Check-for-sys-auxv.h.patch deleted +0 -111
deleted file mode 100644
index eccd27919c..0000000000
@@ -1,111 +0,0 @@
-From ad4cb0403c58430bf34a15e72f2edcf0f4317977 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <[email protected]>
-Date: Sat, 1 Feb 2020 23:38:11 +0100
-Subject: [PATCH] Check for sys/auxv.h
-
-Check for sys/auxv.h and getauxval before using them as they are not
-always available (for example on uclibc)
-
-Signed-off-by: Fabrice Fontaine <[email protected]>
-[Upstream status: https://github.com/facebook/rocksdb/pull/6359]
----
- CMakeLists.txt                    |  5 +++++
- build_tools/build_detect_platform | 14 ++++++++++++++
- util/crc32c.cc                    |  4 +++-
- util/crc32c_arm64.cc              |  6 ++++++
- 4 files changed, 28 insertions(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 017fe8675..32fc5cb30 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -481,6 +481,11 @@ if(HAVE_SCHED_GETCPU)
-   add_definitions(-DROCKSDB_SCHED_GETCPU_PRESENT)
- endif()
- 
-+check_cxx_symbol_exists(getauxval auvx.h HAVE_AUXV_GETAUXVAL)
-+if(HAVE_AUXV_GETAUXVAL)
-+  add_definitions(-DROCKSDB_AUXV_GETAUXVAL_PRESENT)
-+endif()
-+
- include_directories(${PROJECT_SOURCE_DIR})
- include_directories(${PROJECT_SOURCE_DIR}/include)
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.8.1/fused-src)
-diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform
-index 36a013f6f..2535d8124 100755
---- a/build_tools/build_detect_platform
-+++ b/build_tools/build_detect_platform
-@@ -506,6 +506,20 @@ EOF
-         fi
-     fi
- 
-+    if ! test $ROCKSDB_DISABLE_AUXV_GETAUXVAL; then
-+        # Test whether getauxval is supported
-+        $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null  <<EOF
-+          #include <sys/auxv.h>
-+          int main() {
-+            uint64_t auxv = getauxval(AT_HWCAP);
-+            (void)auxv;
-+          }
-+EOF
-+        if [ "$?" = 0 ]; then
-+            COMMON_FLAGS="$COMMON_FLAGS -DROCKSDB_AUXV_GETAUXVAL_PRESENT"
-+        fi
-+    fi
-+
-     if ! test $ROCKSDB_DISABLE_ALIGNED_NEW; then
-         # Test whether c++17 aligned-new is supported
-         $CXX $PLATFORM_CXXFLAGS -faligned-new -x c++ - -o /dev/null 2>/dev/null <<EOF
-diff --git a/util/crc32c.cc b/util/crc32c.cc
-index 9e838b830..3063884db 100644
---- a/util/crc32c.cc
-+++ b/util/crc32c.cc
-@@ -25,7 +25,9 @@
- #include "util/crc32c_ppc_constants.h"
- 
- #if __linux__
-+#ifdef ROCKSDB_AUXV_GETAUXVAL_PRESENT
- #include <sys/auxv.h>
-+#endif
- 
- #ifndef PPC_FEATURE2_VEC_CRYPTO
- #define PPC_FEATURE2_VEC_CRYPTO 0x02000000
-@@ -451,7 +453,7 @@ uint32_t ExtendPPCImpl(uint32_t crc, const char *buf, size_t size) {
- static int arch_ppc_probe(void) {
-   arch_ppc_crc32 = 0;
- 
--#if defined(__powerpc64__)
-+#if defined(__powerpc64__) && defined(ROCKSDB_AUXV_GETAUXVAL_PRESENT)
-   if (getauxval(AT_HWCAP2) & PPC_FEATURE2_VEC_CRYPTO) arch_ppc_crc32 = 1;
- #endif /* __powerpc64__ */
- 
-diff --git a/util/crc32c_arm64.cc b/util/crc32c_arm64.cc
-index 591c623a5..61b2ccaba 100644
---- a/util/crc32c_arm64.cc
-+++ b/util/crc32c_arm64.cc
-@@ -8,7 +8,9 @@
- #if defined(__linux__) && defined(HAVE_ARM64_CRC)
- 
- #include <asm/hwcap.h>
-+#ifdef ROCKSDB_AUXV_GETAUXVAL_PRESENT
- #include <sys/auxv.h>
-+#endif
- #ifndef HWCAP_CRC32
- #define HWCAP_CRC32 (1 << 7)
- #endif
-@@ -34,8 +36,12 @@
- #endif
- 
- uint32_t crc32c_runtime_check(void) {
-+#ifdef ROCKSDB_AUXV_GETAUXVAL_PRESENT
-   uint64_t auxv = getauxval(AT_HWCAP);
-   return (auxv & HWCAP_CRC32) != 0;
-+#else
-+  return 0;
-+#endif
- }
- 
- uint32_t crc32c_arm64(uint32_t crc, unsigned char const *data,
--- 
-2.24.1
-
package/rocksdb/0001-build_tools-build_detect_platform-fix-C-tests.patch renamed from package/rocksdb/0002-build_tools-build_detect_platform-fix-C-tests.patch +1 -0
similarity index 99%
rename from package/rocksdb/0002-build_tools-build_detect_platform-fix-C-tests.patch
rename to package/rocksdb/0001-build_tools-build_detect_platform-fix-C-tests.patch
index 0b1118a2b3..05f6bbde79 100644
@@ -14,6 +14,7 @@ EOF
 /home/fabrice/buildroot/output/host/lib/gcc/xtensa-buildroot-linux-uclibc/8.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: final link failed: file truncated
 
 Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status: https://github.com/facebook/rocksdb/pull/6479]
 ---
  build_tools/build_detect_platform | 58 +++++++++++++++----------------
  1 file changed, 29 insertions(+), 29 deletions(-)
package/rocksdb/0002-replace-POWER-crc32c-with-C-implementation.patch new file +4058 -0

2,882 lines not on this page · raw message

package/rocksdb/rocksdb.hash +5 -5
index 2e4071298e..d404488322 100644

Lines of this file are not shown. View the raw message.

package/rocksdb/rocksdb.mk +1 -1
index 31a9f98b55..2288c406a6 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.26.2

Part of the diff is not shown here. View the raw message.

#1 lore raw

PATCH 1/1 package/rocksdb: bump to version 6.10.1

Quoted 12 lines · On Sat, 30 May 2020 11:28:49 +0200 Fabrice Fontaine…

- Update indentation of hash file (two spaces)
- Remove first patch (already in version)
- Add link to upstream PR in second patch
- Add upstream patch to fix build on powerpc (patch does not apply cleanly on current version)
- Update hash of README.md, slack forum added with
https://github.com/facebook/rocksdb/commit/cf342464caf8155ab60f7a48e39a8d6ae3138a7a

Fixes:
- http://autobuild.buildroot.org/results/242db7139ce5dd6ece4a1eb50a1aa47c841a41b7

Quoted 10 lines
---
 .../rocksdb/0001-Check-for-sys-auxv.h.patch   |  111 -
 ...s-build_detect_platform-fix-C-tests.patch} |    1 +
 ...e-POWER-crc32c-with-C-implementation.patch | 4058 +++++++++++++++++
 package/rocksdb/rocksdb.hash                  |   10 +-
 package/rocksdb/rocksdb.mk                    |    2 +-
 5 files changed, 4065 insertions(+), 117 deletions(-)
 delete mode 100644 package/rocksdb/0001-Check-for-sys-auxv.h.patch
 rename package/rocksdb/{0002-build_tools-build_detect_platform-fix-C-tests.patch => 0001-build_tools-build_detect_platform-fix-C-tests.patch} (99%)
 create mode 100644 package/rocksdb/0002-replace-POWER-crc32c-with-C-implementation.patch

The patch is really huge, but OK we don't have much choice here, so I've applied to master.

Please note that newer versions have been released in the mean time, though without the PPC patch. There is however a newer version of the PPC patch at https://github.com/facebook/rocksdb/pull/7079/.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com