From 8931153dfc1e4809f991be1034d05af5b8cd4f3a Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Fri, 6 Nov 2026 17:37:12 +0100 Subject: [PATCH] wc_port: keep WC_OMIT_FRAME_POINTER gcc-only clang defines __GNUC__ but does not support the optimize() attribute with -f flags (only O-levels), so the macro emitted 'unknown attribute optimize ignored' and broke -Werror clang builds of files using it (e.g. sp_arm32.c). Under clang the macro now expands to empty. --- wolfssl/wolfcrypt/wc_port.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfssl/wolfcrypt/wc_port.h b/wolfssl/wolfcrypt/wc_port.h index 73a9da8625f..86f8385e419 100644 --- a/wolfssl/wolfcrypt/wc_port.h +++ b/wolfssl/wolfcrypt/wc_port.h @@ -192,7 +192,7 @@ #endif #ifndef WC_OMIT_FRAME_POINTER - #if defined(__GNUC__) + #if defined(__GNUC__) && !defined(__clang__) #define WC_OMIT_FRAME_POINTER \ __attribute__((optimize("-fomit-frame-pointer"))) #else