Skip to content

Commit

Permalink
mbedtls: fix mbed-psa link missing (#400)
Browse files Browse the repository at this point in the history
mbed-psa provides one mbed psa implementation which mbedtls needs to link.
For example, mbedtls_hardware_poll (mbedtls mbed_trng.cpp) invokes trng_init
and friends which are implemented in mbed-psa psa_hrng.c.
  • Loading branch information
ccli8 authored Dec 6, 2024
1 parent df28d42 commit c3f9a8a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions connectivity/mbedtls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ target_compile_definitions(mbed-mbedtls

target_link_libraries(mbed-mbedtls PUBLIC mbed-core-flags)

# Link Mbed's PSA implementation on enabled
if(("FEATURE_EXPERIMENTAL_API=1" IN_LIST MBED_TARGET_DEFINITIONS) AND
("FEATURE_PSA=1" IN_LIST MBED_TARGET_DEFINITIONS))
target_link_libraries(mbed-mbedtls PUBLIC mbed-psa)
endif()

# Workaround for https://github.com/ARMmbed/mbedtls/issues/1077
# which affects cores without __thumb2__ set by the compiler
# due to the lack of full Thumb-2 support
Expand Down

0 comments on commit c3f9a8a

Please sign in to comment.