summary refs log tree commit diff
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2018-01-19 19:57:47 +0000
committerGitHub <noreply@github.com>2018-01-19 19:57:47 +0000
commitc053bab151c6c05216251b67cd21fdfcc34cfad2 (patch)
tree800d45ccac0cb3129765c38c06f743babce8344d
parentb694071838275b8aa4656be0931fe46fd5f8f897 (diff)
parent4ca9b43f124efcce2c76d9a5a8cffeec0d821d87 (diff)
downloadnixlib-c053bab151c6c05216251b67cd21fdfcc34cfad2.tar
nixlib-c053bab151c6c05216251b67cd21fdfcc34cfad2.tar.gz
nixlib-c053bab151c6c05216251b67cd21fdfcc34cfad2.tar.bz2
nixlib-c053bab151c6c05216251b67cd21fdfcc34cfad2.tar.lz
nixlib-c053bab151c6c05216251b67cd21fdfcc34cfad2.tar.xz
nixlib-c053bab151c6c05216251b67cd21fdfcc34cfad2.tar.zst
nixlib-c053bab151c6c05216251b67cd21fdfcc34cfad2.zip
Merge pull request #34017 from dtzWill/fix/perf-compilation
Fix build of linuxPackages.perf
-rw-r--r--pkgs/os-specific/linux/kernel/perf.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix
index 1936f6578b6f..e3dbba0e76e5 100644
--- a/pkgs/os-specific/linux/kernel/perf.nix
+++ b/pkgs/os-specific/linux/kernel/perf.nix
@@ -11,7 +11,7 @@ assert versionAtLeast kernel.version "3.12";
 stdenv.mkDerivation {
   name = "perf-linux-${kernel.version}";
 
-  inherit (kernel) src makeFlags;
+  inherit (kernel) src;
 
   preConfigure = ''
     cd tools/perf
@@ -39,6 +39,10 @@ stdenv.mkDerivation {
       "-Wno-error=unused-const-variable" "-Wno-error=misleading-indentation"
     ];
 
+  makeFlags = if stdenv.hostPlatform == stdenv.buildPlatform
+    then null
+    else "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
+
   installFlags = "install install-man ASCIIDOC8=1";
 
   preFixup = ''