meson: fix missing failure if bpf-framework was enabled#33793
Merged
bluca merged 1 commit intosystemd:mainfrom Jul 20, 2024
Merged
meson: fix missing failure if bpf-framework was enabled#33793bluca merged 1 commit intosystemd:mainfrom
bluca merged 1 commit intosystemd:mainfrom
Conversation
If building with clang and clang does not support bpf, then enabling -Dbpf-framework=enabled would silently drop the feature (even printing bpf-framework: enabled in the meson build recap, and no message anywhere that'd hint at the failure!) This is unexpected, so add check to fail hard in this case. All other code paths (gcc, missing bpftool) properly check for the option, but it is not as easy for a custom command so check explicitly
martinetd
added a commit
to martinetd/nixpkgs
that referenced
this pull request
Jul 20, 2024
systemd meson.build apparently didn't check properly that the option was enabled in all code paths, so it was possible to build systemd such as --version would have -BPF_FRAMEWORK (properly disabled in config.h) with -Dbpf-framework=enabled. Fix the failing check, which was `clang -target bpf` breaking with zerocallusedregs hardening -- this is apparently a known problem as it's disabled in quite a few other packages that mention bpf in comment above the exception... Link: systemd/systemd#33793
13 tasks
bluca
approved these changes
Jul 20, 2024
Mic92
pushed a commit
to Mic92/nixpkgs
that referenced
this pull request
Jul 21, 2024
systemd meson.build apparently didn't check properly that the option was enabled in all code paths, so it was possible to build systemd such as --version would have -BPF_FRAMEWORK (properly disabled in config.h) with -Dbpf-framework=enabled. Fix the failing check, which was `clang -target bpf` breaking with zerocallusedregs hardening -- this is apparently a known problem as it's disabled in quite a few other packages that mention bpf in comment above the exception... Link: systemd/systemd#33793 (cherry picked from commit ef593db)
github-actions bot
pushed a commit
to NixOS/nixpkgs
that referenced
this pull request
Jul 21, 2024
systemd meson.build apparently didn't check properly that the option was enabled in all code paths, so it was possible to build systemd such as --version would have -BPF_FRAMEWORK (properly disabled in config.h) with -Dbpf-framework=enabled. Fix the failing check, which was `clang -target bpf` breaking with zerocallusedregs hardening -- this is apparently a known problem as it's disabled in quite a few other packages that mention bpf in comment above the exception... Link: systemd/systemd#33793 (cherry picked from commit ef593db)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
If building with clang and clang does not support bpf, then enabling -Dbpf-framework=enabled would silently drop the feature (even printing bpf-framework: enabled in the meson build recap, and no message anywhere that'd hint at the failure!)
This is unexpected, so add check to fail hard in this case.
All other code paths (gcc, missing bpftool) properly check for the option, but it is not as easy for a custom command so check explicitly
bit me on nixos that does unholy things to clang...