Fix build failure: Disable -Werror for KhiCAS/MicroPython on newer toolchains #39
+3
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a build failure encountered when compiling
KhiCAS(specifically the embedded MicroPython 1.12 submodule) on modern build environments (e.g., GitHub Actionsubuntu-latestwith recentgcc-arm-none-eabi).The Issue
Newer versions of GCC are stricter and produce warnings for legacy code that were previously silent. Since the build configuration treats warnings as errors (or defaults to strict mode), these harmless warnings cause the compilation to abort immediately.
Example Error Log:
The Fix
I have modified
apps/KhiCAS/src/micropython-1.12/py/mkrules.mkto append the-Wno-errorflag toCFLAGS. This allows the compiler to report warnings without stopping the build process, ensuring that the.elfbinary can be generated successfully.Verification
KhiCAScompiles successfully with this change in GitHub Actions.