From aa4f6219014d863bed51453e5261178adc66be34 Mon Sep 17 00:00:00 2001 From: Beniamin Sandu Date: Tue, 4 Jul 2023 16:09:17 +0300 Subject: [PATCH] aesce: use correct target attribute when building with clang Seems clang has its own issues when it comes to crypto extensions, and right now the best way to avoid them is to accurately enable the needed instructions instead of the broad crypto feature. E.g.: https://github.com/llvm/llvm-project/issues/61645 Signed-off-by: Beniamin Sandu --- library/aesce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/aesce.c b/library/aesce.c index f37a11bbc..893ed173c 100644 --- a/library/aesce.c +++ b/library/aesce.c @@ -68,7 +68,7 @@ #if !defined(__ARM_FEATURE_AES) || defined(MBEDTLS_ENABLE_ARM_CRYPTO_EXTENSIONS_COMPILER_FLAG) # if defined(__clang__) -# pragma clang attribute push (__attribute__((target("crypto"))), apply_to=function) +# pragma clang attribute push (__attribute__((target("aes"))), apply_to=function) # define MBEDTLS_POP_TARGET_PRAGMA # elif defined(__GNUC__) # pragma GCC push_options