From a1502f54f5c15e7ae00793001b7e56813af624ef Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 10 Dec 2025 18:19:36 +0100 Subject: [PATCH] Drop the ability to build the library without the framework We put that in 3.6.0 because we wanted to minimize changes in a minor release, and in particular we wanted users to be able to build the library if they were checking out a release tag without checking out submodules recursively. That was possible because 3.6.x release tags contain the generated files. Since 4.0.0, it's completely impossible to build Mbed TLS without the `tf-psa-crypto` submodule. So there's no point in trying to allow a build without the `framework` submodule. In the libtestdriver1 build, where we copy part of the framework, copy the framework makefile as well, which is what we use to check for the presence of the framework (even though the framework makefile doesn't do anything useful after all). Signed-off-by: Gilles Peskine --- library/Makefile | 16 +++++++--------- tests/Makefile | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/library/Makefile b/library/Makefile index 9085ab481c..6d43b85e18 100644 --- a/library/Makefile +++ b/library/Makefile @@ -24,19 +24,17 @@ GENERATED_FILES += \ $(TF_PSA_CRYPTO_CORE_PATH)/tf_psa_crypto_config_check_final.h \ $(TF_PSA_CRYPTO_CORE_PATH)/tf_psa_crypto_config_check_user.h -ifneq ($(GENERATED_FILES),$(wildcard $(GENERATED_FILES))) - ifeq (,$(wildcard $(MBEDTLS_PATH)/framework/exported.make)) - # Use the define keyword to get a multi-line message. - # GNU make appends ". Stop.", so tweak the ending of our message accordingly. - define error_message +ifeq (,$(wildcard $(MBEDTLS_PATH)/framework/exported.make)) + # Use the define keyword to get a multi-line message. + # GNU make appends ". Stop.", so tweak the ending of our message accordingly. + define error_message $(MBEDTLS_PATH)/framework/exported.make not found. Run `git submodule update --init` to fetch the submodule contents. This is a fatal error - endef - $(error $(error_message)) - endif - include $(MBEDTLS_PATH)/framework/exported.make + endef + $(error $(error_message)) endif +include $(MBEDTLS_PATH)/framework/exported.make # Also see "include/mbedtls/mbedtls_config.h" diff --git a/tests/Makefile b/tests/Makefile index a52bc32f57..782ebc1200 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -334,7 +334,7 @@ libtestdriver1.a: mkdir ./libtestdriver1/tf-psa-crypto/drivers/p256-m touch ./libtestdriver1/tf-psa-crypto/drivers/everest/Makefile.inc touch ./libtestdriver1/tf-psa-crypto/drivers/p256-m/Makefile.inc - cp -Rf ../framework/scripts ./libtestdriver1/framework + cp -Rf ../framework/scripts ../framework/exported.make ./libtestdriver1/framework cp -Rf ../library ./libtestdriver1 cp -Rf ../include ./libtestdriver1 cp -Rf ../scripts ./libtestdriver1