]> code.ossystems Code Review - openembedded-core.git/commitdiff
perf: make sure that the tools/include/uapi/asm-generic directory exists
authorMartin Jansa <martin.jansa@gmail.com>
Wed, 15 May 2019 18:40:04 +0000 (18:40 +0000)
committerArmin Kuster <akuster808@gmail.com>
Sat, 1 Jun 2019 21:48:32 +0000 (14:48 -0700)
* before trying to copy unistd.h into it

* older kernels don't have uapi in tools/include and do_configure fails
  with:
  DEBUG: Executing shell function do_configure
  cp: cannot create regular file '.../perf/1.0-r9/perf-1.0/tools/include/uapi/asm-generic/unistd.h':
  No such file or directory
  WARNING: exit code 1 from a shell command.

* tools/include/uapi was added in kernel 4.8 with
  https://github.com/torvalds/linux/commit/c4b6014e8bb0c8d47fe5c71ebc604f31091e5d3f
  tools: Add copy of perf_event.h to tools/include/linux/

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-kernel/perf/perf.bb

index 546076f84bd1a5711fbdee105b7bc288b82c1d92..4e603f1a32b8637ac5c92fef4f78fb1f08b8da66 100644 (file)
@@ -238,7 +238,7 @@ do_configure_prepend () {
 
     # unistd.h can be out of sync between libc-headers and the captured version in the perf source
     # so we copy it from the sysroot unistd.h to the perf unistd.h
-    cp ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
+    install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
 }
 
 python do_package_prepend() {