rocksdb: fix on ppc64le-musl, broken on big endian
This commit is contained in:
parent
3c8fe066c3
commit
8a5927806a
2 changed files with 19 additions and 6 deletions
|
@ -1,10 +1,16 @@
|
||||||
From: https://github.com/facebook/rocksdb/issues/8609
|
|
||||||
|
|
||||||
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 225e3fa72..cd5f935f1 100644
|
|
||||||
--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
|
--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
|
||||||
+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
|
+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
|
||||||
@@ -131,6 +131,10 @@ static inline tokutime_t toku_time_now(void) {
|
@@ -58,9 +58,6 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <time.h>
|
||||||
|
-#if defined(__powerpc__)
|
||||||
|
-#include <sys/platform/ppc.h>
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
static inline float toku_tdiff (struct timeval *a, struct timeval *b) {
|
||||||
|
@@ -131,8 +128,12 @@ static inline tokutime_t toku_time_now(void) {
|
||||||
uint64_t result;
|
uint64_t result;
|
||||||
__asm __volatile__("mrs %[rt], cntvct_el0" : [ rt ] "=r"(result));
|
__asm __volatile__("mrs %[rt], cntvct_el0" : [ rt ] "=r"(result));
|
||||||
return result;
|
return result;
|
||||||
|
@ -13,5 +19,8 @@ index 225e3fa72..cd5f935f1 100644
|
||||||
+ __asm __volatile__("mrrc p15, 1, %[lo], %[hi], c14" : [ lo ] "=r" (lo), [hi] "=r" (hi));
|
+ __asm __volatile__("mrrc p15, 1, %[lo], %[hi], c14" : [ lo ] "=r" (lo), [hi] "=r" (hi));
|
||||||
+ return (uint64_t)hi << 32 | lo;
|
+ return (uint64_t)hi << 32 | lo;
|
||||||
#elif defined(__powerpc__)
|
#elif defined(__powerpc__)
|
||||||
return __ppc_get_timebase();
|
- return __ppc_get_timebase();
|
||||||
|
+ return __builtin_ppc_get_timebase();
|
||||||
#elif defined(__s390x__)
|
#elif defined(__s390x__)
|
||||||
|
uint64_t result;
|
||||||
|
asm volatile("stckf %0" : "=Q"(result) : : "cc");
|
||||||
|
|
|
@ -17,6 +17,10 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||||
makedepends+=" libatomic-devel"
|
makedepends+=" libatomic-devel"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
|
||||||
|
broken="assembler errors"
|
||||||
|
fi
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vcopy "include/rocksdb/*" usr/include/rocksdb
|
vcopy "include/rocksdb/*" usr/include/rocksdb
|
||||||
vlicense LICENSE.leveldb
|
vlicense LICENSE.leveldb
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue