diff options
author | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2015-09-03 23:32:36 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2015-09-03 23:37:15 +0300 |
commit | 710c4c3c9d297658bca1758986731ce530603275 (patch) | |
tree | 33a12a444ef21d4d1ac674066fc715f8908012d3 /pkgs/os-specific | |
parent | c839c988f4f7546552217b76e8285d085b87b91e (diff) | |
download | nixlib-710c4c3c9d297658bca1758986731ce530603275.tar nixlib-710c4c3c9d297658bca1758986731ce530603275.tar.gz nixlib-710c4c3c9d297658bca1758986731ce530603275.tar.bz2 nixlib-710c4c3c9d297658bca1758986731ce530603275.tar.lz nixlib-710c4c3c9d297658bca1758986731ce530603275.tar.xz nixlib-710c4c3c9d297658bca1758986731ce530603275.tar.zst nixlib-710c4c3c9d297658bca1758986731ce530603275.zip |
linuxPackages_*.perf: Fix build after kernel 4.1
In 4.1, the build system changed, and it now wants to execute ld like this: ld -r -o util/scripting-engines/libperf-in.o util/scripting-engines/trace-event-perl.o util/scripting-engines/trace-event-python.o The actual problem seems to be that `buildInputs = [elfutils ...]` causes 'ld' to point to elfutils in PATH instead of the usual binutils. So remove elfutils from buildInputs and set NIX_CFLAGS_* manually. This is a slight hack, but there is some precedent: https://github.com/NixOS/nixpkgs/blob/0761f81da71fc6a940c7f51129b6c7717db78e87/pkgs/tools/package-management/rpm/default.nix#L13 Fixes #9095.
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/kernel/perf.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index efd3515ff240..2dcdcdc4a91d 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -23,10 +23,13 @@ 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 ]; - buildInputs = [ elfutils python perl newt slang pkgconfig libunwind binutils ] ++ + buildInputs = [ python perl newt slang pkgconfig libunwind binutils ] ++ stdenv.lib.optional withGtk gtk; - NIX_CFLAGS_COMPILE = "-Wno-error=cpp"; + # Note: we don't add elfutils to buildInputs, since it provides a + # bad `ld' and other stuff. + NIX_CFLAGS_COMPILE = "-I${elfutils}/include -Wno-error=cpp"; + NIX_CFLAGS_LINK = "-L${elfutils}/lib"; installFlags = "install install-man ASCIIDOC8=1"; |