Fix embedded images built with the clang compiler#730
Fix embedded images built with the clang compiler#730danielinux wants to merge 12 commits intowolfSSL:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses oversized/sparse embedded images produced when building with clang by adjusting linking and objcopy behavior for clang-based builds.
Changes:
- Add clang-specific
objcopysection filtering to avoid producing huge sparse binary/hex/srec outputs. - Switch clang builds to use the GNU linker driver to preserve LMAs in the linker script.
- Relax clang build warnings around unknown attributes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test-app/Makefile | Introduces clang-specific objcopy flags and applies them to image artifact generation to prevent sparse outputs. |
| arch.mk | Changes clang toolchain linking to use GNU linker driver and adds clang warning suppressions for unknown attributes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9c7d22d to
aeee273
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Setup default objcopy flags | ||
| OBJCOPY_FLAGS+=--gap-fill $(FILL_BYTE) | ||
| OBJCOPY_IMAGE_FLAGS:= |
There was a problem hiding this comment.
OBJCOPY_IMAGE_FLAGS:= overrides any value provided via the environment (unlike command-line overrides), which makes it harder to customize objcopy behavior in CI or wrappers that export this variable. If the intent is just to provide a default, use a conditional assignment (?=) instead so externally provided values are preserved.
| OBJCOPY_IMAGE_FLAGS:= | |
| OBJCOPY_IMAGE_FLAGS?= |
zd21378