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

Link config options in prj.conf with enabled functions. #15626

Open
lorepieri8 opened this issue Apr 23, 2019 · 2 comments
Open

Link config options in prj.conf with enabled functions. #15626

lorepieri8 opened this issue Apr 23, 2019 · 2 comments
Labels
area: Configuration System Enhancement Changes/Updates/Additions to existing features Needs review This PR needs attention from Zephyr's maintainers

Comments

@lorepieri8
Copy link

Is your enhancement proposal related to a problem? Please describe.
When building with cmake -GNinja it can happen to have an error of the kind In function X: undefined reference to Y
This problem can be solved enabling the right config options in prj.conf, but it's unclear a priori which option should be turned on.

Describe the solution you'd like
An easy way to search with config options are needed to turn on function Y.

Describe alternatives you've considered
An error log mentioning: "have you considered turning on config option Z in order to enable Y?"

Additional context
The background of my request comes from this issue:
#15565

(feel free to give a better title to the issue)

@lorepieri8 lorepieri8 added the Enhancement Changes/Updates/Additions to existing features label Apr 23, 2019
@SebastianBoe
Copy link
Collaborator

This would be good to have, ideas for how to do this in a maintainable way are welcome.

@gordonklaus
Copy link

I have a couple of observations with regard to this issue. Likely naïve (as I am very new to this project), but perhaps a good starting point:

  • If you include a header file, then all function declared in it should also be defined. That is, configuration should affect declarations and definitions equally. An "undefined reference" error is a bug. The absence of a function should be signaled by it not even being declared.
  • If a certain configuration is to exclude some functions, then including the header file that declares those functions should immediately (i.e., via an #error directive) produce an error describing the reason for the conflict, i.e., the aforementioned "have you considered turning on config option Z in order to enable Y?" message.

I've no idea how maintainable this solution is.

@zephyrbot zephyrbot added the Needs review This PR needs attention from Zephyr's maintainers label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Configuration System Enhancement Changes/Updates/Additions to existing features Needs review This PR needs attention from Zephyr's maintainers
Projects
None yet
Development

No branches or pull requests

4 participants