mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 11:40:18 +01:00
all: Update extmod, ports, examples to build with new berkeley-db lib.
This provides a MicroPython-specific berkeley-db configuration in extmod/berkeley-db/berkeley_db_config_port.h, and cleans up the include path for this library. Fixes issue #13092. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -381,8 +381,10 @@ endif
|
||||
|
||||
ifeq ($(MICROPY_PY_BTREE),1)
|
||||
BTREE_DIR = lib/berkeley-db-1.xx
|
||||
BTREE_DEFS = -D__DBINTERFACE_PRIVATE=1 -Dmpool_error=printf -Dabort=abort_ "-Dvirt_fd_t=void*" $(BTREE_DEFS_EXTRA)
|
||||
INC += -I$(TOP)/$(BTREE_DIR)/PORT/include
|
||||
BERKELEY_DB_CONFIG_FILE ?= \"extmod/berkeley-db/berkeley_db_config_port.h\"
|
||||
CFLAGS_EXTMOD += -DBERKELEY_DB_CONFIG_FILE=$(BERKELEY_DB_CONFIG_FILE)
|
||||
CFLAGS_EXTMOD += $(BTREE_DEFS_EXTRA)
|
||||
INC += -I$(TOP)/$(BTREE_DIR)/include
|
||||
SRC_THIRDPARTY_C += $(addprefix $(BTREE_DIR)/,\
|
||||
btree/bt_close.c \
|
||||
btree/bt_conv.c \
|
||||
@@ -401,9 +403,7 @@ SRC_THIRDPARTY_C += $(addprefix $(BTREE_DIR)/,\
|
||||
)
|
||||
CFLAGS_EXTMOD += -DMICROPY_PY_BTREE=1
|
||||
# we need to suppress certain warnings to get berkeley-db to compile cleanly
|
||||
# and we have separate BTREE_DEFS so the definitions don't interfere with other source code
|
||||
$(BUILD)/$(BTREE_DIR)/%.o: CFLAGS += -Wno-old-style-definition -Wno-sign-compare -Wno-unused-parameter -Wno-deprecated-non-prototype -Wno-unknown-warning-option $(BTREE_DEFS)
|
||||
$(BUILD)/extmod/modbtree.o: CFLAGS += $(BTREE_DEFS)
|
||||
$(BUILD)/$(BTREE_DIR)/%.o: CFLAGS += -Wno-old-style-definition -Wno-sign-compare -Wno-unused-parameter -Wno-deprecated-non-prototype -Wno-unknown-warning-option
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
Reference in New Issue
Block a user