mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 17:44:44 +00:00
systemd: fix cross compilation with libbpf enabled
This commit is contained in:
parent
c91ed9564a
commit
767c3e5fa9
@ -208,6 +208,8 @@ stdenv.mkDerivation {
|
||||
"run_command(cc.cmd_array(), '-print-prog-name=objcopy', check: true).stdout().strip()" \
|
||||
"'${stdenv.cc.bintools.targetPrefix}objcopy'"
|
||||
'' + lib.optionalString withLibBPF ''
|
||||
substituteInPlace meson.build \
|
||||
--replace "find_program('clang'" "find_program('${stdenv.cc.targetPrefix}clang'"
|
||||
# BPF does not work with stack protector
|
||||
substituteInPlace src/core/bpf/meson.build \
|
||||
--replace "clang_flags = [" "clang_flags = [ '-fno-stack-protector',"
|
||||
@ -352,7 +354,7 @@ stdenv.mkDerivation {
|
||||
docbook_xml_dtd_45
|
||||
(buildPackages.python3Packages.python.withPackages (ps: with ps; [ lxml jinja2 ]))
|
||||
]
|
||||
++ lib.optional withLibBPF [
|
||||
++ lib.optionals withLibBPF [
|
||||
bpftools
|
||||
llvmPackages.clang
|
||||
llvmPackages.libllvm
|
||||
|
Loading…
Reference in New Issue
Block a user