summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx/src/libmdbx/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_mdbx/src/libmdbx/Makefile')
-rw-r--r--plugins/Dbx_mdbx/src/libmdbx/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/Dbx_mdbx/src/libmdbx/Makefile b/plugins/Dbx_mdbx/src/libmdbx/Makefile
index 56fa996fc9..c434dbdd56 100644
--- a/plugins/Dbx_mdbx/src/libmdbx/Makefile
+++ b/plugins/Dbx_mdbx/src/libmdbx/Makefile
@@ -24,8 +24,16 @@ suffix ?=
CC ?= gcc
CXX ?= g++
XCFLAGS ?= -DNDEBUG=1 -DMDBX_DEBUG=0 -DLIBMDBX_EXPORTS=1
-CFLAGS ?= -O2 -g3 -Wall -Wno-constant-logical-operand -Werror -Wextra -ffunction-sections -fPIC -fvisibility=hidden
+CFLAGS ?= -O2 -g3 -Wall -Werror -Wextra -ffunction-sections -fPIC -fvisibility=hidden
CFLAGS += -D_GNU_SOURCE=1 -std=gnu11 -pthread $(XCFLAGS)
+
+# temporary workaround for lcc's bug
+TARGET_ARCH_e2k = $(shell (export LC_ALL=C; ($(CC) --version 2>&1; $(CC) -v 2>&1) | grep -q -i 'e2k' && echo yes || echo no))
+ifeq ($(TARGET_ARCH_e2k),yes)
+TARGET_ARCH := e2k
+CFLAGS += -mtune=native -Wno-alignment-reduction-ignored
+endif
+
CXXFLAGS = -std=c++11 $(filter-out -std=gnu11,$(CFLAGS))
TESTDB ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.db
TESTLOG ?= $(shell [ -d /dev/shm ] && echo /dev/shm || echo /tmp)/mdbx-check.log