mirror of
https://git.yoctoproject.org/poky
synced 2026-09-15 15:49:32 +02:00
perf: add perf-scripting feature
Add a new feature named 'perf-scripting'. Adding this into the PERF_FEATURES variable in perf.inc will enable perf scripting on a target, which will turn on all the language bindings currently available in perf (Perl and Python), if perf is included in an image. If 'perf-scripting' isn't named as a feature (the default), all perf language bindings will be disabled and unavailable. (From OE-Core rev: fc0661041436013b9099dbd659994a2b8b292c19) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a8c3bc8f11
commit
2dac207e39
@@ -9,7 +9,7 @@ as well."
|
|||||||
LICENSE = "GPLv2"
|
LICENSE = "GPLv2"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
||||||
|
|
||||||
PR = "r1"
|
PR = "r2"
|
||||||
|
|
||||||
require perf.inc
|
require perf.inc
|
||||||
|
|
||||||
@@ -21,7 +21,8 @@ DEPENDS = "virtual/kernel \
|
|||||||
${MLPREFIX}binutils \
|
${MLPREFIX}binutils \
|
||||||
"
|
"
|
||||||
|
|
||||||
RDEPENDS_${PN} += "elfutils perl perl-modules python"
|
SCRIPTING_RDEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl perl-modules python', '',d)}"
|
||||||
|
RDEPENDS_${PN} += "elfutils ${SCRIPTING_RDEPENDS}"
|
||||||
|
|
||||||
PROVIDES = "virtual/perf"
|
PROVIDES = "virtual/perf"
|
||||||
|
|
||||||
@@ -45,6 +46,8 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version
|
|||||||
S = "${STAGING_KERNEL_DIR}"
|
S = "${STAGING_KERNEL_DIR}"
|
||||||
B = "${WORKDIR}/${BPN}-${PV}"
|
B = "${WORKDIR}/${BPN}-${PV}"
|
||||||
|
|
||||||
|
SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
|
||||||
|
|
||||||
EXTRA_OEMAKE = \
|
EXTRA_OEMAKE = \
|
||||||
'-C ${S}/tools/perf \
|
'-C ${S}/tools/perf \
|
||||||
O=${B} \
|
O=${B} \
|
||||||
@@ -53,7 +56,7 @@ EXTRA_OEMAKE = \
|
|||||||
CC="${CC}" \
|
CC="${CC}" \
|
||||||
AR="${AR}" \
|
AR="${AR}" \
|
||||||
prefix=/usr \
|
prefix=/usr \
|
||||||
NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 \
|
NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 ${SCRIPTING_DEFINES} \
|
||||||
'
|
'
|
||||||
|
|
||||||
do_compile() {
|
do_compile() {
|
||||||
@@ -62,6 +65,9 @@ do_compile() {
|
|||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
oe_runmake DESTDIR=${D} install
|
oe_runmake DESTDIR=${D} install
|
||||||
|
if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ]; then
|
||||||
|
oe_runmake DESTDIR=${D} install-python_ext
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||||
|
|||||||
Reference in New Issue
Block a user