Use intermediate variable for TF-PSA-Crypto's contribution to LOCAL_LDFLAGS

Fix a bug whereby `crypto-common.make` was appending to `LOCAL_LDFLAGS`
before `common.make` set the initial value. This broke the build with
pthread enabled: `THREADING` was correctly getting autodetected, but the
addition of `-lpthread` to `LOCAL_LDFLAGS` didn't work.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2025-12-18 20:23:45 +01:00
parent 8a528cfed5
commit 562677945b
2 changed files with 8 additions and 3 deletions

View File

@@ -46,13 +46,15 @@ LOCAL_LDFLAGS = ${MBEDTLS_TEST_OBJS} \
-lpsaclient \
-lmbedtls$(SHARED_SUFFIX) \
-lmbedx509$(SHARED_SUFFIX) \
-lmbedcrypto$(SHARED_SUFFIX)
-lmbedcrypto$(SHARED_SUFFIX) \
$(TF_PSA_CRYPTO_EXTRA_LDFLAGS)
else
LOCAL_LDFLAGS = ${MBEDTLS_TEST_OBJS} \
-L$(MBEDTLS_PATH)/library \
-lmbedtls$(SHARED_SUFFIX) \
-lmbedx509$(SHARED_SUFFIX) \
-lmbedcrypto$(SHARED_SUFFIX)
-lmbedcrypto$(SHARED_SUFFIX) \
$(TF_PSA_CRYPTO_EXTRA_LDFLAGS)
endif
ifdef PSASIM