makefiles: select default prng _after_ recursive dependency resolution #21060
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 PRNG is supposed to be set only if there is none selected at the end of the recursive dependency resolution. However, this is currently not the case: a transitive dependency setting the PRNG (encountered with
psa_crypto
which selectsprng_sha256prng
) will lead to a user-facing dependency clash.The first commit extends
tests/build_system/external_module
to showcase the issue and the second one fixes it by moving the automatic prng selection todefaultmodules_deps.inc.mk
.Disclaimer: I'm not sure if this is the right approach to follow, but it seems to work. Any suggestions from people with more insights on the build system are welcome.
Testing procedure
with only the first commit:
with both commits: