]> granicus.if.org Git - esp-idf/commitdiff
mbedtls: align CMake build with corresponding component.mk
authorMahavir Jain <mahavir@espressif.com>
Thu, 8 Nov 2018 05:56:33 +0000 (11:26 +0530)
committerMahavir Jain <mahavir@espressif.com>
Thu, 29 Nov 2018 10:53:06 +0000 (16:23 +0530)
components/heap/CMakeLists.txt
components/mbedtls/CMakeLists.txt
components/pthread/CMakeLists.txt

index c2ff4d50a6d83dd43f2e129a74b98536be0cc2d4..442a9676f1f1ce31aab29c3ec08552e12732aa74 100644 (file)
@@ -30,7 +30,7 @@ if(CONFIG_HEAP_TRACING)
         heap_caps_realloc_default)
 
     foreach(wrap ${WRAP_FUNCTIONS})
-        target_link_libraries(heap "-Wl,--wrap=${wrap}")
+        target_link_libraries(${COMPONENT_TARGET} "-Wl,--wrap=${wrap}")
     endforeach()
 
 endif()
index c99985d1c875409f44b133f5ba11442a09a846b0..e9cd58153b9ed8c7e288a1c0e25910790c03b64e 100644 (file)
@@ -21,6 +21,11 @@ include_directories("${COMPONENT_PATH}/port/include")
 # Import mbedtls library targets
 add_subdirectory(mbedtls)
 
+# Use port specific implementation of net_socket.c instead of one from mbedtls
+get_target_property(src_tls mbedtls SOURCES)
+list(REMOVE_ITEM src_tls net_sockets.c)
+set_property(TARGET mbedtls PROPERTY SOURCES ${src_tls})
+
 set(mbedtls_targets mbedtls mbedcrypto mbedx509)
 
 # Add port files to mbedtls targets
@@ -54,4 +59,4 @@ target_link_libraries(${COMPONENT_TARGET} ${mbedtls_targets})
 # Catch usage of deprecated mbedTLS functions when building tests
 if(mbedtls_test IN_LIST BUILD_TEST_COMPONENTS)
     add_definitions(-DMBEDTLS_DEPRECATED_WARNING)
-endif()
\ No newline at end of file
+endif()
index 157793707ffa709ef897b1808b15afceded1aa3d..d793a12e32e158c3f08cc1a62f9c91ee291b67fe 100644 (file)
@@ -6,5 +6,5 @@ set(COMPONENT_REQUIRES)
 register_component()
 
 if(CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK)
-    target_link_libraries(pthread "-Wl,--wrap=vPortCleanUpTCB")
+    target_link_libraries(${COMPONENT_TARGET} "-Wl,--wrap=vPortCleanUpTCB")
 endif()