mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-20 11:11:08 +01:00
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:
@@ -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
|
||||
|
||||
@@ -46,6 +46,9 @@ TF_PSA_CRYPTO_LIBRARY_PRIVATE_INCLUDE = \
|
||||
-I$(TF_PSA_CRYPTO_PATH)/core \
|
||||
-I$(TF_PSA_CRYPTO_PATH)/drivers/builtin/src
|
||||
|
||||
# Extra linker flags required by the crypto library or the platform
|
||||
TF_PSA_CRYPTO_EXTRA_LDFLAGS =
|
||||
|
||||
## Usage: $(call remove_enabled_options_crypto,PREPROCESSOR_INPUT)
|
||||
## Remove the preprocessor symbols that are set in the current configuration
|
||||
## from PREPROCESSOR_INPUT. Also normalize whitespace.
|
||||
@@ -91,6 +94,6 @@ ifndef WINDOWS_BUILD
|
||||
#$(info THREADING = $(THREADING))
|
||||
|
||||
ifeq ($(THREADING),pthread)
|
||||
LOCAL_LDFLAGS += -lpthread
|
||||
TF_PSA_CRYPTO_EXTRA_LDFLAGS += -lpthread
|
||||
endif
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user