kernel: Enable cross compiling
This commit is contained in:
committed by
Ben Wolsieffer
parent
5d8b359db7
commit
7a9b6ac39a
@@ -23,8 +23,8 @@ 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 makeWrapper pkgconfig ];
|
||||
buildInputs = [ elfutils python perl newt slang libunwind binutils zlib ] ++
|
||||
flex bison libiberty libaudit makeWrapper pkgconfig python perl ];
|
||||
buildInputs = [ elfutils newt slang libunwind binutils zlib ] ++
|
||||
stdenv.lib.optional withGtk gtk2;
|
||||
|
||||
# Note: we don't add elfutils to buildInputs, since it provides a
|
||||
@@ -40,6 +40,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.prefix}";
|
||||
|
||||
installFlags = "install install-man ASCIIDOC8=1";
|
||||
|
||||
preFixup = ''
|
||||
@@ -47,15 +51,6 @@ stdenv.mkDerivation {
|
||||
--prefix PATH : "${binutils}/bin"
|
||||
'';
|
||||
|
||||
crossAttrs = {
|
||||
/* I don't want cross-python or cross-perl -
|
||||
I don't know if cross-python even works */
|
||||
propagatedBuildInputs = [ elfutils.crossDrv newt.crossDrv ];
|
||||
makeFlags = "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
|
||||
elfutils = elfutils.crossDrv;
|
||||
inherit (kernel.crossDrv) src patches;
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = https://perf.wiki.kernel.org/;
|
||||
description = "Linux tools to profile with performance counters";
|
||||
|
||||
Reference in New Issue
Block a user