diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2013-03-07 18:39:01 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-10 04:36:51 +0000 |
commit | bdd6d457a1caee7fc2d31789ffd7339cd4afcfed (patch) | |
tree | 4af80ad753ce632d964dea6d5ddeea25f3ccd303 /meta/recipes-kernel/perf/perf.bb | |
parent | b3be3323a03eadace05a609262bf041d915ebafd (diff) | |
download | poky-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.bb | 111 |
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 @@ | |||
1 | SUMMARY = "Performance analysis tools for Linux" | ||
2 | DESCRIPTION = "Performance counters for Linux are a new kernel-based \ | ||
3 | subsystem that provide a framework for all things \ | ||
4 | performance analysis. It covers hardware level \ | ||
5 | (CPU/PMU, Performance Monitoring Unit) features \ | ||
6 | and software features (software counters, tracepoints) \ | ||
7 | as well." | ||
8 | |||
9 | LICENSE = "GPLv2" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | ||
11 | |||
12 | PR = "r8" | ||
13 | |||
14 | require perf-features.inc | ||
15 | |||
16 | BUILDPERF_libc-uclibc = "no" | ||
17 | |||
18 | TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt', '',d)}" | ||
19 | SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}" | ||
20 | |||
21 | DEPENDS = "virtual/kernel \ | ||
22 | virtual/${MLPREFIX}libc \ | ||
23 | ${MLPREFIX}elfutils \ | ||
24 | ${MLPREFIX}binutils \ | ||
25 | ${TUI_DEPENDS} \ | ||
26 | ${SCRIPTING_DEPENDS} \ | ||
27 | bison flex \ | ||
28 | " | ||
29 | |||
30 | SCRIPTING_RDEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl perl-modules python', '',d)}" | ||
31 | RDEPENDS_${PN} += "elfutils bash ${SCRIPTING_RDEPENDS}" | ||
32 | |||
33 | PROVIDES = "virtual/perf" | ||
34 | |||
35 | inherit kernel-arch pythonnative | ||
36 | |||
37 | # needed for building the tools/perf Python bindings | ||
38 | inherit python-dir | ||
39 | export STAGING_INCDIR | ||
40 | export STAGING_LIBDIR | ||
41 | export BUILD_SYS | ||
42 | export HOST_SYS | ||
43 | |||
44 | # needed for building the tools/perf Perl binding | ||
45 | inherit perlnative cpan-base | ||
46 | # Env var which tells perl if it should use host (no) or target (yes) settings | ||
47 | export PERLCONFIGTARGET = "${@is_target(d)}" | ||
48 | export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE" | ||
49 | export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" | ||
50 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" | ||
51 | |||
52 | S = "${STAGING_KERNEL_DIR}" | ||
53 | B = "${WORKDIR}/${BPN}-${PV}" | ||
54 | |||
55 | SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}" | ||
56 | TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}" | ||
57 | |||
58 | export LDFLAGS = "-ldl -lutil" | ||
59 | EXTRA_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. | ||
73 | EXTRA_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 | |||
89 | PARALLEL_MAKE = "" | ||
90 | |||
91 | do_compile() { | ||
92 | oe_runmake all | ||
93 | } | ||
94 | |||
95 | do_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 | |||
103 | do_configure_prepend () { | ||
104 | sed -i 's,-Werror ,,' ${S}/tools/perf/Makefile | ||
105 | } | ||
106 | |||
107 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
108 | |||
109 | FILES_${PN} += "${libexecdir}/perf-core" | ||
110 | FILES_${PN}-dbg += "${libdir}/python*/site-packages/.debug" | ||
111 | FILES_${PN} += "${libdir}/python*/site-packages" | ||