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

gperf: fix build with clang 16 #235120

Merged
merged 1 commit into from
May 31, 2023
Merged

Conversation

reckenrode
Copy link
Contributor

Description of changes

Clang 16 defaults to C++17, which does not allow the register storage class specifier. This is fixed upstream, but the change doesn’t apply cleanly to the 3.1 release. Fortunately, the fix is trivial (remove the disallowed keyword).

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Clang 16 defaults to C++17, which does not allow the `register` storage
class specifier. This is fixed upstream, but the change doesn’t apply
cleanly to the 3.1 release. Fortunately, the fix is trivial (remove the
disallowed keyword).
Copy link
Contributor

@trofi trofi left a comment

Choose a reason for hiding this comment

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

LGTM. Another option is to update to 3.2 which should contain the same fix: https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commitdiff;h=a63b830554920476881837eeacd4a6b507632b19

@reckenrode
Copy link
Contributor Author

I see the commit, but has there been an official release? There isn’t a v3.2 tag or tarballs.

@trofi
Copy link
Contributor

trofi commented May 31, 2023

Ah, good point. I though that https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commitdiff;h=6d53a2dbe0ad692d0f36fd394b7e1962d9a81730 implied there is a proper release. My apologies.

UPDATE: related upstream bug: https://savannah.gnu.org/bugs/?62139

@trofi trofi merged commit 421a6f3 into NixOS:staging May 31, 2023
@reckenrode reckenrode deleted the gperf-clang-fix branch June 1, 2023 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants