From ef593db9caff6d700c0c72ba03a7ee79a58c9575 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sat, 20 Jul 2024 20:32:57 +0900 Subject: [PATCH] systemd: re-enable bpf-framework 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: https://github.com/systemd/systemd/pull/33793 --- pkgs/os-specific/linux/systemd/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 68209a4e2ccb..7e99fce543ea 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -412,7 +412,8 @@ stdenv.mkDerivation (finalAttrs: { hardeningDisable = [ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111523 "trivialautovarinit" - ]; + # breaks clang -target bpf; should be fixed to filter target? + ] ++ (lib.optional withLibBPF "zerocallusedregs"); nativeBuildInputs = [