diff options
Diffstat (limited to 'meta/recipes-kernel/perf/perf.bb')
-rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 3771cdb3e9..420fe6b57a 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -22,7 +22,7 @@ TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt slang', '',d)}" SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}" LIBUNWIND_DEPENDS = "${@perf_feature_enabled('perf-libunwind', 'libunwind', '',d)}" -DEPENDS = "virtual/kernel \ +DEPENDS = " \ virtual/${MLPREFIX}libc \ ${MLPREFIX}elfutils \ ${MLPREFIX}binutils \ @@ -32,6 +32,8 @@ DEPENDS = "virtual/kernel \ bison flex \ " +do_configure[depends] += "virtual/kernel:do_shared_workdir" + PROVIDES = "virtual/perf" inherit linux-kernel-base kernel-arch pythonnative @@ -46,7 +48,7 @@ export HOST_SYS #kernel 3.1+ supports WERROR to disable warnings as errors export WERROR = "0" -do_populate_lic[depends] += "virtual/kernel:do_populate_sysroot" +do_populate_lic[depends] += "virtual/kernel:do_patch" # needed for building the tools/perf Perl binding inherit perlnative cpan-base @@ -56,15 +58,14 @@ export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)} export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" -S = "${STAGING_KERNEL_DIR}" -# The source should be ready after the do_unpack -do_unpack[depends] += "virtual/kernel:do_populate_sysroot" +inherit kernelsrc B = "${WORKDIR}/${BPN}-${PV}" SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}" TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}" -LIBUNWIND_DEFINES = "${@perf_feature_enabled('perf-libunwind', '', 'NO_LIBUNWIND=1',d)}" +LIBUNWIND_DEFINES = "${@perf_feature_enabled('perf-libunwind', '', 'NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1',d)}" +LIBNUMA_DEFINES = "${@perf_feature_enabled('perf-libnuma', '', 'NO_LIBNUMA=1',d)}" # The LDFLAGS is required or some old kernels fails due missing # symbols and this is preferred than requiring patches to every old @@ -80,7 +81,8 @@ EXTRA_OEMAKE = '\ AR="${AR}" \ EXTRA_CFLAGS="-ldw" \ perfexecdir=${libexecdir} \ - NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} ${SCRIPTING_DEFINES} \ + NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \ + ${SCRIPTING_DEFINES} ${LIBNUMA_DEFINES} \ ' EXTRA_OEMAKE += "\ @@ -96,7 +98,6 @@ EXTRA_OEMAKE += "\ 'infodir=${@os.path.relpath(infodir, prefix)}' \ " -PARALLEL_MAKE = "" do_compile() { # Linux kernel build system is expected to do the right thing @@ -115,6 +116,10 @@ do_install() { } do_configure_prepend () { + # Fix for rebuilding + rm -rf ${B}/ + mkdir ${B}/ + #kernels before 3.1 do not support WERROR env variable sed -i 's,-Werror ,,' ${S}/tools/perf/Makefile if [ -e "${S}/tools/perf/config/Makefile" ]; then @@ -157,7 +162,7 @@ do_configure_prepend () { } python do_package_prepend() { - bb.data.setVar('PKGV', get_kernelversion('${S}').split("-")[0], d) + d.setVar('PKGV', d.getVar("KERNEL_VERSION", True).split("-")[0]) } PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -165,7 +170,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" -RDEPENDS_${PN} += "elfutils" +RDEPENDS_${PN} += "elfutils bash" RDEPENDS_${PN}-archive =+ "bash" RDEPENDS_${PN}-python =+ "bash python" RDEPENDS_${PN}-perl =+ "bash perl perl-modules" |