blob: 99808d636b3c49af31da8e1e073c20045d1a85fe [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "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."
Joel Stanleye252c312017-12-14 15:11:12 +10308HOMEPAGE = "https://perf.wiki.kernel.org/index.php/Main_Page"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009
10LICENSE = "GPLv2"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011
12PR = "r9"
13
Joel Stanleye252c312017-12-14 15:11:12 +103014PACKAGECONFIG ??= "scripting tui libunwind"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015PACKAGECONFIG[dwarf] = ",NO_DWARF=1"
Brad Bishop79641f22019-09-10 07:20:22 -040016PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017# gui support was added with kernel 3.6.35
18# since 3.10 libnewt was replaced by slang
19# to cover a wide range of kernel we add both dependencies
Joel Stanleye252c312017-12-14 15:11:12 +103020PACKAGECONFIG[tui] = ",NO_NEWT=1,libnewt slang"
21PACKAGECONFIG[libunwind] = ",NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1,libunwind"
22PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1"
23PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap"
24PACKAGECONFIG[jvmti] = ",NO_JVMTI=1"
Brad Bishop316dfdd2018-06-25 12:45:53 -040025# libaudit support would need scripting to be enabled
26PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080027PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native"
Brad Bishop64c979e2019-11-04 13:55:29 -050028PACKAGECONFIG[cap] = ",,libcap"
Andrew Geisslerb7d28612020-07-24 16:15:54 -050029# Arm CoreSight
30PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031
32# libunwind is not yet ported for some architectures
33PACKAGECONFIG_remove_arc = "libunwind"
34PACKAGECONFIG_remove_riscv64 = "libunwind"
Andrew Geissler95ac1b82021-03-31 14:34:31 -050035PACKAGECONFIG_remove_riscv32 = "libunwind"
Brad Bishop316dfdd2018-06-25 12:45:53 -040036
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037DEPENDS = " \
38 virtual/${MLPREFIX}libc \
39 ${MLPREFIX}elfutils \
40 ${MLPREFIX}binutils \
Brad Bishop316dfdd2018-06-25 12:45:53 -040041 bison-native flex-native xz \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050042"
43
44do_configure[depends] += "virtual/kernel:do_shared_workdir"
45
46PROVIDES = "virtual/perf"
47
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080048inherit linux-kernel-base kernel-arch manpages
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049
50# needed for building the tools/perf Python bindings
Andrew Geissler09036742021-06-25 14:25:14 -050051inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'python3targetconfig', '', d)}
Brad Bishop79641f22019-09-10 07:20:22 -040052inherit python3-dir
Patrick Williamsc124f4f2015-09-15 14:41:29 -050053export PYTHON_SITEPACKAGES_DIR
54
55#kernel 3.1+ supports WERROR to disable warnings as errors
56export WERROR = "0"
57
Andrew Geissler82c905d2020-04-13 13:39:40 -050058do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050059
60# needed for building the tools/perf Perl binding
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080061include ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perf-perl.inc', '', d)}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050062
63inherit kernelsrc
64
Brad Bishop316dfdd2018-06-25 12:45:53 -040065S = "${WORKDIR}/${BP}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050066SPDX_S = "${S}/tools/perf"
67
Patrick Williamsc124f4f2015-09-15 14:41:29 -050068# The LDFLAGS is required or some old kernels fails due missing
69# symbols and this is preferred than requiring patches to every old
70# supported kernel.
71LDFLAGS="-ldl -lutil"
72
73EXTRA_OEMAKE = '\
Andrew Geissler635e0e42020-08-21 15:58:33 -050074 V=1 \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050075 -C ${S}/tools/perf \
76 O=${B} \
77 CROSS_COMPILE=${TARGET_PREFIX} \
78 ARCH=${ARCH} \
79 CC="${CC}" \
Andrew Geissler82c905d2020-04-13 13:39:40 -050080 CCLD="${CC}" \
81 LDSHARED="${CC} -shared" \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050082 AR="${AR}" \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060083 LD="${LD}" \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050084 EXTRA_CFLAGS="-ldw" \
Andrew Geissler95ac1b82021-03-31 14:34:31 -050085 YFLAGS='-y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' \
Joel Stanleye252c312017-12-14 15:11:12 +103086 EXTRA_LDFLAGS="${PERF_EXTRA_LDFLAGS}" \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050087 perfexecdir=${libexecdir} \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080088 NO_GTK2=1 \
Joel Stanleye252c312017-12-14 15:11:12 +103089 ${PACKAGECONFIG_CONFARGS} \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080090 TMPDIR="${B}" \
Brad Bishop19323692019-04-05 15:28:33 -040091 LIBUNWIND_DIR=${STAGING_EXECPREFIXDIR} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050092'
93
94EXTRA_OEMAKE += "\
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050095 'DESTDIR=${D}' \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050096 'prefix=${prefix}' \
97 'bindir=${bindir}' \
98 'sharedir=${datadir}' \
99 'sysconfdir=${sysconfdir}' \
100 'perfexecdir=${libexecdir}/perf-core' \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500101 'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \
102 'sharedir=${@os.path.relpath(datadir, prefix)}' \
103 'mandir=${@os.path.relpath(mandir, prefix)}' \
104 'infodir=${@os.path.relpath(infodir, prefix)}' \
Brad Bishop79641f22019-09-10 07:20:22 -0400105 ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500106"
107
Brad Bishopd5ae7d92018-06-14 09:52:03 -0700108# During do_configure, we might run a 'make clean'. That often breaks
109# when done in parallel, so disable parallelism for do_configure. Note
110# that it has to be done this way rather than by passing -j1, since
111# perf's build system by default ignores any -j argument, but does
112# honour a JOBS variable.
113EXTRA_OEMAKE_append_task-configure = " JOBS=1"
114
Brad Bishop316dfdd2018-06-25 12:45:53 -0400115PERF_SRC ?= "Makefile \
Brad Bishop316dfdd2018-06-25 12:45:53 -0400116 tools/arch \
117 tools/build \
118 tools/include \
119 tools/lib \
120 tools/Makefile \
121 tools/perf \
122 tools/scripts \
Brad Bishop64c979e2019-11-04 13:55:29 -0500123 scripts/ \
124 arch/${ARCH}/Makefile \
Brad Bishop316dfdd2018-06-25 12:45:53 -0400125"
126
Joel Stanleye252c312017-12-14 15:11:12 +1030127PERF_EXTRA_LDFLAGS = ""
128
129# MIPS N32
130PERF_EXTRA_LDFLAGS_mipsarchn32eb = "-m elf32btsmipn32"
131PERF_EXTRA_LDFLAGS_mipsarchn32el = "-m elf32ltsmipn32"
132
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500133do_compile() {
134 # Linux kernel build system is expected to do the right thing
135 unset CFLAGS
136 oe_runmake all
137}
138
139do_install() {
140 # Linux kernel build system is expected to do the right thing
141 unset CFLAGS
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500142 oe_runmake install
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500143 # we are checking for this make target to be compatible with older perf versions
Joel Stanleye252c312017-12-14 15:11:12 +1030144 if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
Brad Bishop79641f22019-09-10 07:20:22 -0400145 oe_runmake DESTDIR=${D} install-python_ext
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500146 fi
147}
148
Brad Bishop316dfdd2018-06-25 12:45:53 -0400149do_configure[prefuncs] += "copy_perf_source_from_kernel"
150python copy_perf_source_from_kernel() {
151 sources = (d.getVar("PERF_SRC") or "").split()
152 src_dir = d.getVar("STAGING_KERNEL_DIR")
153 dest_dir = d.getVar("S")
154 bb.utils.mkdirhier(dest_dir)
Andrew Geissler82c905d2020-04-13 13:39:40 -0500155 bb.utils.prunedir(dest_dir)
Brad Bishop316dfdd2018-06-25 12:45:53 -0400156 for s in sources:
157 src = oe.path.join(src_dir, s)
158 dest = oe.path.join(dest_dir, s)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800159 if not os.path.exists(src):
160 bb.fatal("Path does not exist: %s. Maybe PERF_SRC does not match the kernel version." % src)
Brad Bishop316dfdd2018-06-25 12:45:53 -0400161 if os.path.isdir(src):
162 oe.path.copyhardlinktree(src, dest)
163 else:
Brad Bishop64c979e2019-11-04 13:55:29 -0500164 src_path = os.path.dirname(s)
165 os.makedirs(os.path.join(dest_dir,src_path),exist_ok=True)
Brad Bishop316dfdd2018-06-25 12:45:53 -0400166 bb.utils.copyfile(src, dest)
167}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500168
Brad Bishop316dfdd2018-06-25 12:45:53 -0400169do_configure_prepend () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500170 # If building a multlib based perf, the incorrect library path will be
171 # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700172 # build, with a 64 bit multilib, the arch won't match and the detection of a
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500173 # 64 bit build (and library) are not exected. To ensure that libraries are
174 # installed to the correct location, we can use the weak assignment in the
175 # config/Makefile.
176 #
177 # Also need to relocate .config-detected to $(OUTPUT)/config-detected
178 # for kernel sources that do not already do this
179 # as two builds (e.g. perf and lib32-perf from mutlilib can conflict
180 # with each other if its in the shared source directory
181 #
182 if [ -e "${S}/tools/perf/config/Makefile" ]; then
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600183 perfconfig="${S}/tools/perf/config/Makefile"
184 fi
185 if [ -e "${S}/tools/perf/Makefile.config" ]; then
186 perfconfig="${S}/tools/perf/Makefile.config"
187 fi
188 if [ -n "${perfconfig}" ]; then
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500189 # Match $(prefix)/$(lib) and $(prefix)/lib
190 sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \
191 -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \
192 -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600193 ${perfconfig}
194 fi
195 # The man pages installation is "$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)"
196 # in ${S}/tools/perf/Documentation/Makefile, if the mandir set to '?=', it
197 # will use the relative path 'share/man', in the way it will resulting in
198 # incorrect installation for man pages.
199 if [ -e "${S}/tools/perf/Documentation/Makefile" ]; then
200 sed -i 's,^mandir?=,mandir:=,' ${S}/tools/perf/Documentation/Makefile
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500201 fi
202 if [ -e "${S}/tools/perf/Makefile.perf" ]; then
203 sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
204 ${S}/tools/perf/Makefile.perf
205 sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
206 ${S}/tools/perf/Makefile.perf
Andrew Geissler635e0e42020-08-21 15:58:33 -0500207 # backport https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8
208 sed -i -e 's,\($(Q)$(SHELL) .$(arch_errno_tbl).\) $(CC) $(arch_errno_hdr_dir),\1 $(firstword $(CC)) $(arch_errno_hdr_dir),g' \
209 ${S}/tools/perf/Makefile.perf
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500210 fi
211 sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
Patrick Williamsd7e96312015-09-22 08:09:05 -0500212 ${S}/tools/perf/Makefile*
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500213
214 if [ -e "${S}/tools/build/Makefile.build" ]; then
215 sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
216 ${S}/tools/build/Makefile.build
217 fi
218
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500219 # start reproducibility substitutions
220 if [ -e "${S}/tools/perf/Makefile.config" ]; then
221 # The following line in the Makefle:
222 # override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON_AUTO))
223 # "PYTHON" / "PYTHON_AUTO" have the full path as part of the variable. We've
224 # ensure that the environment is setup and we do not need the full path to be
225 # captured, since the symbol gets built into the executable, making it not
226 # reproducible.
227 sed -i -e 's,$(call get-executable-or-default\,PYTHON\,$(PYTHON_AUTO)),$(notdir $(call get-executable-or-default\,PYTHON\,$(PYTHON_AUTO))),g' \
228 ${S}/tools/perf/Makefile.config
229
230 # The following line:
231 # srcdir_SQ = $(patsubst %tools/perf,tools/perf,$(subst ','\'',$(srcdir))),
232 # Captures the full src path of perf, which of course makes it not
233 # reproducible. We really only need the relative location 'tools/perf', so we
234 # change the Makefile line to remove everything before 'tools/perf'
235 sed -i -e "s%srcdir_SQ = \$(subst ','\\\'',\$(srcdir))%srcdir_SQ = \$(patsubst \%tools/perf,tools/perf,\$(subst ','\\\'',\$(srcdir)))%g" \
236 ${S}/tools/perf/Makefile.config
237 fi
238 if [ -e "${S}/tools/perf/tests/Build" ]; then
239 # OUTPUT is the full path, we have python on the path so we remove it from the
240 # definition. This is captured in the perf binary, so breaks reproducibility
241 sed -i -e 's,PYTHONPATH="BUILD_STR($(OUTPUT)python)",PYTHONPATH="BUILD_STR(python)",g' \
242 ${S}/tools/perf/tests/Build
243 fi
244 if [ -e "${S}/tools/perf/util/Build" ]; then
245 # To avoid bison generating #ifdefs that have captured paths, we make sure
246 # all the calls have YFLAGS, which contains prefix mapping information.
247 sed -i -e 's,$(BISON),$(BISON) $(YFLAGS),g' ${S}/tools/perf/util/Build
248 fi
249 if [ -e "${S}/scripts/Makefile.host" ]; then
250 # To avoid yacc (bison) generating #ifdefs that have captured paths, we make sure
251 # all the calls have YFLAGS, which contains prefix mapping information.
252 sed -i -e 's,$(YACC),$(YACC) $(YFLAGS),g' ${S}/scripts/Makefile.host
253 fi
254 if [ -e "${S}/tools/perf/pmu-events/Build" ]; then
255 target='$(OUTPUT)pmu-events/pmu-events.c $(V)'
256 replacement1='$(OUTPUT)pmu-events/pmu-events.c $(V)\n'
257 replacement2='\t$(srctree)/sort-pmuevents.py $(OUTPUT)pmu-events/pmu-events.c $(OUTPUT)pmu-events/pmu-events.c.new\n'
258 replacement3='\tcp $(OUTPUT)pmu-events/pmu-events.c.new $(OUTPUT)pmu-events/pmu-events.c'
259 sed -i -e "s,$target,$replacement1$replacement2$replacement3,g" \
260 "${S}/tools/perf/pmu-events/Build"
261 fi
262 # end reproducibility substitutions
263
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500264 # We need to ensure the --sysroot option in CC is preserved
265 if [ -e "${S}/tools/perf/Makefile.perf" ]; then
266 sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf
267 sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600268 sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/perf/Makefile.perf
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500269 fi
270 if [ -e "${S}/tools/lib/api/Makefile" ]; then
271 sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile
272 sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600273 sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/lib/api/Makefile
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500274 fi
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500275 if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then
276 sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/subcmd/Makefile
277 sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/subcmd/Makefile
278 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500279 if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then
280 sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile
281 fi
282 if [ -e "${S}/tools/build/Makefile.feature" ]; then
283 sed -i 's,CFLAGS=,CC="\$(CC)" CFLAGS=,' ${S}/tools/build/Makefile.feature
284 fi
285
286 # 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include
287 if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then
288 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
289 fi
290 if [ -e "${S}/tools/perf/arch/arm/util/unwind-libunwind.c" ] && [ -e "${S}/tools/perf/arch/arm/tests/dwarf-unwind.c" ]; then
291 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
292 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
293 fi
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500294
295 # use /usr/bin/env instead of version specific python
Andrew Geissler82c905d2020-04-13 13:39:40 -0500296 for s in `find ${S}/tools/perf/ -name '*.py'` `find ${S}/scripts/ -name 'bpf_helpers_doc.py'`; do
297 sed -i -e "s,#!.*python.*,#!${USRBINPATH}/env python3," ${s}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500298 done
Brad Bishop19323692019-04-05 15:28:33 -0400299
300 # unistd.h can be out of sync between libc-headers and the captured version in the perf source
301 # so we copy it from the sysroot unistd.h to the perf unistd.h
Brad Bishopc342db32019-05-15 21:57:59 -0400302 install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
Brad Bishop79641f22019-09-10 07:20:22 -0400303 install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/include/uapi/asm-generic/unistd.h
Andrew Geissler95ac1b82021-03-31 14:34:31 -0500304
305 # the fetcher is inhibited by the 'inherit kernelsrc', so we do a quick check and
306 # copy for a helper script we need
307 for p in $(echo ${FILESPATH} | tr ':' '\n'); do
308 if [ -e $p/sort-pmuevents.py ]; then
309 cp $p/sort-pmuevents.py ${S}
310 fi
311 done
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500312}
313
314python do_package_prepend() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500315 d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500316}
317
318PACKAGE_ARCH = "${MACHINE_ARCH}"
319
320
321PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python"
322
323RDEPENDS_${PN} += "elfutils bash"
324RDEPENDS_${PN}-archive =+ "bash"
Andrew Geisslerc926e172021-05-07 16:11:35 -0500325RDEPENDS_${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500326RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500327RDEPENDS_${PN}-tests =+ "python3 bash"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500328
Joel Stanleye252c312017-12-14 15:11:12 +1030329RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500330RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
331
Brad Bishop19323692019-04-05 15:28:33 -0400332FILES_SOLIBSDEV = ""
333FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent ${libdir}/libperf-jvmti.so"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500334FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500335FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests"
Brad Bishop316dfdd2018-06-25 12:45:53 -0400336FILES_${PN}-python = " \
337 ${PYTHON_SITEPACKAGES_DIR} \
338 ${libexecdir}/perf-core/scripts/python \
339 "
340FILES_${PN}-perl = "${libexecdir}/perf-core/scripts/perl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500341
342
343INHIBIT_PACKAGE_DEBUG_SPLIT="1"
Brad Bishopc342db32019-05-15 21:57:59 -0400344DEBUG_OPTIMIZATION_append = " -Wno-error=maybe-uninitialized"