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

[v2.7] toolchain: Move extra warning options to toolchain abstraction #66501

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

cfriedt
Copy link
Member

@cfriedt cfriedt commented Dec 13, 2023

Backport of #53305
Fixes #66500
Note: Compliance failure is a false positive (those lines are not modified with this commit)

Move extra warning option from generic twister script into compiler-dependent config files. ARCMWDT compiler doesn't support extra warning options ex. "-Wl,--fatal-warnings". To avoid build fails flag "disable_warnings_as_errors" should be passed to twister.

This allows all warning messages and make atomatic test useles.

Move extra warning option from generic twister script into
compiler-dependent config files.
ARCMWDT compiler doesn't support extra warning options ex.
"-Wl,--fatal-warnings". To avoid build fails flag
"disable_warnings_as_errors" should be passed to twister.
This allows all warning messages and make atomatic test useles.

Signed-off-by: Nikolay Agishev <[email protected]>
(cherry picked from commit 0dec4cf)
GCC_VERSION is defined in a few modules, and those headers are often
included first, so replace the one used in zephyr with
TOOLCHAIN_GCC_VERSION. Do the same with CLANG_VERSION, replacing it with
TOOLCHAIN_CLANG_VERSION.

BUILD_ASSERT is also defined in include/toolchain/common.h, which might
get included before gcc.h. We want to use the gcc-specific one instead
of the general one.

Signed-off-by: Keith Packard <[email protected]>
(cherry picked from commit c58c76e)
@github-actions github-actions bot added the area: API Changes to public APIs label Dec 13, 2023
@cfriedt
Copy link
Member Author

cfriedt commented Dec 13, 2023

Also needed to (partially) cherry-pick 6e4f192 to avoid the -Werror issue around BUILD_ASSERT() being redefined in toolchain/gcc.h.

@cfriedt
Copy link
Member Author

cfriedt commented Dec 14, 2023

@tejlmand - should be ready for you if you can take a look. Also @evgeniy-paltsev - your approval would be appreciated as well.

Copy link
Member

@stephanosio stephanosio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks more like an enhancement than a bug fix.

@cfriedt
Copy link
Member Author

cfriedt commented Dec 19, 2023

This looks more like an enhancement than a bug fix.

@stephanosio - someone at Meta complained directly to myself and @ycsin that this was missing, so I filed the issue and did the backport personally.

To that person, it definitely seemed to be a bug in the build system that there was no common way to promote warnings to errors.

I could refer that person to you if you would like to argue about it, but you would probably be there a while.

Cc @jgl-meta @luchnikov 😂

@cfriedt cfriedt merged commit ce4c30f into zephyrproject-rtos:v2.7-branch Dec 19, 2023
26 of 27 checks passed
@cfriedt cfriedt deleted the v2.7-branch branch November 22, 2024 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants