diff options
| author | Khem Raj <raj.khem@gmail.com> | 2021-06-16 23:17:24 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-06-18 08:33:08 -0700 |
| commit | a15ef36f6dd3436e4d3d70967f92970b2e860dfb (patch) | |
| tree | d7a6853c1257b065cef195e96c1ea3cc462414dc | |
| parent | 66a248346c08b49318a65ecd59382b31d936b93a (diff) | |
| download | meta-openembedded-a15ef36f6dd3436e4d3d70967f92970b2e860dfb.tar.gz | |
rocksdb: Fix build with ppc64/musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/ppc64.patch | 28 | ||||
| -rw-r--r-- | meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch b/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch new file mode 100644 index 0000000000..bc40f1b1e7 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | implement support for musl/ppc64 | ||
| 2 | |||
| 3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 4 | --- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h | ||
| 5 | +++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h | ||
| 6 | @@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or | ||
| 7 | #include <stdint.h> | ||
| 8 | #include <sys/time.h> | ||
| 9 | #include <time.h> | ||
| 10 | -#if defined(__powerpc__) | ||
| 11 | +#if defined(__powerpc__) && defined(__GLIBC__) | ||
| 12 | #include <sys/platform/ppc.h> | ||
| 13 | #endif | ||
| 14 | |||
| 15 | @@ -131,8 +131,12 @@ static inline tokutime_t toku_time_now(v | ||
| 16 | uint64_t result; | ||
| 17 | __asm __volatile__("mrs %[rt], cntvct_el0" : [ rt ] "=r"(result)); | ||
| 18 | return result; | ||
| 19 | -#elif defined(__powerpc__) | ||
| 20 | +#elif defined(__powerpc__) && defined(__GLIBC__) | ||
| 21 | return __ppc_get_timebase(); | ||
| 22 | +#elif defined(__powerpc64__) || defined(__ppc64__) | ||
| 23 | + uint64_t result; | ||
| 24 | + asm volatile("mfspr %0, 268" : "=r"(result)); | ||
| 25 | + return result; | ||
| 26 | #elif defined(__riscv) // RISC-V | ||
| 27 | #if __riscv_xlen == 32 | ||
| 28 | uint32_t lo, hi0, hi1; | ||
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb index 98930c6e6d..d03d0c9529 100644 --- a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb +++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb | |||
| @@ -15,6 +15,7 @@ SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ | |||
| 15 | file://0001-folly-Use-SYS_futex-for-syscall.patch \ | 15 | file://0001-folly-Use-SYS_futex-for-syscall.patch \ |
| 16 | file://0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch \ | 16 | file://0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch \ |
| 17 | file://0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch \ | 17 | file://0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch \ |
| 18 | file://ppc64.patch \ | ||
| 18 | " | 19 | " |
| 19 | 20 | ||
| 20 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
