Skip to content

wc_port: keep WC_OMIT_FRAME_POINTER gcc-only - #12043

Merged
philljj merged 1 commit into
wolfSSL:masterfrom
danielinux:fix-gcc-dialect-clang-build
Nov 6, 2026
Merged

philljj merged 1 commit into
wolfSSL:masterfrom
danielinux:fix-gcc-dialect-clang-build

Conversation

@danielinux

Copy link
Copy Markdown
Member

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.

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.
Copilot AI balanced review requested due to automatic review settings November 6, 2026 16:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change excluding Clang from the frame-pointer optimization attribute guard.

No open issues 🎉

What changed in this PR

This PR prevents Clang builds from receiving the unsupported optimize attribute through wolfSSL’s WC_OMIT_FRAME_POINTER macro, avoiding attribute warnings that can fail builds using -Werror.

Changes:

  • Excludes Clang from the GNU compiler guard while preserving GCC behavior.
  • Makes WC_OMIT_FRAME_POINTER expand to empty under Clang unless explicitly overridden.
File Description
wolfssl/​wolfcrypt/​wc_port.h Adds a Clang exclusion to the frame-pointer optimization attribute guard.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

@danielinux danielinux assigned wolfSSL-Bot and unassigned danielinux Nov 6, 2026
@philljj
philljj merged commit 5eff013 into wolfSSL:master Nov 6, 2026
443 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants