modules: mbedtls: Allow custom mbedtls implementation
-The current scheme in zephyr has the two choices MBEDTLS_BUILTIN and MBEDTLS_LIBRARY, but the choice of MBEDTLS_LIBRARY requires setting CONFIG_MBEDTLS_INSTALL_PATH for includes and library linking. This may not be neccesary when an alternative implementation of the library is being used. This adds support for custom choices in MBEDTLS_IMPLEMENTATION which can be added in an out-of-tree Kconfig file. -Made else an elseif(CONFIG_MBEDTLS_LIBRARY. -Removed reduntant assertion between the two choices. Signed-off-by: Frank Audun Kvamtrø <frank.kvamtro@nordicsemi.no>
This commit is contained in:
parent
464cd567a9
commit
fb90efef1b
1 changed files with 6 additions and 2 deletions
|
@ -35,8 +35,7 @@ if(CONFIG_ARCH_POSIX AND CONFIG_ASAN AND NOT CONFIG_64BIT)
|
|||
endif ()
|
||||
|
||||
zephyr_library_link_libraries(mbedTLS)
|
||||
else()
|
||||
assert(CONFIG_MBEDTLS_LIBRARY "MBEDTLS was enabled, but neither BUILTIN or LIBRARY was selected.")
|
||||
elseif (CONFIG_MBEDTLS_LIBRARY)
|
||||
|
||||
# NB: CONFIG_MBEDTLS_LIBRARY is not regression tested and is
|
||||
# therefore susceptible to bit rot
|
||||
|
@ -53,6 +52,11 @@ else()
|
|||
# Lib mbedtls_external depends on libgcc (I assume?) so to allow
|
||||
# mbedtls_external to link with gcc we need to ensure it is placed
|
||||
# after mbedtls_external on the linkers command line.
|
||||
else()
|
||||
# If none of either CONFIG_MBEDTLS_BUILTIN or CONFIG_MBEDTLS_LIBRARY
|
||||
# are defined the users need add a custom Kconfig choice to the
|
||||
# MBEDTLS_IMPLEMENTATION and manually add the mbedtls library and
|
||||
# included the required directories for mbedtls in their projects.
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue