mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 01:44: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)
|
example: mdbx.h tutorial/sample-mdbx.c libmdbx.$(SO_SUFFIX)
|
||||||
$(CC) $(CFLAGS) -I. tutorial/sample-mdbx.c ./libmdbx.$(SO_SUFFIX) -o example
|
$(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; \
|
rm -f $(TEST_DB) $(TEST_LOG) && (set -o pipefail; \
|
||||||
./mdbx_test --repeat=4 --pathname=$(TEST_DB) --dont-cleanup-after --hill && \
|
./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 \
|
./mdbx_test --repeat=2 --pathname=$(TEST_DB) --dont-cleanup-before --dont-cleanup-after --copy \
|
||||||
| tee -a $(TEST_LOG) | tail -n 42) \
|
| tee -a $(TEST_LOG) | tail -n 42) \
|
||||||
&& ./mdbx_chk -vvn $(TEST_DB) && ./mdbx_chk -vvn $(TEST_DB)-copy
|
&& ./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) \
|
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)
|
; ./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 \
|
@for CC in $(CROSS_LIST); do \
|
||||||
echo "===================== $$CC + qemu"; \
|
echo "===================== $$CC + qemu"; \
|
||||||
$(MAKE) clean && \
|
$(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 $$?; \
|
$(MAKE) check-singleprocess || exit $$?; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -4814,7 +4814,7 @@ static int mdbx_page_flush(MDBX_txn *txn, pgno_t keep) {
|
|||||||
|
|
||||||
#if MDBX_CPU_CACHE_MMAP_NONCOHERENT
|
#if MDBX_CPU_CACHE_MMAP_NONCOHERENT
|
||||||
#if defined(__linux__) || defined(__gnu_linux__)
|
#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
|
/* Linux kernels older than version 2.6.11 ignore the addr and nbytes
|
||||||
* arguments, making this function fairly expensive. Therefore, the
|
* arguments, making this function fairly expensive. Therefore, the
|
||||||
* whole cache is always flushed. */
|
* 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 && \
|
#if MDBX_CPU_CACHE_MMAP_NONCOHERENT && \
|
||||||
(defined(__linux__) || defined(__gnu_linux__))
|
(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
|
/* Linux kernels older than version 2.6.11 ignore the addr and nbytes
|
||||||
* arguments, making this function fairly expensive. Therefore, the whole
|
* arguments, making this function fairly expensive. Therefore, the whole
|
||||||
* cache is always flushed. */
|
* cache is always flushed. */
|
||||||
|
@ -174,7 +174,8 @@
|
|||||||
|
|
||||||
#ifndef MDBX_USE_OFDLOCKS
|
#ifndef MDBX_USE_OFDLOCKS
|
||||||
#define MDBX_USE_OFDLOCKS_CONFIG AUTO
|
#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
|
#define MDBX_USE_OFDLOCKS 1
|
||||||
#else
|
#else
|
||||||
#define MDBX_USE_OFDLOCKS 0
|
#define MDBX_USE_OFDLOCKS 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user