diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2017-07-23 15:16:11 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-07-23 15:18:02 +0100 |
commit | 887570883ed4ac5b3318565b585979eb1959c6c2 (patch) | |
tree | 81746881bc2aad15cfdc2b52d9d28e566e2d9434 /pkgs/os-specific/linux | |
parent | 11f8524b12dc5aeb6dc2a6651533e837f48cef06 (diff) | |
download | nixlib-887570883ed4ac5b3318565b585979eb1959c6c2.tar nixlib-887570883ed4ac5b3318565b585979eb1959c6c2.tar.gz nixlib-887570883ed4ac5b3318565b585979eb1959c6c2.tar.bz2 nixlib-887570883ed4ac5b3318565b585979eb1959c6c2.tar.lz nixlib-887570883ed4ac5b3318565b585979eb1959c6c2.tar.xz nixlib-887570883ed4ac5b3318565b585979eb1959c6c2.tar.zst nixlib-887570883ed4ac5b3318565b585979eb1959c6c2.zip |
perf: remove binutils patch by wrapper
starting with linux 4.12 our patch no longer applied. In order to avoid having to maintain patches for different linux kernels it is easier to use a wrapper instead.
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r-- | pkgs/os-specific/linux/kernel/perf-binutils-path.patch | 12 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/perf.nix | 11 |
2 files changed, 7 insertions, 16 deletions
diff --git a/pkgs/os-specific/linux/kernel/perf-binutils-path.patch b/pkgs/os-specific/linux/kernel/perf-binutils-path.patch deleted file mode 100644 index d20f2296ea30..000000000000 --- a/pkgs/os-specific/linux/kernel/perf-binutils-path.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru -x '*~' linux-4.9.31-orig/tools/perf/util/annotate.c linux-4.9.31/tools/perf/util/annotate.c ---- linux-4.9.31-orig/tools/perf/util/annotate.c 2017-06-07 12:08:04.000000000 +0200 -+++ linux-4.9.31/tools/perf/util/annotate.c 2017-06-12 13:10:08.811079574 +0200 -@@ -1350,7 +1350,7 @@ - "%s %s%s --start-address=0x%016" PRIx64 - " --stop-address=0x%016" PRIx64 - " -l -d %s %s -C %s 2>/dev/null|grep -v %s|expand", -- objdump_path ? objdump_path : "objdump", -+ objdump_path ? objdump_path : OBJDUMP_PATH, - disassembler_style ? "-M " : "", - disassembler_style ? disassembler_style : "", - map__rip_2objdump(map, sym->start), diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index 3fbad924568f..b6f1f7d9f8a5 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, kernel, elfutils, python, perl, newt, slang, asciidoc, xmlto +{ lib, stdenv, kernel, elfutils, python, perl, newt, slang, asciidoc, xmlto, makeWrapper , docbook_xsl, docbook_xml_dtd_45, libxslt, flex, bison, pkgconfig, libunwind, binutils , libiberty, libaudit , zlib, withGtk ? false, gtk2 ? null }: @@ -13,8 +13,6 @@ stdenv.mkDerivation { inherit (kernel) src; - patches = kernel.patches ++ [ ./perf-binutils-path.patch ]; - preConfigure = '' cd tools/perf sed -i s,/usr/include/elfutils,$elfutils/include/elfutils, Makefile @@ -26,7 +24,7 @@ stdenv.mkDerivation { # perf refers both to newt and slang # binutils is required for libbfd. nativeBuildInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt - flex bison libiberty libaudit ]; + flex bison libiberty libaudit makeWrapper ]; buildInputs = [ elfutils python perl newt slang pkgconfig libunwind binutils zlib ] ++ stdenv.lib.optional withGtk gtk2; @@ -45,6 +43,11 @@ stdenv.mkDerivation { installFlags = "install install-man ASCIIDOC8=1"; + preFixup = '' + wrapProgram $out/bin/perf \ + --prefix PATH : "${binutils}/bin" + ''; + crossAttrs = { /* I don't want cross-python or cross-perl - I don't know if cross-python even works */ |