summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/perf/perf.bb
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2013-03-07 18:39:01 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-10 04:36:51 +0000
commitbdd6d457a1caee7fc2d31789ffd7339cd4afcfed (patch)
tree4af80ad753ce632d964dea6d5ddeea25f3ccd303 /meta/recipes-kernel/perf/perf.bb
parentb3be3323a03eadace05a609262bf041d915ebafd (diff)
downloadpoky-bdd6d457a1caee7fc2d31789ffd7339cd4afcfed.tar.gz
perf: rename perf_3.4 to perf
There's nothing kernel-version-specific about the perf_3.4 recipe, so it's actually misnamed and misleading now that it also gets used with the 3.8 kernel. Since the recipe isn't tied to a specific PV, and simply uses whatever's in STAGING_KERNEL_DIR, there's no reason to add anything else either to the bare PN, so just use that as the recipe name. (From OE-Core rev: 9a249e074f0329ad54848b84536e5b7cb117ee2c) Signed-off-by: Tom Zanussi <tom.zanussi@linux.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.bb111
1 files changed, 111 insertions, 0 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
new file mode 100644
index 0000000000..3c499224c7
--- /dev/null
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -0,0 +1,111 @@
1SUMMARY = "Performance analysis tools for Linux"
2DESCRIPTION = "Performance counters for Linux are a new kernel-based \
3subsystem that provide a framework for all things \
4performance analysis. It covers hardware level \
5(CPU/PMU, Performance Monitoring Unit) features \
6and software features (software counters, tracepoints) \
7as well."
8
9LICENSE = "GPLv2"
10LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
11
12PR = "r8"
13
14require perf-features.inc
15
16BUILDPERF_libc-uclibc = "no"
17
18TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt', '',d)}"
19SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}"
20
21DEPENDS = "virtual/kernel \
22 virtual/${MLPREFIX}libc \
23 ${MLPREFIX}elfutils \
24 ${MLPREFIX}binutils \
25 ${TUI_DEPENDS} \
26 ${SCRIPTING_DEPENDS} \
27 bison flex \
28 "
29
30SCRIPTING_RDEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl perl-modules python', '',d)}"
31RDEPENDS_${PN} += "elfutils bash ${SCRIPTING_RDEPENDS}"
32
33PROVIDES = "virtual/perf"
34
35inherit kernel-arch pythonnative
36
37# needed for building the tools/perf Python bindings
38inherit python-dir
39export STAGING_INCDIR
40export STAGING_LIBDIR
41export BUILD_SYS
42export HOST_SYS
43
44# needed for building the tools/perf Perl binding
45inherit perlnative cpan-base
46# Env var which tells perl if it should use host (no) or target (yes) settings
47export PERLCONFIGTARGET = "${@is_target(d)}"
48export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE"
49export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
50export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
51
52S = "${STAGING_KERNEL_DIR}"
53B = "${WORKDIR}/${BPN}-${PV}"
54
55SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
56TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}"
57
58export LDFLAGS = "-ldl -lutil"
59EXTRA_OEMAKE = \
60 '-C ${S}/tools/perf \
61 O=${B} \
62 CROSS_COMPILE=${TARGET_PREFIX} \
63 ARCH=${ARCH} \
64 CC="${CC}" \
65 AR="${AR}" \
66 perfexecdir=${libexecdir} \
67 NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
68 '
69
70# We already pass the correct arguments to our compiler for the CFLAGS (if we
71# don't override it, it'll add -m32/-m64 itself). For LDFLAGS, it was failing
72# to find bfd symbols.
73EXTRA_OEMAKE += "\
74 'CFLAGS=${CFLAGS}' \
75 'LDFLAGS=${LDFLAGS} -lpthread -lrt -lelf -lm -lbfd' \
76 \
77 'prefix=${prefix}' \
78 'bindir=${bindir}' \
79 'sharedir=${datadir}' \
80 'sysconfdir=${sysconfdir}' \
81 'perfexecdir=${libexecdir}/perf-core' \
82 \
83 'ETC_PERFCONFIG=${@oe.path.relative(prefix, sysconfdir)}' \
84 'sharedir=${@oe.path.relative(prefix, datadir)}' \
85 'mandir=${@oe.path.relative(prefix, mandir)}' \
86 'infodir=${@oe.path.relative(prefix, infodir)}' \
87"
88
89PARALLEL_MAKE = ""
90
91do_compile() {
92 oe_runmake all
93}
94
95do_install() {
96 oe_runmake DESTDIR=${D} install
97 # we are checking for this make target to be compatible with older perf versions
98 if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0"]; then
99 oe_runmake DESTDIR=${D} install-python_ext
100 fi
101}
102
103do_configure_prepend () {
104 sed -i 's,-Werror ,,' ${S}/tools/perf/Makefile
105}
106
107PACKAGE_ARCH = "${MACHINE_ARCH}"
108
109FILES_${PN} += "${libexecdir}/perf-core"
110FILES_${PN}-dbg += "${libdir}/python*/site-packages/.debug"
111FILES_${PN} += "${libdir}/python*/site-packages"