3
0
Fork 0
forked from mirrors/nixpkgs

linuxPackages.perf: add libopcodes as a buildInput

Newer versions of perf in Linux 5.1+ support disassembling and
annotating eBPF programs inside the kernel. In order to do this, it uses
libbfd's support for bpf disassembly. There are two parts: libopcodes
and libbfd.

The 'perf' build system seems to expect libopcodes/libbfd to go "hand in
hand" -- always together, if one or the other is installed. If the build
system detects libbfd is available, then an import of <dis-asm.h> is
performed, but this fails since it wasn't in the buildInput. Fixing this
should be an easy, backwards-compatible change.

Fixes #60891, allowing linuxPackages_testing.perf to build again
(currently kernel version 5.1.0-rc7).

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2019-05-03 15:08:18 -05:00
parent 069aeee3b8
commit c8cb015ff6
No known key found for this signature in database
GPG key ID: 25D2038DEB08021D

View file

@ -1,6 +1,6 @@
{ lib, stdenv, kernel, elfutils, python, perl, newt, slang, asciidoc, xmlto, makeWrapper { lib, stdenv, kernel, elfutils, python, perl, newt, slang, asciidoc, xmlto, makeWrapper
, docbook_xsl, docbook_xml_dtd_45, libxslt, flex, bison, pkgconfig, libunwind, binutils , docbook_xsl, docbook_xml_dtd_45, libxslt, flex, bison, pkgconfig, libunwind, binutils
, libiberty, audit, libbfd, openssl, systemtap, numactl , libiberty, audit, libbfd, libopcodes, openssl, systemtap, numactl
, zlib, withGtk ? false, gtk2 ? null , zlib, withGtk ? false, gtk2 ? null
}: }:
@ -40,6 +40,7 @@ stdenv.mkDerivation {
]; ];
buildInputs = [ buildInputs = [
elfutils newt slang libunwind libbfd zlib openssl systemtap.stapBuild numactl elfutils newt slang libunwind libbfd zlib openssl systemtap.stapBuild numactl
libopcodes
] ++ stdenv.lib.optional withGtk gtk2; ] ++ stdenv.lib.optional withGtk gtk2;
# Note: we don't add elfutils to buildInputs, since it provides a # Note: we don't add elfutils to buildInputs, since it provides a