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
CI: Fix C/C++ standard customization #2306
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…dy requested by caller Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ations" (are only allowed in C99 or C11 mode) A little fallout for recent fix of actually doing C89 bulids via ci_build.sh Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…d by default (Strict C seems broken on OS side) Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
added
bug
enhancement
Windows
CI
Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
cross-builds
portability
We want NUT to build and run everywhere possible
labels
Feb 10, 2024
…NFATAL settings when BUILD_TYPE is empty Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…=..." to also cover "-ansi" option Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… loop initial declarations" (are only allowed in C99 or C11 mode) A little fallout for recent fix of actually doing C89 bulids via ci_build.sh Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ilds Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…dards Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…italOcean) [networkupstools#2192] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…tdio.h for snprintf() Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Now NUT Configuration summary:
NUT Paths:
NUT Paths for third-party integrations:
NUT Build/Target system info:
NUT Compiler settings:
|
Ignore the shellcheck fault, CI builder got restarted. |
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…wed in C99 or C11 mode) for a WIN32 codepath Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ct C89 Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… mode Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
force-pushed
the
fix-CI-std
branch
from
February 10, 2024 18:10
8e42512
to
affa048
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
CI
Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
cross-builds
enhancement
portability
We want NUT to build and run everywhere possible
Windows
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.
While our NUT CI matrix code allows to pick
-std=...
settings forCFLAGS
andCXXFLAGS
, it was found that builds launched allegedly inc99
/c++98
mode (orgnu
equivalents) did not actually use that, and added flags for C11/C++11 (if supported by compiler) regardless.This PR fixes the detection we have for caller-specified
-std=...
or-ansi
to avoid slapping on another value, and some fallout of this change per CI findings.NOTE: Builds in strict-C
-ansi
mode (akac89
andc++98
) do not pass - unable to find many standard library methods and types in system headers (snprintf
,timespec
etc.) and complain about//
comments that remain abundant in our codebase. So they are not a practical immediate goal. However, builds requested withgnu89
andgnu++98
modes (to whatever extent C++ would be or not be enabled in practice) should pass.