summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2022-08-21 16:59:14 +0200
committerGitHub <noreply@github.com>2022-08-21 16:59:14 +0200
commit4a641f7ac364ef3d6c59f8d11000cbd1bad88cad (patch)
tree533ed6d2a4a37a7b6e95509407752a8be4248c70 /pkgs/os-specific/linux/systemd
parentf07e4525574804ac3ecee58eee22a8773e9489d9 (diff)
parentca0120a4bcb759b9a9040219b1f0a5e5a86e34a1 (diff)
downloadnixpkgs-4a641f7ac364ef3d6c59f8d11000cbd1bad88cad.tar
nixpkgs-4a641f7ac364ef3d6c59f8d11000cbd1bad88cad.tar.gz
nixpkgs-4a641f7ac364ef3d6c59f8d11000cbd1bad88cad.tar.bz2
nixpkgs-4a641f7ac364ef3d6c59f8d11000cbd1bad88cad.tar.lz
nixpkgs-4a641f7ac364ef3d6c59f8d11000cbd1bad88cad.tar.xz
nixpkgs-4a641f7ac364ef3d6c59f8d11000cbd1bad88cad.tar.zst
nixpkgs-4a641f7ac364ef3d6c59f8d11000cbd1bad88cad.zip
Merge pull request #187714 from veehaitch/systemd-bpf-framework
systemd: enable `BPF_FRAMEWORK` by default (`withLibBPF=true`)
Diffstat (limited to 'pkgs/os-specific/linux/systemd')
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index d2d6146c5d6..81a1d8d238f 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -83,7 +83,7 @@
 , withHostnamed ? true
 , withHwdb ? true
 , withImportd ? !stdenv.hostPlatform.isMusl
-, withLibBPF ? false # currently fails while generating BPF objects
+, withLibBPF ? true
 , withLocaled ? true
 , withLogind ? true
 , withMachined ? true
@@ -207,6 +207,10 @@ stdenv.mkDerivation {
       --replace \
       "run_command(cc.cmd_array(), '-print-prog-name=objcopy', check: true).stdout().strip()" \
       "'${stdenv.cc.bintools.targetPrefix}objcopy'"
+  '' + lib.optionalString withLibBPF ''
+    # BPF does not work with stack protector
+    substituteInPlace src/core/bpf/meson.build \
+      --replace "clang_flags = [" "clang_flags = [ '-fno-stack-protector',"
   '' + (
     let
       # The following patches references to dynamic libraries to ensure that