From b04208151b9b2edb95afcd1a66f39669ce116d53 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Wed, 14 Oct 2020 19:42:23 +0200 Subject: [PATCH] tinycrypt: make asm optimizations optional for baremetal Disable asm optimizations for strict armcc baremetal builds. Signed-off-by: Andrzej Kurek --- configs/baremetal.h | 5 +++-- tinycrypt/ecc.c | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/configs/baremetal.h b/configs/baremetal.h index 628153795..7168976e5 100644 --- a/configs/baremetal.h +++ b/configs/baremetal.h @@ -117,8 +117,9 @@ #define MBEDTLS_USE_TINYCRYPT #define MBEDTLS_HAVE_ASM -#define MBEDTLS_OPTIMIZE_TINYCRYPT_ASM - +#if !( defined(__STRICT_ANSI__) && defined(__CC_ARM) ) + #define MBEDTLS_OPTIMIZE_TINYCRYPT_ASM +#endif /* X.509 CRT parsing */ #define MBEDTLS_X509_USE_C #define MBEDTLS_X509_CRT_PARSE_C diff --git a/tinycrypt/ecc.c b/tinycrypt/ecc.c index 79ecc8cec..1328ea2d1 100644 --- a/tinycrypt/ecc.c +++ b/tinycrypt/ecc.c @@ -71,10 +71,6 @@ #include "mbedtls/platform_util.h" #if defined MBEDTLS_OPTIMIZE_TINYCRYPT_ASM -#ifdef __CC_ARM -#pragma diag_suppress 667 // strict diagnostic: "asm" function is nonstandard -#endif - #ifndef asm #define asm __asm #endif