diff options
Diffstat (limited to 'poky/meta/recipes-kernel/perf/perf.bb')
-rw-r--r-- | poky/meta/recipes-kernel/perf/perf.bb | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/poky/meta/recipes-kernel/perf/perf.bb b/poky/meta/recipes-kernel/perf/perf.bb index 7d90ac3612..e22a1bebb2 100644 --- a/poky/meta/recipes-kernel/perf/perf.bb +++ b/poky/meta/recipes-kernel/perf/perf.bb @@ -11,9 +11,10 @@ LICENSE = "GPL-2.0-only" PR = "r9" -PACKAGECONFIG ??= "scripting tui libunwind libtraceevent" +PACKAGECONFIG ??= "python tui libunwind libtraceevent" PACKAGECONFIG[dwarf] = ",NO_DWARF=1" -PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3 python3-setuptools-native" +PACKAGECONFIG[perl] = ",NO_LIBPERL=1,perl" +PACKAGECONFIG[python] = ",NO_LIBPYTHON=1,python3 python3-setuptools-native" # 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 @@ -30,6 +31,8 @@ PACKAGECONFIG[cap] = ",,libcap" PACKAGECONFIG[libtraceevent] = ",NO_LIBTRACEEVENT=1,libtraceevent" # Arm CoreSight PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd" +PACKAGECONFIG[pfm4] = ",NO_LIBPFM4=1,libpfm4" +PACKAGECONFIG[babeltrace] = ",NO_LIBBABELTRACE=1,babeltrace" # libunwind is not yet ported for some architectures PACKAGECONFIG:remove:arc = "libunwind" @@ -49,7 +52,7 @@ PROVIDES = "virtual/perf" inherit linux-kernel-base kernel-arch manpages # needed for building the tools/perf Python bindings -inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'python3targetconfig', '', d)} +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)} inherit python3-dir export PYTHON_SITEPACKAGES_DIR @@ -59,7 +62,7 @@ export WERROR = "0" do_populate_lic[depends] += "virtual/kernel:do_shared_workdir" # needed for building the tools/perf Perl binding -include ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perf-perl.inc', '', d)} +include ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perf-perl.inc', '', d)} inherit kernelsrc @@ -73,6 +76,7 @@ LDFLAGS="-ldl -lutil" EXTRA_OEMAKE = '\ V=1 \ + VF=1 \ -C ${S}/tools/perf \ O=${B} \ CROSS_COMPILE=${TARGET_PREFIX} \ @@ -104,7 +108,7 @@ EXTRA_OEMAKE += "\ 'sharedir=${@os.path.relpath(datadir, prefix)}' \ 'mandir=${@os.path.relpath(mandir, prefix)}' \ 'infodir=${@os.path.relpath(infodir, prefix)}' \ - ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'python', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \ " # During do_configure, we might run a 'make clean'. That often breaks @@ -149,7 +153,7 @@ do_install() { unset CFLAGS oe_runmake install # we are checking for this make target to be compatible with older perf versions - if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then + if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then oe_runmake DESTDIR=${D} install-python_ext if [ -e ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt ]; then sed -i -e 's#${WORKDIR}##g' ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt @@ -320,6 +324,9 @@ do_configure:prepend () { if [ -e "${S}/tools/build/Makefile.feature" ]; then sed -i 's,CFLAGS=,CC="\$(CC)" CFLAGS=,' ${S}/tools/build/Makefile.feature fi + # The libperl feature check produces fatal warnings due to -Werror being + # used, silence enough errors that the check passes. + sed -i 's/\(FLAGS_PERL_EMBED=.*\)/\1 -Wno-error=unused-function -Wno-error=attributes/' ${S}/tools/build/feature/Makefile # 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 @@ -364,9 +371,10 @@ RDEPENDS:${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PAC RDEPENDS:${PN}-perl =+ "bash perl perl-modules" RDEPENDS:${PN}-tests =+ "python3 bash" -RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}" -RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" - +RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests \ + ${@bb.utils.contains('PACKAGECONFIG', 'perl', '${PN}-perl', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)} \ + " FILES_SOLIBSDEV = "" FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so" FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive" |