diff options
authorRobert Yang <>2014-08-12 04:10:19 -0700
committerRichard Purdie <>2014-09-02 17:51:45 +0100
commitc62d693e1341be4afcaaeb1ee37360ecac71f46a (patch)
parentb797cfbe605ab250a5eb714a7d5175861690ae6e (diff)
openembedded-core-contrib-c62d693e1341be4afcaaeb1ee37360ecac71f46a.tar.bz2 fix multilib build
Fixed: $ bitbake perf lib32-perf ERROR: QA Issue: lib32-perf: Files/directories were installed but not shipped /usr/lib64 /usr/lib64/traceevent /usr/lib64/traceevent/plugins /usr/lib64/traceevent/plugins/ /usr/lib64/traceevent/plugins/ /usr/lib64/traceevent/plugins/ /usr/lib64/traceevent/plugins/ /usr/lib64/traceevent/plugins/ /usr/lib64/traceevent/plugins/ /usr/lib64/traceevent/plugins/ /usr/lib64/traceevent/plugins/ /usr/lib64/traceevent/plugins/ /usr/lib64/traceevent/plugins/ [installed-vs-shipped] The perf.do_configure edits kernel's ${STAGING_KERNEL_DIR}/tools/perf/config/Makefile, there would be problems since kernel doesn't have multilib, and the build result is undetermined. Previously, the sed command changed libdir to /usr/lib64 (or 32) in the Makefile, so the build result was different if we build perf (64) first or lib32-perf first. Use the weak assignment "libdir ?=" to instead of "libdir =" will fix the problem since the multilib builds are in different processes, and they won't affect each other any more. The sed command will match both $(prefix)/$(lib) and $(prefix)/lib since the Makefile may has been modified before this patch. Signed-off-by: Robert Yang <> Signed-off-by: Richard Purdie <>
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/recipes-kernel/perf/ b/meta/recipes-kernel/perf/
index bfd210cf2e..ebfedb91d7 100644
--- a/meta/recipes-kernel/perf/
+++ b/meta/recipes-kernel/perf/
@@ -121,10 +121,12 @@ do_configure_prepend () {
# 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.
+ # installed to the correct location, we can use the weak assignment in the
+ # config/Makefile.
if [ -e "${S}/tools/perf/config/Makefile" ]; then
- sed -i 's,libdir = $(prefix)/$(lib),libdir = $(prefix)/${baselib},' ${S}/tools/perf/config/Makefile
+ # Match $(prefix)/$(lib) and $(prefix)/lib
+ sed -i 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \
+ ${S}/tools/perf/config/Makefile
# We need to ensure the --sysroot option in CC is preserved
if [ -e "${S}/tools/perf/Makefile.perf" ]; then