Skip to content

Fixed build errors with cross-clang compiler#704

Merged
dgarske merged 2 commits intowolfSSL:masterfrom
danielinux:cross-clang-no-gcc-flags
Mar 10, 2026
Merged

Fixed build errors with cross-clang compiler#704
dgarske merged 2 commits intowolfSSL:masterfrom
danielinux:cross-clang-no-gcc-flags

Conversation

@danielinux
Copy link
Member

zd21232

Copilot AI review requested due to automatic review settings February 27, 2026 16:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts compiler- and toolchain-specific flags/attributes so the project builds cleanly with a cross-clang toolchain while preserving GCC behavior where needed.

Changes:

  • Gate GCC-only pragmas/flags to avoid Clang incompatibilities.
  • Adjust ARM build flags to omit -mthumb-interwork except under GCC.
  • Tweak RAMFUNCTION attribute set for Clang vs GCC on ARM.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/update_flash.c Avoids GCC-only #pragma GCC ... usage when compiling with Clang.
options.mk Applies -Wstack-usage only when actually using GCC.
include/wolfboot/wolfboot.h Switches RAMFUNCTION attributes for Clang vs GCC on ARM.
arch.mk Removes -mthumb-interwork for non-GCC toolchains to prevent unsupported-flag errors.
Makefile Drops -nostartfiles from default “headless GCC” CFLAGS.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

@danielinux please resolve merge conflicts. I have not heard results from customer, but this looks good to merge. I'd also like to see a CI job attempt to build with CLANG.

Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

Sorry meant to request change.

@danielinux danielinux force-pushed the cross-clang-no-gcc-flags branch from 965a397 to 4eca085 Compare March 10, 2026 14:48
@dgarske dgarske merged commit fd371d5 into wolfSSL:master Mar 10, 2026
316 of 317 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.

3 participants