[efr32] turn off warnings which break certain configurations of mbed TLS (#5091)

Detected on EFR32MG21 with hardware acceleration turned on, all inside
mbedTLS' library/ecdsa.c:

* Turning on ECDSA signing acceleration (MBEDTLS_ECDSA_SIGN_ALT)
  triggers an unused parameter on rs_ctx in
  mbedtls_ecdsa_write_signature_restartable

* Turning on ECDSA verification acceleration
  (MBEDTLS_ECDSA_VERIFY_ALT) triggers an unused parameter on rs_ctx in
  mbedtls_ecdsa_read_signature_restartable

* Turning on both ECDSA signing & verification acceleration
  (MBEDTLS_ECDSA_SIGN_ALT + MBEDTLS_ECDSA_VERIFY_ALT) triggers an
  unused function error on static function derive_mpi

Looking at the latest mbed TLS development branch, it seems this issue
will not be resolved soon. Therefore, we're turning off warnings for
unused parameters and unused functions inside mbedTLS for the platform
which uses this configuration (EFR32MG21).
This commit is contained in:
Steven Cooreman
2020-06-12 10:32:35 -07:00
committed by GitHub
parent 9aadfd0cdf
commit 30f40fc0fa
+2
View File
@@ -84,6 +84,8 @@ EFR32_MBEDTLS_CPPFLAGS += -I$(AbsTopSourceDir)/third_party/silabs/gecko_sdk_suit
EFR32_MBEDTLS_CPPFLAGS += -I$(AbsTopSourceDir)/third_party/mbedtls
EFR32_MBEDTLS_CPPFLAGS += -I$(AbsTopSourceDir)/third_party/mbedtls/repo/include
EFR32_MBEDTLS_CPPFLAGS += -I$(AbsTopSourceDir)/third_party/mbedtls/repo/include/mbedtls
EFR32_MBEDTLS_CPPFLAGS += -Wno-unused-function
EFR32_MBEDTLS_CPPFLAGS += -Wno-unused-parameter
CONFIG_FILE_PATH = $(AbsTopSourceDir)/examples/platforms/efr32mg21/
HAL_CONF_DIR = $(CONFIG_FILE_PATH)/$(shell echo $(BOARD) | tr A-Z a-z)