static-test: Check for Makefile.dep touching CFLAGS#21965
Merged
maribu merged 2 commits intoRIOT-OS:masterfrom Dec 23, 2025
Merged
static-test: Check for Makefile.dep touching CFLAGS#21965maribu merged 2 commits intoRIOT-OS:masterfrom
maribu merged 2 commits intoRIOT-OS:masterfrom
Conversation
Member
Author
The dependency resolution phase MUST NOT change CFLAGS. Hence, any modification of `CFLAGS` within a `Makefile.dep` is disallowed. This moves the changes to the `Makefile.include` instead.
The `Makefile.dep` are intended for dependency tracking only. Modifying CFLAGS as part of the dependency resolution process is just wrong. This extends the build system sanity check to prevent this kind of bug from sneaking in again.
d835117 to
407b88f
Compare
Enoch247
approved these changes
Dec 23, 2025
Member
Author
|
Thx ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Contribution description
The
Makefile.depare intended for dependency tracking only. Modifying CFLAGS as part of the dependency resolution process is just wrong.This extends the build system sanity check to prevent this kind of bug from sneaking in again.
Testing procedure
There are a few offenders in the code base. The CI should flag them now.
I'll add a commit to fix them (and reorder the history to first fix the problem, then detect it, so that bisecting is a bit easier) once it was shown that the CI can now detect the issue.
Issues/PRs references
None.