-
Notifications
You must be signed in to change notification settings - Fork 8.2k
kconfig: Add symbols for C standard #71024
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this seems fine to me. My only doubt is about having a new lib/c folder just for this (which would be orphaned maintainer wise)
I was looking for a logical place to put it, but didn't find it obvious. If a more suitable place can be suggested, I can move it. |
What about Kconfig.zephyr ? Maybe inside the compiler options menu? |
tejlmand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for this proposal.
Two minor improvement proposals.
f99592b to
a43a053
Compare
|
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
9be6acc to
b6af3b4
Compare
tejlmand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good.
But fail to understand the reason for the ZEPHYR_TOOLCHAIN_SUPPORTS_GNU_EXTENSIONS setting.
Use vanilla cmake FATAL_ERROR messages instead of assert. Signed-off-by: Pieter De Gendt <[email protected]>
|
Rebased to resolve conflict in release notes, PTAL @tejlmand @stephanosio |
stephanosio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objection to this as long as the plan is to use Kconfig for handling toolchain capabilities and configurations.
Just a minor nit about the Kconfig naming.
Add symbols to select a C standard. Next to an option, hidden symbols are available to select the minimum. This allows subsystems or modules to select the least compliant C standard supported. Signed-off-by: Pieter De Gendt <[email protected]>
Add a symbol to enable GNU C Extensions. And a hidden option for toolchains to signal GNU Extensions support. Signed-off-by: Pieter De Gendt <[email protected]>
Replace the global CSTD property with the CSTD kconfig option to select at least C11 standard. Signed-off-by: Pieter De Gendt <[email protected]>
Replace the global CSTD property with a Kconfig symbol selection. Signed-off-by: Pieter De Gendt <[email protected]>
Add an entry that the CSTD cmake property is deprecated and replaced with a kconfig choice. Signed-off-by: Pieter De Gendt <[email protected]>
Replace the bindesc testcase CSTD definitions with the newly introduced kconfig symbols. Signed-off-by: Pieter De Gendt <[email protected]>
Zephyr PR #71024[1] deprecated CSTD global variable for selecting C standard. Appropriate Kconfig options should be used instead. [1] zephyrproject-rtos/zephyr#71024 BUG=b:321092852 TEST=zmake build bloonchipper Change-Id: I3debb2d9ffc7295ddfbbbd7a84dda51db3fd90a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/5498197 Tested-by: Patryk Duda <[email protected]> Commit-Queue: Patryk Duda <[email protected]> Code-Coverage: Zoss <[email protected]> Reviewed-by: Tom Hughes <[email protected]>
Add symbols to select a C standard. Next to an option, hidden symbols are available to select the minimum.
This allows subsystems or modules to select the minimum compliant C standard supported.