Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make local functions and objects static #9218

Closed
wants to merge 2 commits into from

Conversation

casaroli
Copy link

@casaroli casaroli commented Jun 2, 2024

Description

In NuttX flat build, all objects are linked together, so that they end up in a flat namespace.

If ssl_server2 and ssl_client2 are linked together, we get some multiple definitions of these functions.

It should not hurt the current use cases if set these to static.

Please accept this PR as part of a (hopefully short) series to make mbedtls more cleanly integrated in NuttX.

PR checklist

Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")

  • changelog provided, or not required
  • 3.6 backport done, or not required
  • 2.28 backport done, or not required
  • tests provided, or not required

Notes for the submitter

Please refer to the contributing guidelines, especially the
checklist for PR contributors.

Help make review efficient:

  • Multiple simple commits
    • please structure your PR into a series of small commits, each of which does one thing
  • Avoid force-push
    • please do not force-push to update your PR - just add new commit(s)
  • See our Guidelines for Contributors for more details about the review process.

Trying to build the programs in NuttX
which has a flat build.

These functions should be static,
so that we can link all these
objects together.

This should not hurt the current use cases.

Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
@casaroli casaroli marked this pull request as ready for review June 2, 2024 14:14
@misch7
Copy link
Contributor

misch7 commented Jun 2, 2024

Hey @casaroli,

just yesterday I pushed some commits to the PR #9189, walking over the same code files and making a lot of stuff static. Could you please checkout and build the code and see if this fixes your issues as well?

These need to be static if we ever want to link all these objects together.

Like it happens in NuttX flatbuild.
@minosgalanakis minosgalanakis added needs-review Every commit must be reviewed by at least two team members, needs-ci Needs to pass CI tests needs-reviewer This PR needs someone to pick it up for review size-s Estimated task size: small (~2d) priority-low Low priority - this may not receive review soon labels Aug 21, 2024
@minosgalanakis minosgalanakis self-assigned this Aug 21, 2024
@casaroli casaroli closed this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci Needs to pass CI tests needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review priority-low Low priority - this may not receive review soon size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants