Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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." |
Joel Stanley | e252c31 | 2017-12-14 15:11:12 +1030 | [diff] [blame] | 8 | HOMEPAGE = "https://perf.wiki.kernel.org/index.php/Main_Page" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | |
| 10 | LICENSE = "GPLv2" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 11 | |
| 12 | PR = "r9" |
| 13 | |
Joel Stanley | e252c31 | 2017-12-14 15:11:12 +1030 | [diff] [blame] | 14 | PACKAGECONFIG ??= "scripting tui libunwind" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | PACKAGECONFIG[dwarf] = ",NO_DWARF=1" |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 16 | PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | # 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 Stanley | e252c31 | 2017-12-14 15:11:12 +1030 | [diff] [blame] | 20 | PACKAGECONFIG[tui] = ",NO_NEWT=1,libnewt slang" |
| 21 | PACKAGECONFIG[libunwind] = ",NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1,libunwind" |
| 22 | PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1" |
| 23 | PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap" |
| 24 | PACKAGECONFIG[jvmti] = ",NO_JVMTI=1" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 25 | # libaudit support would need scripting to be enabled |
| 26 | PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native" |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 28 | PACKAGECONFIG[cap] = ",,libcap" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | |
| 30 | # libunwind is not yet ported for some architectures |
| 31 | PACKAGECONFIG_remove_arc = "libunwind" |
| 32 | PACKAGECONFIG_remove_riscv64 = "libunwind" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 33 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 34 | DEPENDS = " \ |
| 35 | virtual/${MLPREFIX}libc \ |
| 36 | ${MLPREFIX}elfutils \ |
| 37 | ${MLPREFIX}binutils \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 38 | bison-native flex-native xz \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 39 | " |
| 40 | |
| 41 | do_configure[depends] += "virtual/kernel:do_shared_workdir" |
| 42 | |
| 43 | PROVIDES = "virtual/perf" |
| 44 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 45 | inherit linux-kernel-base kernel-arch manpages |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 46 | |
| 47 | # needed for building the tools/perf Python bindings |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 48 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'python3native', '', d)} |
| 49 | inherit python3-dir |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | export PYTHON_SITEPACKAGES_DIR |
| 51 | |
| 52 | #kernel 3.1+ supports WERROR to disable warnings as errors |
| 53 | export WERROR = "0" |
| 54 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 55 | do_populate_lic[depends] += "virtual/kernel:do_shared_workdir" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 56 | |
| 57 | # needed for building the tools/perf Perl binding |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 58 | include ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perf-perl.inc', '', d)} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 59 | |
| 60 | inherit kernelsrc |
| 61 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 62 | S = "${WORKDIR}/${BP}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 63 | SPDX_S = "${S}/tools/perf" |
| 64 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 65 | # The LDFLAGS is required or some old kernels fails due missing |
| 66 | # symbols and this is preferred than requiring patches to every old |
| 67 | # supported kernel. |
| 68 | LDFLAGS="-ldl -lutil" |
| 69 | |
| 70 | EXTRA_OEMAKE = '\ |
| 71 | -C ${S}/tools/perf \ |
| 72 | O=${B} \ |
| 73 | CROSS_COMPILE=${TARGET_PREFIX} \ |
| 74 | ARCH=${ARCH} \ |
| 75 | CC="${CC}" \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 76 | CCLD="${CC}" \ |
| 77 | LDSHARED="${CC} -shared" \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 78 | AR="${AR}" \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 79 | LD="${LD}" \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 80 | EXTRA_CFLAGS="-ldw" \ |
Joel Stanley | e252c31 | 2017-12-14 15:11:12 +1030 | [diff] [blame] | 81 | EXTRA_LDFLAGS="${PERF_EXTRA_LDFLAGS}" \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 82 | perfexecdir=${libexecdir} \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 83 | NO_GTK2=1 \ |
Joel Stanley | e252c31 | 2017-12-14 15:11:12 +1030 | [diff] [blame] | 84 | ${PACKAGECONFIG_CONFARGS} \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 85 | TMPDIR="${B}" \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 86 | LIBUNWIND_DIR=${STAGING_EXECPREFIXDIR} \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 87 | ' |
| 88 | |
| 89 | EXTRA_OEMAKE += "\ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 90 | 'DESTDIR=${D}' \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 91 | 'prefix=${prefix}' \ |
| 92 | 'bindir=${bindir}' \ |
| 93 | 'sharedir=${datadir}' \ |
| 94 | 'sysconfdir=${sysconfdir}' \ |
| 95 | 'perfexecdir=${libexecdir}/perf-core' \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 96 | 'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \ |
| 97 | 'sharedir=${@os.path.relpath(datadir, prefix)}' \ |
| 98 | 'mandir=${@os.path.relpath(mandir, prefix)}' \ |
| 99 | 'infodir=${@os.path.relpath(infodir, prefix)}' \ |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 100 | ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 101 | " |
| 102 | |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 103 | # During do_configure, we might run a 'make clean'. That often breaks |
| 104 | # when done in parallel, so disable parallelism for do_configure. Note |
| 105 | # that it has to be done this way rather than by passing -j1, since |
| 106 | # perf's build system by default ignores any -j argument, but does |
| 107 | # honour a JOBS variable. |
| 108 | EXTRA_OEMAKE_append_task-configure = " JOBS=1" |
| 109 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 110 | PERF_SRC ?= "Makefile \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 111 | tools/arch \ |
| 112 | tools/build \ |
| 113 | tools/include \ |
| 114 | tools/lib \ |
| 115 | tools/Makefile \ |
| 116 | tools/perf \ |
| 117 | tools/scripts \ |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 118 | scripts/ \ |
| 119 | arch/${ARCH}/Makefile \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 120 | " |
| 121 | |
Joel Stanley | e252c31 | 2017-12-14 15:11:12 +1030 | [diff] [blame] | 122 | PERF_EXTRA_LDFLAGS = "" |
| 123 | |
| 124 | # MIPS N32 |
| 125 | PERF_EXTRA_LDFLAGS_mipsarchn32eb = "-m elf32btsmipn32" |
| 126 | PERF_EXTRA_LDFLAGS_mipsarchn32el = "-m elf32ltsmipn32" |
| 127 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 128 | do_compile() { |
| 129 | # Linux kernel build system is expected to do the right thing |
| 130 | unset CFLAGS |
| 131 | oe_runmake all |
| 132 | } |
| 133 | |
| 134 | do_install() { |
| 135 | # Linux kernel build system is expected to do the right thing |
| 136 | unset CFLAGS |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 137 | oe_runmake install |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 138 | # we are checking for this make target to be compatible with older perf versions |
Joel Stanley | e252c31 | 2017-12-14 15:11:12 +1030 | [diff] [blame] | 139 | if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 140 | oe_runmake DESTDIR=${D} install-python_ext |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 141 | fi |
| 142 | } |
| 143 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 144 | do_configure[prefuncs] += "copy_perf_source_from_kernel" |
| 145 | python copy_perf_source_from_kernel() { |
| 146 | sources = (d.getVar("PERF_SRC") or "").split() |
| 147 | src_dir = d.getVar("STAGING_KERNEL_DIR") |
| 148 | dest_dir = d.getVar("S") |
| 149 | bb.utils.mkdirhier(dest_dir) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 150 | bb.utils.prunedir(dest_dir) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 151 | for s in sources: |
| 152 | src = oe.path.join(src_dir, s) |
| 153 | dest = oe.path.join(dest_dir, s) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 154 | if not os.path.exists(src): |
| 155 | bb.fatal("Path does not exist: %s. Maybe PERF_SRC does not match the kernel version." % src) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 156 | if os.path.isdir(src): |
| 157 | oe.path.copyhardlinktree(src, dest) |
| 158 | else: |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 159 | src_path = os.path.dirname(s) |
| 160 | os.makedirs(os.path.join(dest_dir,src_path),exist_ok=True) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 161 | bb.utils.copyfile(src, dest) |
| 162 | } |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 163 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 164 | do_configure_prepend () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 165 | # If building a multlib based perf, the incorrect library path will be |
| 166 | # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 167 | # build, with a 64 bit multilib, the arch won't match and the detection of a |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 168 | # 64 bit build (and library) are not exected. To ensure that libraries are |
| 169 | # installed to the correct location, we can use the weak assignment in the |
| 170 | # config/Makefile. |
| 171 | # |
| 172 | # Also need to relocate .config-detected to $(OUTPUT)/config-detected |
| 173 | # for kernel sources that do not already do this |
| 174 | # as two builds (e.g. perf and lib32-perf from mutlilib can conflict |
| 175 | # with each other if its in the shared source directory |
| 176 | # |
| 177 | if [ -e "${S}/tools/perf/config/Makefile" ]; then |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 178 | perfconfig="${S}/tools/perf/config/Makefile" |
| 179 | fi |
| 180 | if [ -e "${S}/tools/perf/Makefile.config" ]; then |
| 181 | perfconfig="${S}/tools/perf/Makefile.config" |
| 182 | fi |
| 183 | if [ -n "${perfconfig}" ]; then |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 184 | # Match $(prefix)/$(lib) and $(prefix)/lib |
| 185 | sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \ |
| 186 | -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \ |
| 187 | -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 188 | ${perfconfig} |
| 189 | fi |
| 190 | # The man pages installation is "$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)" |
| 191 | # in ${S}/tools/perf/Documentation/Makefile, if the mandir set to '?=', it |
| 192 | # will use the relative path 'share/man', in the way it will resulting in |
| 193 | # incorrect installation for man pages. |
| 194 | if [ -e "${S}/tools/perf/Documentation/Makefile" ]; then |
| 195 | sed -i 's,^mandir?=,mandir:=,' ${S}/tools/perf/Documentation/Makefile |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 196 | fi |
| 197 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then |
| 198 | sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ |
| 199 | ${S}/tools/perf/Makefile.perf |
| 200 | sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \ |
| 201 | ${S}/tools/perf/Makefile.perf |
| 202 | fi |
| 203 | sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \ |
Patrick Williams | d7e9631 | 2015-09-22 08:09:05 -0500 | [diff] [blame] | 204 | ${S}/tools/perf/Makefile* |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 205 | |
| 206 | if [ -e "${S}/tools/build/Makefile.build" ]; then |
| 207 | sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ |
| 208 | ${S}/tools/build/Makefile.build |
| 209 | fi |
| 210 | |
| 211 | # We need to ensure the --sysroot option in CC is preserved |
| 212 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then |
| 213 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf |
| 214 | sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 215 | sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/perf/Makefile.perf |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 216 | fi |
| 217 | if [ -e "${S}/tools/lib/api/Makefile" ]; then |
| 218 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile |
| 219 | sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 220 | sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/lib/api/Makefile |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 221 | fi |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 222 | if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then |
| 223 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/subcmd/Makefile |
| 224 | sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/subcmd/Makefile |
| 225 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 226 | if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then |
| 227 | sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile |
| 228 | fi |
| 229 | if [ -e "${S}/tools/build/Makefile.feature" ]; then |
| 230 | sed -i 's,CFLAGS=,CC="\$(CC)" CFLAGS=,' ${S}/tools/build/Makefile.feature |
| 231 | fi |
| 232 | |
| 233 | # 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include |
| 234 | if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then |
| 235 | 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 |
| 236 | fi |
| 237 | if [ -e "${S}/tools/perf/arch/arm/util/unwind-libunwind.c" ] && [ -e "${S}/tools/perf/arch/arm/tests/dwarf-unwind.c" ]; then |
| 238 | 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 |
| 239 | 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 |
| 240 | fi |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 241 | |
| 242 | # use /usr/bin/env instead of version specific python |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 243 | for s in `find ${S}/tools/perf/ -name '*.py'` `find ${S}/scripts/ -name 'bpf_helpers_doc.py'`; do |
| 244 | sed -i -e "s,#!.*python.*,#!${USRBINPATH}/env python3," ${s} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 245 | done |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 246 | |
| 247 | # unistd.h can be out of sync between libc-headers and the captured version in the perf source |
| 248 | # so we copy it from the sysroot unistd.h to the perf unistd.h |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 249 | install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 250 | install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/include/uapi/asm-generic/unistd.h |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 251 | } |
| 252 | |
| 253 | python do_package_prepend() { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 254 | d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0]) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 255 | } |
| 256 | |
| 257 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 258 | |
| 259 | |
| 260 | PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" |
| 261 | |
| 262 | RDEPENDS_${PN} += "elfutils bash" |
| 263 | RDEPENDS_${PN}-archive =+ "bash" |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 264 | RDEPENDS_${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python3', '', d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 265 | RDEPENDS_${PN}-perl =+ "bash perl perl-modules" |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 266 | RDEPENDS_${PN}-tests =+ "python3" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 267 | |
Joel Stanley | e252c31 | 2017-12-14 15:11:12 +1030 | [diff] [blame] | 268 | RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 269 | RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" |
| 270 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 271 | FILES_SOLIBSDEV = "" |
| 272 | FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent ${libdir}/libperf-jvmti.so" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 273 | FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 274 | FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 275 | FILES_${PN}-python = " \ |
| 276 | ${PYTHON_SITEPACKAGES_DIR} \ |
| 277 | ${libexecdir}/perf-core/scripts/python \ |
| 278 | " |
| 279 | FILES_${PN}-perl = "${libexecdir}/perf-core/scripts/perl" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 280 | |
| 281 | |
| 282 | INHIBIT_PACKAGE_DEBUG_SPLIT="1" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 283 | DEBUG_OPTIMIZATION_append = " -Wno-error=maybe-uninitialized" |