[oe-commits] Bruce Ashfield : perf: add libexec and traceevent to packages

git at git.openembedded.org git at git.openembedded.org
Wed Mar 19 14:11:43 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 4c6fc1cceaabb43e58f0ded54f401c9f02f2342c
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=4c6fc1cceaabb43e58f0ded54f401c9f02f2342c

Author: Bruce Ashfield <bruce.ashfield at windriver.com>
Date:   Wed Mar 12 20:30:40 2014 +0000

perf: add libexec and traceevent to packages

Recent versions of perf may install files into /usr/libexec/perf-core and in
/usr/lib/traceevent. To avoid packaging QA errors, we add these two
directories to the FILES variables.

We also add: INHIBIT_PACKAGE_DEBUG_SPLIT="1" to avoid the following issue
(due to a trailing / being removed):

   ERROR: debugedit failed with exit code 256
   ...
   debugedit: canonicalization unexpectedly shrank by one character

And finally, we must ensure that the traceevent libraries are installed to
the proper multilib library path. If building some multlibs, the incorrect
library path will be selected by perf, since it triggers via: ifeq
($(ARCH),x86_64) (or similiar mechanism per arch).

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 installed to the correct location, we can make the substitution
in the config/Makefile. For non multilib builds, this has no impact.

Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-kernel/perf/perf.bb | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 56576d5..ff0bec8 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -120,6 +120,17 @@ do_install() {
 do_configure_prepend () {
     #kernels before 3.1 do not support WERROR env variable
     sed -i 's,-Werror ,,' ${S}/tools/perf/Makefile
+    if [ -e "${S}/tools/perf/config/Makefile" ]; then
+        sed -i 's,-Werror ,,' ${S}/tools/perf/config/Makefile
+    fi
+
+    # 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
+    # installed to the correct location, we can make the substitution in the 
+    # config/Makefile. For non multilib builds, this has no impact.
+    sed -i 's,libdir = $(prefix)/$(lib),libdir = $(prefix)/${baselib},' ${S}/tools/perf/config/Makefile
 }
 
 python do_package_prepend() {
@@ -128,6 +139,8 @@ python do_package_prepend() {
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-FILES_${PN} += "${libexecdir}/perf-core"
+FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent"
 FILES_${PN}-dbg += "${libdir}/python*/site-packages/.debug"
 FILES_${PN} += "${libdir}/python*/site-packages"
+
+INHIBIT_PACKAGE_DEBUG_SPLIT="1"



More information about the Openembedded-commits mailing list