From e9186e9f12931a7c9c937aadee7569df4713c0be Mon Sep 17 00:00:00 2001 From: Maciej Baczmanski Date: Wed, 7 Aug 2024 13:13:31 +0200 Subject: [PATCH] openthread: add soft float fallback for lib path calculation Add soft float fallback to enable building from libs with softfp ABI enabled. Code built with `soft` and `softfp` `float-abi` options can be linked together as they both use the same soft-float ABI and generate functions to pass floating-point arguments to integer registers. This is contrary to the `hard` option where floating-point arguments are passed directly to FPU registers. `softfp` additionally allows using hardware floating-point instructions instead of emulated ones. Signed-off-by: Maciej Baczmanski --- openthread/cmake/extensions.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openthread/cmake/extensions.cmake b/openthread/cmake/extensions.cmake index 52db0666fc..c5aa3283f7 100644 --- a/openthread/cmake/extensions.cmake +++ b/openthread/cmake/extensions.cmake @@ -7,6 +7,8 @@ # The Build the path of the library taking in nrf_security backend type, # OpenThread version and feature set function(openthread_calculate_lib_path ot_version lib_path) + set(OPENTHREAD_LIB_BASE_DIR "${ZEPHYR_NRFXLIB_MODULE_DIR}/openthread") + if(CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER) set(ot_feature_set "master") elseif(CONFIG_OPENTHREAD_NORDIC_LIBRARY_FTD) @@ -19,14 +21,15 @@ function(openthread_calculate_lib_path ot_version lib_path) set(ot_feature_set "custom") endif() - nrfxlib_calculate_lib_path(nrfxlib_path) + nrfxlib_calculate_lib_path(nrfxlib_path BASE_DIR ${OPENTHREAD_LIB_BASE_DIR} SOFT_FLOAT_FALLBACK) + if(CONFIG_OPENTHREAD_COPROCESSOR_RCP) set(${lib_path} - "${ZEPHYR_NRFXLIB_MODULE_DIR}/openthread/${nrfxlib_path}/${ot_version}/rcp" + "${nrfxlib_path}/${ot_version}/rcp" PARENT_SCOPE) else() set(${lib_path} - "${ZEPHYR_NRFXLIB_MODULE_DIR}/openthread/${nrfxlib_path}/${ot_version}/${ot_feature_set}/${nrf_security_backend}" + "${nrfxlib_path}/${ot_version}/${ot_feature_set}/${nrf_security_backend}" PARENT_SCOPE) endif()