Remove dependency on unsupported MbedTLS build interface
To build libmbedcrypto (part of MbedTLS) for different
deployments, it is necessary to provide a suitable TS project
defined configuration header file and include paths for PSA
storage. It turns out that we have been using an unsupported
CMake based interface to pass in the configuration path and
include paths (using 'thirdparty_inc' and 'thirdparty_defs'
cmake variables). These variables disappear in MbedTLS v3.0.0
so an alternative method is needed before upgrading.
MbedTLS doesn't currently provide its own cmake interface for
providing these parameters. This commit adds a general purpose
configuration interface that exploits the cmake toolchain file
functionality where the toolchain file is actioned early on
when a new cmake context is created. A common cmake file
called config_iface.cmake gets run when an environment's
toochain file is run. The caller may optionally define
the variables EXTERNAL_DEFINITIONS and EXTERNAL_INCLUDE_PATHS
to inject configuration parameters into the child cmake build.
This facility is used by the external component cmake file
for MbedTLS.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I7356c0d1da23bc789090d3299b8e66f2e28ab979
diff --git a/environments/arm-linux/default_toolchain_file.cmake b/environments/arm-linux/default_toolchain_file.cmake
index d530b0d..7ac1621 100644
--- a/environments/arm-linux/default_toolchain_file.cmake
+++ b/environments/arm-linux/default_toolchain_file.cmake
@@ -16,3 +16,4 @@
set(CMAKE_CXX_FLAGS_INIT "-fdiagnostics-show-option -gdwarf-2 -mstrict-align -O0 -DARM64=1")
include($ENV{TS_ROOT}/tools/cmake/compiler/GCC.cmake REQUIRED)
+include($ENV{TS_ROOT}/tools/cmake/compiler/config_iface.cmake REQUIRED)