Skip to content

Use C++20 as compile standard#3326

Merged
andypugh merged 2 commits intoLinuxCNC:masterfrom
BsAtHome:fix_cxx-standard-20
Feb 6, 2025
Merged

Use C++20 as compile standard#3326
andypugh merged 2 commits intoLinuxCNC:masterfrom
BsAtHome:fix_cxx-standard-20

Conversation

@BsAtHome
Copy link
Copy Markdown
Contributor

@BsAtHome BsAtHome commented Feb 6, 2025

This PR changes the required C++ standard to C++20, as discussed in #3296. The consequence is that Bullseye/Debian 11 is dropped as supported distribution and removed from CI.

Also fixed in this PR:

  • Drop useless compiler-flag test in configure. It is never added to CFLAGS/CXXFLAGS anyway due to a spelling error (flag vs. commonflag). Regardless, the tested compiler-flag is unnecessary because the code has already been fixed (and the test always failed on clang). If compiler-flags are required you should add CFLAGS= or CXXFLAGS= to the configure command-line.
  • Remove a contraction in an explanatory text (Don't -> Do not) because vim has trouble syntax highlighting beyond it.
  • Always add compiler-flag -Wextra. We are currently completely warning free. Lets keep it that way.
  • Add a configure option --enable-werror to set the -Werror compiler-flag. In the near future this should be added to CI's rip-and-test and rip-and-test-clang tests to stay warning free.

Remove non-functional compiler-flag test.
Remove a contraction in an explanatory text so vim will highlight correctly.
Always add -Wextra compiler flag. We are now completely warning free.
Add configure option --enable-werror to force any warnings to become errors.
@andypugh andypugh merged commit cf4976f into LinuxCNC:master Feb 6, 2025
8 checks passed
@BsAtHome BsAtHome mentioned this pull request Feb 20, 2025
@SebKuzminsky
Copy link
Copy Markdown
Collaborator

SebKuzminsky commented Feb 20, 2025

I think this broke builds on buildbot2, eg http://buildbot2.highlab.com/buildbot/#/builders/7/builds/3289

Bullseye errors out because it doesn't have c++20, so the builds fail and no debs are produced. This has been going on for a couple of weeks now.

Probably someone needs to update scripts/platform-is-supported.

Or if the buildbot isn't useful any more I'd be happy to turn it off.

@BsAtHome
Copy link
Copy Markdown
Contributor Author

Yes, C++20 fails on Bullseye. It was decided to drop Bullseye in the master tree.

If you like, please fix it :-)

@BsAtHome
Copy link
Copy Markdown
Contributor Author

And, while you are at it,... I don't think i386 is supported anymore and arm is probably either arm64 or aarch64. It also detects xenomai but will report it as unsupported.

There may be more to fix in the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants