git: bc564c5780be - main - databases/rocksdb: fix build on powerpc64*
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 22 Oct 2021 12:09:22 UTC
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=bc564c5780be1f1e7b1cf3896038d2575e43a8a8 commit bc564c5780be1f1e7b1cf3896038d2575e43a8a8 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2021-10-22 11:42:51 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2021-10-22 11:42:51 +0000 databases/rocksdb: fix build on powerpc64* __ppc_get_timebase() is not present on FreeBSD. --- ..._range_range__tree_lib_portability_toku__time.h | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/databases/rocksdb/files/patch-utilities_transactions_lock_range_range__tree_lib_portability_toku__time.h b/databases/rocksdb/files/patch-utilities_transactions_lock_range_range__tree_lib_portability_toku__time.h new file mode 100644 index 000000000000..340655a5e94d --- /dev/null +++ b/databases/rocksdb/files/patch-utilities_transactions_lock_range_range__tree_lib_portability_toku__time.h @@ -0,0 +1,25 @@ +--- utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h.orig 2021-10-17 17:02:20 UTC ++++ utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +@@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliate + #include <stdint.h> + #include <sys/time.h> + #include <time.h> +-#if defined(__powerpc__) ++#if defined(__powerpc__) && defined(__linux__) + #include <sys/platform/ppc.h> + #endif + +@@ -132,7 +132,13 @@ static inline tokutime_t toku_time_now(void) { + __asm __volatile__("mrs %[rt], cntvct_el0" : [ rt ] "=r"(result)); + return result; + #elif defined(__powerpc__) ++#ifdef __linux__ + return __ppc_get_timebase(); ++#elif defined(__FreeBSD__) ++ int64_t tbr; ++ asm volatile("mfspr %0, 268" : "=r"(tbr)); ++ return tbr; ++#endif + #else + #error No timer implementation for this platform + #endif