2012-06-20 14:31:40 +00:00
|
|
|
SUMMARY = "Performance analysis tools for Linux"
|
|
|
|
DESCRIPTION = "Performance counters for Linux are a new kernel-based \
|
|
|
|
subsystem that provide a framework for all things \
|
|
|
|
performance analysis. It covers hardware level \
|
|
|
|
(CPU/PMU, Performance Monitoring Unit) features \
|
|
|
|
and software features (software counters, tracepoints) \
|
|
|
|
as well."
|
|
|
|
|
|
|
|
LICENSE = "GPLv2"
|
|
|
|
|
2014-06-09 21:21:29 +00:00
|
|
|
PR = "r9"
|
2012-06-20 14:31:40 +00:00
|
|
|
|
|
|
|
BUILDPERF_libc-uclibc = "no"
|
|
|
|
|
2017-01-16 13:11:10 +00:00
|
|
|
PACKAGECONFIG ??= "scripting tui"
|
|
|
|
PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python"
|
2014-06-16 20:02:45 +00:00
|
|
|
# gui support was added with kernel 3.6.35
|
|
|
|
# since 3.10 libnewt was replaced by slang
|
|
|
|
# to cover a wide range of kernel we add both dependencies
|
2017-01-16 13:11:10 +00:00
|
|
|
PACKAGECONFIG[tui] = ",NO_NEWT=1,libnewt slang"
|
|
|
|
PACKAGECONFIG[libunwind] = ",NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1,libunwind"
|
|
|
|
PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1"
|
2017-01-16 13:42:47 +00:00
|
|
|
PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap"
|
2017-02-09 11:49:39 +00:00
|
|
|
PACKAGECONFIG[jvmti] = ",NO_JVMTI=1"
|
2012-07-09 17:07:11 +00:00
|
|
|
|
2014-10-21 21:05:30 +00:00
|
|
|
DEPENDS = " \
|
2014-08-05 11:19:40 +00:00
|
|
|
virtual/${MLPREFIX}libc \
|
|
|
|
${MLPREFIX}elfutils \
|
|
|
|
${MLPREFIX}binutils \
|
2015-07-30 15:03:14 +00:00
|
|
|
bison flex xz \
|
2016-07-27 05:02:03 +00:00
|
|
|
xmlto-native \
|
|
|
|
asciidoc-native \
|
2014-08-05 11:19:40 +00:00
|
|
|
"
|
2012-06-25 04:31:58 +00:00
|
|
|
|
kernel: move source and build output to work-shared
commit 3b3f7e785e279 [kernel: Rearrange for 1.8] began the process of
moving the kernel source and build artefacts out of sstate control and
into a shared location.
This changed triggered some workflow issues, as well as bugs related
to the kernel source containing build output, and hence being dirty and
breaking kernel rebuilds.
To solve these issues, and to make it clear that the kernel is not under
sstate control, we move the source and build outputs to:
work-shared/MACHINE/kernel-source
work-shared/MACHINE/kernel-build-artifacts
Where kernel-build-artifacts is the kernel build output and
kernel-source is kept "pristine". The build-artifacts contain everything
that is required to build external modules against the kernel source,
and includes the defconfig, the kernel-abiversion, System.map files and
output from "make scripts".
External module builds should either pass O= on the command line, or
set KBUILD_OUTPUT to point to the build-artifacts. module-base.bbclass
takes care of setting KBUILD_OUTPUT, so most existing external module
recipes are transparently adapted to the new source/build layout.
recipes that depend on the kernel source must have a depedency on the
do_shared_workdir task:
do_configure[depends] += "virtual/kernel:do_shared_workdir"
With this dependency added, the STAGING_KERNEL_DIR will be populated and
available to the rest of the build.
(From OE-Core rev: 6a1ff0e7eacef595738f2fed086986fd622ec32a)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-15 11:54:15 +00:00
|
|
|
do_configure[depends] += "virtual/kernel:do_shared_workdir"
|
2014-10-21 21:05:30 +00:00
|
|
|
|
2012-06-20 14:31:40 +00:00
|
|
|
PROVIDES = "virtual/perf"
|
|
|
|
|
2013-03-19 04:58:07 +00:00
|
|
|
inherit linux-kernel-base kernel-arch pythonnative
|
2012-06-20 14:31:40 +00:00
|
|
|
|
2012-06-25 04:26:33 +00:00
|
|
|
# needed for building the tools/perf Python bindings
|
|
|
|
inherit python-dir
|
perf: fix the install-python_ext
1. $(grep xxx xxx) never returns 0, it maybe return empty or string, and
can not compare with 0, this fixes that python module never are installed.
2. python library is installed into /usr/lib/ by default, but we expect
it is installed into ${libdir}, so add --install-lib parameter for python
setup.py to set the library dir;
this fixes not shipped warning, since python modules are installed into
/usr/lib/, but FILE_${PN}-python expects it is under ${libdir}, which is
/usr/lib64/ for 64bit machine
3. the makefile target install-python_ext is moved from Makefile to
Makefile.perf from linux v3.13, so match install-python_ext in Makefile.*
and --root='/\$(DESTDIR_SQ)' before linux v3.13 will install the target
python library to native sysroot, so replace it with --prefix as after linux
3.13;
this fixes not shipped warning, and install target files to native dir, like
below:
ERROR: QA Issue: perf: Files/directories were installed but not shipped in any package:
/home
/home/pokybuild
/home/pokybuild/yocto-autobuilder
/home/pokybuild/yocto-autobuilder/yocto-worker
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf.so
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf-0.1-py2.7.egg-info
(From OE-Core rev: 43f965061f8af4c4537e9d9c0257253e613a616d)
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-26 05:58:17 +00:00
|
|
|
export PYTHON_SITEPACKAGES_DIR
|
2012-06-25 04:26:33 +00:00
|
|
|
|
2013-11-07 18:36:26 +00:00
|
|
|
#kernel 3.1+ supports WERROR to disable warnings as errors
|
|
|
|
export WERROR = "0"
|
|
|
|
|
2014-10-21 21:05:30 +00:00
|
|
|
do_populate_lic[depends] += "virtual/kernel:do_patch"
|
2013-04-18 14:27:08 +00:00
|
|
|
|
2012-06-25 04:31:58 +00:00
|
|
|
# needed for building the tools/perf Perl binding
|
|
|
|
inherit perlnative cpan-base
|
|
|
|
# Env var which tells perl if it should use host (no) or target (yes) settings
|
|
|
|
export PERLCONFIGTARGET = "${@is_target(d)}"
|
|
|
|
export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE"
|
|
|
|
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)}"
|
|
|
|
|
2014-10-21 21:05:30 +00:00
|
|
|
inherit kernelsrc
|
2013-09-12 09:28:17 +00:00
|
|
|
|
2012-06-20 14:31:40 +00:00
|
|
|
B = "${WORKDIR}/${BPN}-${PV}"
|
2015-06-26 08:01:26 +00:00
|
|
|
SPDX_S = "${S}/tools/perf"
|
2012-06-20 14:31:40 +00:00
|
|
|
|
2013-09-18 13:51:04 +00:00
|
|
|
# The LDFLAGS is required or some old kernels fails due missing
|
|
|
|
# symbols and this is preferred than requiring patches to every old
|
|
|
|
# supported kernel.
|
|
|
|
LDFLAGS="-ldl -lutil"
|
|
|
|
|
2014-08-05 11:19:40 +00:00
|
|
|
EXTRA_OEMAKE = '\
|
|
|
|
-C ${S}/tools/perf \
|
|
|
|
O=${B} \
|
|
|
|
CROSS_COMPILE=${TARGET_PREFIX} \
|
|
|
|
ARCH=${ARCH} \
|
|
|
|
CC="${CC}" \
|
|
|
|
AR="${AR}" \
|
2016-09-21 05:17:42 +00:00
|
|
|
LD="${LD}" \
|
2014-09-08 03:57:29 +00:00
|
|
|
EXTRA_CFLAGS="-ldw" \
|
2016-11-23 13:47:32 +00:00
|
|
|
EXTRA_LDFLAGS="${PERF_EXTRA_LDFLAGS}" \
|
2014-08-05 11:19:40 +00:00
|
|
|
perfexecdir=${libexecdir} \
|
2017-01-16 13:11:10 +00:00
|
|
|
NO_GTK2=1 NO_DWARF=1 \
|
|
|
|
${PACKAGECONFIG_CONFARGS} \
|
2014-08-05 11:19:40 +00:00
|
|
|
'
|
2012-06-20 14:31:40 +00:00
|
|
|
|
2012-12-12 11:26:11 +00:00
|
|
|
EXTRA_OEMAKE += "\
|
2016-04-19 12:56:00 +00:00
|
|
|
'DESTDIR=${D}' \
|
2014-08-05 11:19:40 +00:00
|
|
|
'prefix=${prefix}' \
|
|
|
|
'bindir=${bindir}' \
|
|
|
|
'sharedir=${datadir}' \
|
|
|
|
'sysconfdir=${sysconfdir}' \
|
|
|
|
'perfexecdir=${libexecdir}/perf-core' \
|
|
|
|
'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \
|
|
|
|
'sharedir=${@os.path.relpath(datadir, prefix)}' \
|
|
|
|
'mandir=${@os.path.relpath(mandir, prefix)}' \
|
|
|
|
'infodir=${@os.path.relpath(infodir, prefix)}' \
|
2012-12-12 11:26:11 +00:00
|
|
|
"
|
|
|
|
|
2016-11-23 13:47:32 +00:00
|
|
|
PERF_EXTRA_LDFLAGS = ""
|
|
|
|
|
|
|
|
# MIPS N32
|
|
|
|
PERF_EXTRA_LDFLAGS_mipsarchn32eb = "-m elf32btsmipn32"
|
|
|
|
PERF_EXTRA_LDFLAGS_mipsarchn32el = "-m elf32ltsmipn32"
|
|
|
|
|
2012-06-20 14:31:40 +00:00
|
|
|
do_compile() {
|
2013-09-17 04:18:20 +00:00
|
|
|
# Linux kernel build system is expected to do the right thing
|
2013-09-18 13:51:04 +00:00
|
|
|
unset CFLAGS
|
2012-06-20 14:31:40 +00:00
|
|
|
oe_runmake all
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2013-09-17 04:18:20 +00:00
|
|
|
# Linux kernel build system is expected to do the right thing
|
2013-09-18 13:51:04 +00:00
|
|
|
unset CFLAGS
|
2016-04-19 12:56:00 +00:00
|
|
|
oe_runmake install
|
2012-08-17 02:54:56 +00:00
|
|
|
# we are checking for this make target to be compatible with older perf versions
|
2017-01-16 13:11:10 +00:00
|
|
|
if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
|
2012-07-09 17:07:10 +00:00
|
|
|
oe_runmake DESTDIR=${D} install-python_ext
|
|
|
|
fi
|
2012-06-20 14:31:40 +00:00
|
|
|
}
|
|
|
|
|
2012-12-12 07:08:37 +00:00
|
|
|
do_configure_prepend () {
|
2015-01-19 06:46:29 +00:00
|
|
|
# Fix for rebuilding
|
|
|
|
rm -rf ${B}/
|
2015-09-16 10:25:00 +00:00
|
|
|
mkdir -p ${B}/
|
2015-01-19 06:46:29 +00:00
|
|
|
|
2014-03-12 20:30:40 +00:00
|
|
|
# If building a multlib based perf, the incorrect library path will be
|
|
|
|
# detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit
|
|
|
|
# build, with a 64 bit multilib, the arch won't match and the detection of a
|
|
|
|
# 64 bit build (and library) are not exected. To ensure that libraries are
|
2014-08-12 11:10:19 +00:00
|
|
|
# installed to the correct location, we can use the weak assignment in the
|
|
|
|
# config/Makefile.
|
2015-07-25 13:37:58 +00:00
|
|
|
#
|
|
|
|
# Also need to relocate .config-detected to $(OUTPUT)/config-detected
|
2015-08-11 21:12:20 +00:00
|
|
|
# for kernel sources that do not already do this
|
2015-07-25 13:37:58 +00:00
|
|
|
# as two builds (e.g. perf and lib32-perf from mutlilib can conflict
|
|
|
|
# with each other if its in the shared source directory
|
|
|
|
#
|
2014-03-12 20:30:40 +00:00
|
|
|
if [ -e "${S}/tools/perf/config/Makefile" ]; then
|
2016-08-30 16:49:00 +00:00
|
|
|
perfconfig="${S}/tools/perf/config/Makefile"
|
|
|
|
fi
|
|
|
|
if [ -e "${S}/tools/perf/Makefile.config" ]; then
|
|
|
|
perfconfig="${S}/tools/perf/Makefile.config"
|
|
|
|
fi
|
|
|
|
if [ -n "${perfconfig}" ]; then
|
2014-08-12 11:10:19 +00:00
|
|
|
# Match $(prefix)/$(lib) and $(prefix)/lib
|
2014-09-09 01:22:22 +00:00
|
|
|
sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \
|
|
|
|
-e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \
|
2015-08-11 21:12:20 +00:00
|
|
|
-e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
|
2016-08-30 16:49:00 +00:00
|
|
|
${perfconfig}
|
2014-03-12 20:30:40 +00:00
|
|
|
fi
|
2016-07-27 05:02:03 +00:00
|
|
|
# The man pages installation is "$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)"
|
|
|
|
# in ${S}/tools/perf/Documentation/Makefile, if the mandir set to '?=', it
|
|
|
|
# will use the relative path 'share/man', in the way it will resulting in
|
|
|
|
# incorrect installation for man pages.
|
|
|
|
if [ -e "${S}/tools/perf/Documentation/Makefile" ]; then
|
|
|
|
sed -i 's,^mandir?=,mandir:=,' ${S}/tools/perf/Documentation/Makefile
|
|
|
|
fi
|
2015-07-25 13:37:58 +00:00
|
|
|
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
|
2015-08-11 21:12:20 +00:00
|
|
|
sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
|
2015-07-25 13:37:58 +00:00
|
|
|
${S}/tools/perf/Makefile.perf
|
perf: fix the install-python_ext
1. $(grep xxx xxx) never returns 0, it maybe return empty or string, and
can not compare with 0, this fixes that python module never are installed.
2. python library is installed into /usr/lib/ by default, but we expect
it is installed into ${libdir}, so add --install-lib parameter for python
setup.py to set the library dir;
this fixes not shipped warning, since python modules are installed into
/usr/lib/, but FILE_${PN}-python expects it is under ${libdir}, which is
/usr/lib64/ for 64bit machine
3. the makefile target install-python_ext is moved from Makefile to
Makefile.perf from linux v3.13, so match install-python_ext in Makefile.*
and --root='/\$(DESTDIR_SQ)' before linux v3.13 will install the target
python library to native sysroot, so replace it with --prefix as after linux
3.13;
this fixes not shipped warning, and install target files to native dir, like
below:
ERROR: QA Issue: perf: Files/directories were installed but not shipped in any package:
/home
/home/pokybuild
/home/pokybuild/yocto-autobuilder
/home/pokybuild/yocto-autobuilder/yocto-worker
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf.so
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf-0.1-py2.7.egg-info
(From OE-Core rev: 43f965061f8af4c4537e9d9c0257253e613a616d)
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-26 05:58:17 +00:00
|
|
|
sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
|
|
|
|
${S}/tools/perf/Makefile.perf
|
2015-07-25 13:37:58 +00:00
|
|
|
fi
|
perf: fix the install-python_ext
1. $(grep xxx xxx) never returns 0, it maybe return empty or string, and
can not compare with 0, this fixes that python module never are installed.
2. python library is installed into /usr/lib/ by default, but we expect
it is installed into ${libdir}, so add --install-lib parameter for python
setup.py to set the library dir;
this fixes not shipped warning, since python modules are installed into
/usr/lib/, but FILE_${PN}-python expects it is under ${libdir}, which is
/usr/lib64/ for 64bit machine
3. the makefile target install-python_ext is moved from Makefile to
Makefile.perf from linux v3.13, so match install-python_ext in Makefile.*
and --root='/\$(DESTDIR_SQ)' before linux v3.13 will install the target
python library to native sysroot, so replace it with --prefix as after linux
3.13;
this fixes not shipped warning, and install target files to native dir, like
below:
ERROR: QA Issue: perf: Files/directories were installed but not shipped in any package:
/home
/home/pokybuild
/home/pokybuild/yocto-autobuilder
/home/pokybuild/yocto-autobuilder/yocto-worker
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf.so
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf-0.1-py2.7.egg-info
(From OE-Core rev: 43f965061f8af4c4537e9d9c0257253e613a616d)
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-26 05:58:17 +00:00
|
|
|
sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
|
2015-09-15 06:34:24 +00:00
|
|
|
${S}/tools/perf/Makefile*
|
perf: fix the install-python_ext
1. $(grep xxx xxx) never returns 0, it maybe return empty or string, and
can not compare with 0, this fixes that python module never are installed.
2. python library is installed into /usr/lib/ by default, but we expect
it is installed into ${libdir}, so add --install-lib parameter for python
setup.py to set the library dir;
this fixes not shipped warning, since python modules are installed into
/usr/lib/, but FILE_${PN}-python expects it is under ${libdir}, which is
/usr/lib64/ for 64bit machine
3. the makefile target install-python_ext is moved from Makefile to
Makefile.perf from linux v3.13, so match install-python_ext in Makefile.*
and --root='/\$(DESTDIR_SQ)' before linux v3.13 will install the target
python library to native sysroot, so replace it with --prefix as after linux
3.13;
this fixes not shipped warning, and install target files to native dir, like
below:
ERROR: QA Issue: perf: Files/directories were installed but not shipped in any package:
/home
/home/pokybuild
/home/pokybuild/yocto-autobuilder
/home/pokybuild/yocto-autobuilder/yocto-worker
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf.so
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf-0.1-py2.7.egg-info
(From OE-Core rev: 43f965061f8af4c4537e9d9c0257253e613a616d)
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-26 05:58:17 +00:00
|
|
|
|
2015-07-25 13:37:58 +00:00
|
|
|
if [ -e "${S}/tools/build/Makefile.build" ]; then
|
2015-08-11 21:12:20 +00:00
|
|
|
sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
|
2015-07-25 13:37:58 +00:00
|
|
|
${S}/tools/build/Makefile.build
|
|
|
|
fi
|
|
|
|
|
2014-04-10 09:05:50 +00:00
|
|
|
# We need to ensure the --sysroot option in CC is preserved
|
|
|
|
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
|
|
|
|
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf
|
|
|
|
sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf
|
2016-10-05 05:58:39 +00:00
|
|
|
sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/perf/Makefile.perf
|
2014-04-10 09:05:50 +00:00
|
|
|
fi
|
|
|
|
if [ -e "${S}/tools/lib/api/Makefile" ]; then
|
|
|
|
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile
|
|
|
|
sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile
|
2016-09-21 05:17:42 +00:00
|
|
|
sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/lib/api/Makefile
|
2016-02-22 17:32:34 +00:00
|
|
|
fi
|
|
|
|
if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then
|
|
|
|
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/subcmd/Makefile
|
|
|
|
sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/subcmd/Makefile
|
2014-04-10 09:05:50 +00:00
|
|
|
fi
|
|
|
|
if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then
|
|
|
|
sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile
|
|
|
|
fi
|
2015-05-01 01:34:19 +00:00
|
|
|
if [ -e "${S}/tools/build/Makefile.feature" ]; then
|
|
|
|
sed -i 's,CFLAGS=,CC="\$(CC)" CFLAGS=,' ${S}/tools/build/Makefile.feature
|
|
|
|
fi
|
2014-10-01 04:43:36 +00:00
|
|
|
|
|
|
|
# 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include
|
|
|
|
if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then
|
|
|
|
sed -i 's,#include "util/callchain.h",#include "util/callchain.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c
|
|
|
|
fi
|
|
|
|
if [ -e "${S}/tools/perf/arch/arm/util/unwind-libunwind.c" ] && [ -e "${S}/tools/perf/arch/arm/tests/dwarf-unwind.c" ]; then
|
|
|
|
sed -i 's,#include "tests/tests.h",#include "tests/tests.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/tests/dwarf-unwind.c
|
|
|
|
sed -i 's,#include "perf_regs.h",#include "perf_regs.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/util/unwind-libunwind.c
|
2014-09-08 03:57:29 +00:00
|
|
|
fi
|
2016-03-23 15:09:03 +00:00
|
|
|
|
|
|
|
# use /usr/bin/env instead of version specific python
|
|
|
|
for s in `find ${S}/tools/perf/scripts/python/ -name '*.py'`; do
|
|
|
|
sed -i 's,/usr/bin/python2,/usr/bin/env python,' "${s}"
|
|
|
|
done
|
2012-12-12 07:08:37 +00:00
|
|
|
}
|
|
|
|
|
2013-03-19 04:58:07 +00:00
|
|
|
python do_package_prepend() {
|
2016-12-14 21:13:04 +00:00
|
|
|
d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
|
2013-03-19 04:58:07 +00:00
|
|
|
}
|
|
|
|
|
2012-06-20 14:31:40 +00:00
|
|
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
|
|
|
|
2014-06-09 21:21:29 +00:00
|
|
|
|
|
|
|
PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python"
|
|
|
|
|
2015-03-11 13:14:54 +00:00
|
|
|
RDEPENDS_${PN} += "elfutils bash"
|
2016-07-27 05:02:03 +00:00
|
|
|
RDEPENDS_${PN}-doc += "man"
|
2014-06-09 21:21:29 +00:00
|
|
|
RDEPENDS_${PN}-archive =+ "bash"
|
2016-03-23 15:09:04 +00:00
|
|
|
RDEPENDS_${PN}-python =+ "bash python python-modules"
|
2014-06-09 21:21:29 +00:00
|
|
|
RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
|
2014-09-09 01:22:22 +00:00
|
|
|
RDEPENDS_${PN}-tests =+ "python"
|
2014-06-09 21:21:29 +00:00
|
|
|
|
2017-01-16 13:11:10 +00:00
|
|
|
RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}"
|
2014-06-09 21:21:29 +00:00
|
|
|
RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
|
|
|
|
|
2016-08-30 16:49:00 +00:00
|
|
|
#FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core /usr/lib64/traceevent ${libdir}/traceevent"
|
2014-03-12 20:30:40 +00:00
|
|
|
FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent"
|
2014-06-09 21:21:29 +00:00
|
|
|
FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
|
2016-03-23 15:09:03 +00:00
|
|
|
FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests"
|
2016-08-09 08:01:41 +00:00
|
|
|
FILES_${PN}-python = "${libdir}/perf/perf-core/scripts/python ${PYTHON_SITEPACKAGES_DIR}"
|
2016-03-23 15:09:03 +00:00
|
|
|
FILES_${PN}-python += "${libexecdir}/perf-core/scripts/python/*"
|
2014-06-09 21:21:29 +00:00
|
|
|
FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl"
|
|
|
|
|
2014-03-12 20:30:40 +00:00
|
|
|
|
|
|
|
INHIBIT_PACKAGE_DEBUG_SPLIT="1"
|