summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extmod/extmod.cmake2
-rw-r--r--extmod/extmod.mk2
-rw-r--r--ports/mimxrt/Makefile4
-rw-r--r--ports/rp2/CMakeLists.txt7
-rw-r--r--ports/stm32/Makefile3
-rw-r--r--ports/unix/Makefile3
6 files changed, 3 insertions, 18 deletions
diff --git a/extmod/extmod.cmake b/extmod/extmod.cmake
index 8fe83a0ad..954bfc7e9 100644
--- a/extmod/extmod.cmake
+++ b/extmod/extmod.cmake
@@ -114,6 +114,7 @@ if(MICROPY_SSL_MBEDTLS)
)
target_sources(micropy_lib_mbedtls INTERFACE
+ ${MICROPY_DIR}/lib/mbedtls_errors/mp_mbedtls_errors.c
${MICROPY_LIB_MBEDTLS_DIR}/library/aes.c
${MICROPY_LIB_MBEDTLS_DIR}/library/aesni.c
${MICROPY_LIB_MBEDTLS_DIR}/library/arc4.c
@@ -141,7 +142,6 @@ if(MICROPY_SSL_MBEDTLS)
${MICROPY_LIB_MBEDTLS_DIR}/library/ecp_curves.c
${MICROPY_LIB_MBEDTLS_DIR}/library/entropy.c
${MICROPY_LIB_MBEDTLS_DIR}/library/entropy_poll.c
- ${MICROPY_LIB_MBEDTLS_DIR}/library/error.c
${MICROPY_LIB_MBEDTLS_DIR}/library/gcm.c
${MICROPY_LIB_MBEDTLS_DIR}/library/havege.c
${MICROPY_LIB_MBEDTLS_DIR}/library/hmac_drbg.c
diff --git a/extmod/extmod.mk b/extmod/extmod.mk
index 93b2a1176..ae3e45bd5 100644
--- a/extmod/extmod.mk
+++ b/extmod/extmod.mk
@@ -119,6 +119,7 @@ SRC_MOD += $(addprefix $(AXTLS_DIR)/,\
else ifeq ($(MICROPY_SSL_MBEDTLS),1)
MBEDTLS_DIR = lib/mbedtls
CFLAGS_MOD += -DMICROPY_SSL_MBEDTLS=1 -I$(TOP)/$(MBEDTLS_DIR)/include
+SRC_MOD += lib/mbedtls_errors/mp_mbedtls_errors.c
SRC_MOD += $(addprefix $(MBEDTLS_DIR)/library/,\
aes.c \
aesni.c \
@@ -147,7 +148,6 @@ SRC_MOD += $(addprefix $(MBEDTLS_DIR)/library/,\
ecp_curves.c \
entropy.c \
entropy_poll.c \
- error.c \
gcm.c \
havege.c \
hmac_drbg.c \
diff --git a/ports/mimxrt/Makefile b/ports/mimxrt/Makefile
index be1c95ba9..150727577 100644
--- a/ports/mimxrt/Makefile
+++ b/ports/mimxrt/Makefile
@@ -96,15 +96,13 @@ SRC_TINYUSB_C += \
# All settings for Ethernet support are controller by the value of MICROPY_PY_LWIP
ifeq ($(MICROPY_PY_LWIP),1)
-SRC_MOD := $(filter-out %/mbedtls/library/error.c, $(SRC_MOD))
SRC_ETH_C += \
$(MCU_DIR)/drivers/fsl_enet.c \
hal/phy/device/phydp83825/fsl_phydp83825.c \
hal/phy/device/phydp83848/fsl_phydp83848.c \
hal/phy/device/phyksz8081/fsl_phyksz8081.c \
hal/phy/device/phylan8720/fsl_phylan8720.c \
- hal/phy/mdio/enet/fsl_enet_mdio.c \
- lib/mbedtls_errors/mp_mbedtls_errors.c
+ hal/phy/mdio/enet/fsl_enet_mdio.c
endif
# NXP SDK sources
diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt
index 8f7895459..f9a9efe62 100644
--- a/ports/rp2/CMakeLists.txt
+++ b/ports/rp2/CMakeLists.txt
@@ -77,7 +77,6 @@ set(MICROPY_SOURCE_LIB
${MICROPY_DIR}/lib/littlefs/lfs1_util.c
${MICROPY_DIR}/lib/littlefs/lfs2.c
${MICROPY_DIR}/lib/littlefs/lfs2_util.c
- ${MICROPY_DIR}/lib/mbedtls_errors/mp_mbedtls_errors.c
${MICROPY_DIR}/lib/oofatfs/ff.c
${MICROPY_DIR}/lib/oofatfs/ffunicode.c
${MICROPY_DIR}/shared/netutils/dhcpserver.c
@@ -343,12 +342,6 @@ target_sources(${MICROPY_TARGET} PRIVATE
target_link_libraries(${MICROPY_TARGET} micropy_lib_mbedtls)
-# Filter out library/error.c as we're using mp_mbedtls_errors.c instead.
-set_source_files_properties(${MICROPY_LIB_MBEDTLS_DIR}/library/error.c
- TARGET_DIRECTORY micropy_lib_mbedtls
- PROPERTIES HEADER_FILE_ONLY ON
-)
-
target_link_libraries(${MICROPY_TARGET} usermod)
target_include_directories(${MICROPY_TARGET} PRIVATE
diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile
index bab62eaae..75a1abeab 100644
--- a/ports/stm32/Makefile
+++ b/ports/stm32/Makefile
@@ -499,9 +499,6 @@ endif
ifeq ($(MICROPY_SSL_MBEDTLS),1)
CFLAGS_MOD += -DMBEDTLS_CONFIG_FILE='"mbedtls/mbedtls_config.h"'
SRC_MOD += mbedtls/mbedtls_port.c
-# replace mbedtls' error.c by ours
-SRC_MOD := $(filter-out %/mbedtls/library/error.c, $(SRC_MOD))
-LIB_SRC_C += lib/mbedtls_errors/mp_mbedtls_errors.c
endif
ifeq ($(MICROPY_PY_BLUETOOTH),1)
diff --git a/ports/unix/Makefile b/ports/unix/Makefile
index 05b8d9bff..04d2242a2 100644
--- a/ports/unix/Makefile
+++ b/ports/unix/Makefile
@@ -140,9 +140,6 @@ endif
ifeq ($(MICROPY_SSL_MBEDTLS),1)
GIT_SUBMODULES += lib/mbedtls
CFLAGS_MOD += -DMBEDTLS_CONFIG_FILE='"mbedtls/mbedtls_config.h"'
-# replace mbedtls' error.c by ours
-SRC_MOD := $(filter-out %/mbedtls/library/error.c, $(SRC_MOD))
-LIB_SRC_C += lib/mbedtls_errors/mp_mbedtls_errors.c
endif
endif