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

Upgrade the minimum compiler C++17 #116

Merged
merged 3 commits into from
Aug 13, 2024
Merged

Conversation

cajun-rat
Copy link
Collaborator

See discussion on #106

Full C++17 support came in gcc 8 (although most of it was present in gcc 7 already. In terms of our likely target platforms already ship that:

  • Debian oldstable shipped with gcc-10.
  • The oldest supported Yocto release is Dunfell, which shipped gcc 9.5

That suggests that getting a C++17 compiler shouldn't be a huge problem for our downstream.

Why not go further? C++20 support would require gcc 10 or 11, and while we could go that far it seems like we should be conservative by default.

@cajun-rat
Copy link
Collaborator Author

Grr, this triggers new clang-tidy checks

These calls are deprecated, and moving them out to the implementation
means they are only pulled when BUILD_P11 is set.
See discussion on #106

Full C++17 support came in gcc 8 (although most of it was present in gcc
7 already. In terms of our likely target platforms already ship that:

* Debian oldstable shipped with gcc-10.
* The oldest supported Yocto release is Dunfell, which shipped gcc 9.5

That suggests that getting a C++17 compiler shouldn't be a huge problem
for our downstream.

Why not go further? C++20 support would require gcc 10 or 11, and while
we could go that far it seems like we should be conservative by default.
@cajun-rat cajun-rat force-pushed the chore/bump-cpp-compiler branch 4 times, most recently from 9af8705 to d97369e Compare August 4, 2024 11:20
Upgrading the target language version also results in more clang-tidy
warnings. Fix up many of these, and disable the rest.

I also created #117 to discuss a
more robust approach to putting clang-tidy in the build.
Copy link
Collaborator

@rborn-tx rborn-tx left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -78,7 +78,7 @@ P11Engine::P11Engine(boost::filesystem::path module_path, std::string pass)
LOG_DEBUG << "Slot token model.......: " << slot->token->model;
LOG_DEBUG << "Slot token serialnr....: " << slot->token->serialnr;

uri_prefix_ = std::string("pkcs11:serial=") + slot->token->serialnr + ";pin-value=" + pass + ";id=%";
uri_prefix_ = std::string("pkcs11:serial=") + slot->token->serialnr + ";pin-value=" + pass_ + ";id=%";
Copy link
Collaborator

Choose a reason for hiding this comment

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

That's a bug fix on its own, isn't it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. It was caught by the new compiler warnings :)

@cajun-rat cajun-rat merged commit 43a5517 into master Aug 13, 2024
5 checks passed
@cajun-rat cajun-rat deleted the chore/bump-cpp-compiler branch August 13, 2024 06:59
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.

2 participants