From d47186d6e3b9ce9d774d032d9a2db125a335525e Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Tue, 19 Dec 2023 13:11:08 +0000 Subject: [PATCH] Disable automatic setting of clang target flags on old clang Old versions of clang don't support this pragma, so we have to assume that the user will have set the flags. Signed-off-by: Dave Rodgman --- library/aesni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/aesni.c b/library/aesni.c index 9da9f1b9a..8e5bd55ab 100644 --- a/library/aesni.c +++ b/library/aesni.c @@ -36,7 +36,7 @@ #pragma GCC push_options #pragma GCC target ("pclmul,sse2,aes") #define MBEDTLS_POP_TARGET_PRAGMA -#elif defined(__clang__) +#elif defined(__clang__) && (__clang_major__ >= 5) #pragma clang attribute push (__attribute__((target("pclmul,sse2,aes"))), apply_to=function) #define MBEDTLS_POP_TARGET_PRAGMA #endif