mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(mbedtls): fix undefined esp_mbedtls_mem_calloc/free at link time
platform.c (compiled into the 'builtin' archive) calls esp_mbedtls_mem_calloc and esp_mbedtls_mem_free directly by name via the MBEDTLS_PLATFORM_STD_CALLOC/FREE macros in esp_config.h. Previously, esp_mem.c was compiled into the 'tfpsacrypto' archive, which appears after 'builtin' in the link command, causing the linker to fail with undefined reference errors when 'builtin' was processed first. Moving esp_mem.c into 'builtin' to assure that the function used by esp_mbedtls_mem_calloc and esp_mbedtls_mem_free are available when pltform.c is linked.
This commit is contained in:
@@ -27,10 +27,7 @@ idf_component_register(SRCS "${srcs}"
|
||||
|
||||
|
||||
if(NOT ${IDF_TARGET} STREQUAL "linux")
|
||||
# Increase link multiplicity to get some lwip symbols correctly resolved by the linker
|
||||
# due to cyclic dependencies present in IDF for lwip/esp_netif/mbedtls
|
||||
idf_component_get_property(lwip lwip COMPONENT_LIB)
|
||||
set_property(TARGET ${lwip} APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 5)
|
||||
else()
|
||||
# For linux target, define ESP_TLS_WITH_LWIP if LWIP is enabled in the build
|
||||
if(CONFIG_LWIP_ENABLE)
|
||||
|
||||
Reference in New Issue
Block a user