bpftools: use binutils-2.38 for linux before 5.19
Without the change bpftools build fails on binutils-2.39 due to API change: jit_disasm.c:105:17: error: too few arguments to function 'init_disassemble_info' 105 | init_disassemble_info(&info, stdout, | ^~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
a1f0d93199
commit
329b0da5ba
|
@ -1,15 +1,20 @@
|
|||
{ lib, stdenv
|
||||
, libopcodes, libbfd, elfutils, readline
|
||||
, libopcodes, libopcodes_2_38
|
||||
, libbfd, libbfd_2_38
|
||||
, elfutils, readline
|
||||
, linuxPackages_latest, zlib
|
||||
, python3, bison, flex
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bpftools";
|
||||
inherit (linuxPackages_latest.kernel) version src;
|
||||
|
||||
nativeBuildInputs = [ python3 bison flex ];
|
||||
buildInputs = [ libopcodes libbfd elfutils zlib readline ];
|
||||
buildInputs = (if (lib.versionAtLeast version "5.20")
|
||||
then [ libopcodes libbfd ]
|
||||
else [ libopcodes_2_38 libbfd_2_38 ])
|
||||
++ [ elfutils zlib readline ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs scripts/bpf_doc.py
|
||||
|
|
Loading…
Reference in a new issue