]> code.ossystems Code Review - openembedded-core.git/commitdiff
perf: fix v5.4+ builds
authorBruce Ashfield <bruce.ashfield@gmail.com>
Mon, 21 Oct 2019 20:16:15 +0000 (16:16 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 4 Nov 2019 13:31:27 +0000 (13:31 +0000)
When building perf for 5.4+, we have some new files that need to
be copied (and synchronized) due to structural changes in the
kernel source tree.

Some of the issues these fixes are warnings, but none the less,
they are worth fixing.

 - We copy arch/${ARCH}/Makefile, since it is source by some perf
   Makefiles

 - We copy scripts/, since the perf utilities are looking for files
   in that directory stucture.

 - We have *three* copies of ctypes.h in the tools/* hierarchy
   during the build. If the tools/perf/util/include/linux/ variant
   is used, it will trigger build errors since it is not complete.
   We copy the kernel's main include/linux/ctype.h to ensure they
   are in sync.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-kernel/perf/perf.bb

index 8201c0cb6015f887e9f5e991d1b073b35a452327..0f5df74f11d649594e07c3c2cad9ebfb66742a14 100644 (file)
@@ -113,6 +113,8 @@ PERF_SRC ?= "Makefile \
              tools/Makefile \
              tools/perf \
              tools/scripts \
+             scripts/ \
+             arch/${ARCH}/Makefile \
 "
 
 PERF_EXTRA_LDFLAGS = ""
@@ -246,6 +248,11 @@ do_configure_prepend () {
 
     # bits.h can have the same issue as unistd.h, so we make the tools variant take precedence
     [ -e ${S}/tools/include/linux/bits.h ] && install -D -m0644 ${S}/tools/include/linux/bits.h ${S}/include/linux/bits.h
+
+    [ -e ${S}/tools/perf/util/include/linux/ctype.h ] && install -D -m0644 ${S}/include/linux/ctype.h ${S}/tools/perf/util/include/linux/ctype.h
+
+    [ -e ${S}/include/uapi/linux/kvm.h ] && install -D -m0644 ${S}/include/uapi/linux/kvm.h  ${S}/tools/include/uapi/linux/kvm.h
+    [ -e ${S}/include/uapi/linux/sched.h ] && install -D -m0644 ${S}/include/uapi/linux/sched.h  ${S}/tools/include/uapi/linux/sched.h
 }
 
 python do_package_prepend() {