mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 01:54:13 +08:00
mdbx: fix cross-build & qemu-testing issues.
Change-Id: I6b2343cc4e08c3cb706a190c4c515965182733a2
This commit is contained in:
parent
228a74c41d
commit
8f08e1c7ed
@ -138,14 +138,14 @@ check: all example mdbx_test
|
||||
example: mdbx.h tutorial/sample-mdbx.c libmdbx.$(SO_SUFFIX)
|
||||
$(CC) $(CFLAGS) -I. tutorial/sample-mdbx.c ./libmdbx.$(SO_SUFFIX) -o example
|
||||
|
||||
check-singleprocess: all
|
||||
check-singleprocess: all mdbx_test
|
||||
rm -f $(TEST_DB) $(TEST_LOG) && (set -o pipefail; \
|
||||
./mdbx_test --repeat=4 --pathname=$(TEST_DB) --dont-cleanup-after --hill && \
|
||||
./mdbx_test --repeat=2 --pathname=$(TEST_DB) --dont-cleanup-before --dont-cleanup-after --copy \
|
||||
| tee -a $(TEST_LOG) | tail -n 42) \
|
||||
&& ./mdbx_chk -vvn $(TEST_DB) && ./mdbx_chk -vvn $(TEST_DB)-copy
|
||||
|
||||
check-fault: all
|
||||
check-fault: all mdbx_test
|
||||
rm -f $(TEST_DB) $(TEST_LOG) && (set -o pipefail; ./mdbx_test --pathname=$(TEST_DB) --inject-writefault=42 --dump-config --dont-cleanup-after basic | tee -a $(TEST_LOG) | tail -n 42) \
|
||||
; ./mdbx_chk -vvnw $(TEST_DB) && ([ ! -e $(TEST_DB)-copy ] || ./mdbx_chk -vvn $(TEST_DB)-copy)
|
||||
|
||||
@ -278,7 +278,7 @@ cross-qemu:
|
||||
@for CC in $(CROSS_LIST); do \
|
||||
echo "===================== $$CC + qemu"; \
|
||||
$(MAKE) clean && \
|
||||
CC=$$CC CXX=$$(echo $$CC | sed 's/-gcc/-g++/') EXE_LDFLAGS=-static XCFLAGS="-DMDBX_SAFE4QEMU $(XCFLAGS)" \
|
||||
CC=$$CC CXX=$$(echo $$CC | sed 's/-gcc/-g++/') EXE_LDFLAGS=-static MDBX_OPTIONS="-DMDBX_SAFE4QEMU $(MDBX_OPTIONS)" \
|
||||
$(MAKE) check-singleprocess || exit $$?; \
|
||||
done
|
||||
|
||||
|
@ -4814,7 +4814,7 @@ static int mdbx_page_flush(MDBX_txn *txn, pgno_t keep) {
|
||||
|
||||
#if MDBX_CPU_CACHE_MMAP_NONCOHERENT
|
||||
#if defined(__linux__) || defined(__gnu_linux__)
|
||||
if (linux_kernel_version >= 0x02060b00)
|
||||
if (mdbx_linux_kernel_version >= 0x02060b00)
|
||||
/* Linux kernels older than version 2.6.11 ignore the addr and nbytes
|
||||
* arguments, making this function fairly expensive. Therefore, the
|
||||
* whole cache is always flushed. */
|
||||
@ -4839,7 +4839,7 @@ static int mdbx_page_flush(MDBX_txn *txn, pgno_t keep) {
|
||||
|
||||
#if MDBX_CPU_CACHE_MMAP_NONCOHERENT && \
|
||||
(defined(__linux__) || defined(__gnu_linux__))
|
||||
if (linux_kernel_version < 0x02060b00) {
|
||||
if (mdbx_linux_kernel_version < 0x02060b00) {
|
||||
/* Linux kernels older than version 2.6.11 ignore the addr and nbytes
|
||||
* arguments, making this function fairly expensive. Therefore, the whole
|
||||
* cache is always flushed. */
|
||||
|
@ -174,7 +174,8 @@
|
||||
|
||||
#ifndef MDBX_USE_OFDLOCKS
|
||||
#define MDBX_USE_OFDLOCKS_CONFIG AUTO
|
||||
#if defined(F_OFD_SETLK) && defined(F_OFD_SETLKW) && defined(F_OFD_GETLK)
|
||||
#if defined(F_OFD_SETLK) && defined(F_OFD_SETLKW) && defined(F_OFD_GETLK) && \
|
||||
!defined(MDBX_SAFE4QEMU)
|
||||
#define MDBX_USE_OFDLOCKS 1
|
||||
#else
|
||||
#define MDBX_USE_OFDLOCKS 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user