summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/perf/perf.bb
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-01-16 13:11:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-19 22:47:21 +0000
commit73adcf1b668f990624411060da253d84f53eb1ee (patch)
tree3fe2100621620741e6eed341228f3b295e8acea2 /meta/recipes-kernel/perf/perf.bb
parent3b262f458c0324569bb0a130ef895e721757ff3e (diff)
downloadpoky-73adcf1b668f990624411060da253d84f53eb1ee.tar.gz
perf: use PACKAGECONFIG instead of hand-rolled logic
PERF_FEATURES_ENABLE and perf_feature_enabled() was basically a poor man's clone of PACKAGECONFIG, without the automatic handling of dependencies and configure options. As part of the port to PACKAGECONFIG the options have been changed to remove the perf- prefix, but are otherwise unchanged. Also remove BUILDPERF_libc_uclibc assignment as nothing in the metadata uses a BUILDPERF variable. (From OE-Core rev: 33d05772c30036e8d2bb2dc8928989bf98d388f1) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/perf/perf.bb')
-rw-r--r--meta/recipes-kernel/perf/perf.bb26
1 files changed, 9 insertions, 17 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index cfbe628345..8b5028ea4c 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -10,24 +10,21 @@ LICENSE = "GPLv2"
10 10
11PR = "r9" 11PR = "r9"
12 12
13require perf-features.inc
14
15BUILDPERF_libc-uclibc = "no" 13BUILDPERF_libc-uclibc = "no"
16 14
15PACKAGECONFIG ??= "scripting tui"
16PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python"
17# gui support was added with kernel 3.6.35 17# gui support was added with kernel 3.6.35
18# since 3.10 libnewt was replaced by slang 18# since 3.10 libnewt was replaced by slang
19# to cover a wide range of kernel we add both dependencies 19# to cover a wide range of kernel we add both dependencies
20TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt slang', '',d)}" 20PACKAGECONFIG[tui] = ",NO_NEWT=1,libnewt slang"
21SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}" 21PACKAGECONFIG[libunwind] = ",NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1,libunwind"
22LIBUNWIND_DEPENDS = "${@perf_feature_enabled('perf-libunwind', 'libunwind', '',d)}" 22PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1"
23 23
24DEPENDS = " \ 24DEPENDS = " \
25 virtual/${MLPREFIX}libc \ 25 virtual/${MLPREFIX}libc \
26 ${MLPREFIX}elfutils \ 26 ${MLPREFIX}elfutils \
27 ${MLPREFIX}binutils \ 27 ${MLPREFIX}binutils \
28 ${TUI_DEPENDS} \
29 ${SCRIPTING_DEPENDS} \
30 ${LIBUNWIND_DEPENDS} \
31 bison flex xz \ 28 bison flex xz \
32 xmlto-native \ 29 xmlto-native \
33 asciidoc-native \ 30 asciidoc-native \
@@ -61,11 +58,6 @@ inherit kernelsrc
61B = "${WORKDIR}/${BPN}-${PV}" 58B = "${WORKDIR}/${BPN}-${PV}"
62SPDX_S = "${S}/tools/perf" 59SPDX_S = "${S}/tools/perf"
63 60
64SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
65TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}"
66LIBUNWIND_DEFINES = "${@perf_feature_enabled('perf-libunwind', '', 'NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1',d)}"
67LIBNUMA_DEFINES = "${@perf_feature_enabled('perf-libnuma', '', 'NO_LIBNUMA=1',d)}"
68
69# The LDFLAGS is required or some old kernels fails due missing 61# The LDFLAGS is required or some old kernels fails due missing
70# symbols and this is preferred than requiring patches to every old 62# symbols and this is preferred than requiring patches to every old
71# supported kernel. 63# supported kernel.
@@ -82,8 +74,8 @@ EXTRA_OEMAKE = '\
82 EXTRA_CFLAGS="-ldw" \ 74 EXTRA_CFLAGS="-ldw" \
83 EXTRA_LDFLAGS="${PERF_EXTRA_LDFLAGS}" \ 75 EXTRA_LDFLAGS="${PERF_EXTRA_LDFLAGS}" \
84 perfexecdir=${libexecdir} \ 76 perfexecdir=${libexecdir} \
85 NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \ 77 NO_GTK2=1 NO_DWARF=1 \
86 ${SCRIPTING_DEFINES} ${LIBNUMA_DEFINES} \ 78 ${PACKAGECONFIG_CONFARGS} \
87' 79'
88 80
89EXTRA_OEMAKE += "\ 81EXTRA_OEMAKE += "\
@@ -116,7 +108,7 @@ do_install() {
116 unset CFLAGS 108 unset CFLAGS
117 oe_runmake install 109 oe_runmake install
118 # we are checking for this make target to be compatible with older perf versions 110 # we are checking for this make target to be compatible with older perf versions
119 if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ] && grep -q install-python_ext ${S}/tools/perf/Makefile*; then 111 if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
120 oe_runmake DESTDIR=${D} install-python_ext 112 oe_runmake DESTDIR=${D} install-python_ext
121 fi 113 fi
122} 114}
@@ -225,7 +217,7 @@ RDEPENDS_${PN}-python =+ "bash python python-modules"
225RDEPENDS_${PN}-perl =+ "bash perl perl-modules" 217RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
226RDEPENDS_${PN}-tests =+ "python" 218RDEPENDS_${PN}-tests =+ "python"
227 219
228RSUGGESTS_SCRIPTING = "${@perf_feature_enabled('perf-scripting', '${PN}-perl ${PN}-python', '',d)}" 220RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}"
229RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" 221RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
230 222
231#FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core /usr/lib64/traceevent ${libdir}/traceevent" 223#FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core /usr/lib64/traceevent ${libdir}/traceevent"