diff options
Diffstat (limited to 'meta/recipes-kernel/perf/perf.bb')
| -rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 872b5f028a..fb4e3ac668 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb | |||
| @@ -61,7 +61,7 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version | |||
| 61 | 61 | ||
| 62 | inherit kernelsrc | 62 | inherit kernelsrc |
| 63 | 63 | ||
| 64 | B = "${WORKDIR}/${BPN}-${PV}" | 64 | S = "${WORKDIR}/${BP}" |
| 65 | SPDX_S = "${S}/tools/perf" | 65 | SPDX_S = "${S}/tools/perf" |
| 66 | 66 | ||
| 67 | # The LDFLAGS is required or some old kernels fails due missing | 67 | # The LDFLAGS is required or some old kernels fails due missing |
| @@ -97,6 +97,16 @@ EXTRA_OEMAKE += "\ | |||
| 97 | 'infodir=${@os.path.relpath(infodir, prefix)}' \ | 97 | 'infodir=${@os.path.relpath(infodir, prefix)}' \ |
| 98 | " | 98 | " |
| 99 | 99 | ||
| 100 | PERF_SRC ?= "Makefile \ | ||
| 101 | tools/arch \ | ||
| 102 | tools/build \ | ||
| 103 | tools/include \ | ||
| 104 | tools/lib \ | ||
| 105 | tools/Makefile \ | ||
| 106 | tools/perf \ | ||
| 107 | tools/scripts \ | ||
| 108 | " | ||
| 109 | |||
| 100 | PERF_EXTRA_LDFLAGS = "" | 110 | PERF_EXTRA_LDFLAGS = "" |
| 101 | 111 | ||
| 102 | # MIPS N32 | 112 | # MIPS N32 |
| @@ -119,11 +129,22 @@ do_install() { | |||
| 119 | fi | 129 | fi |
| 120 | } | 130 | } |
| 121 | 131 | ||
| 122 | do_configure_prepend () { | 132 | do_configure[prefuncs] += "copy_perf_source_from_kernel" |
| 123 | # Fix for rebuilding | 133 | python copy_perf_source_from_kernel() { |
| 124 | rm -rf ${B}/ | 134 | sources = (d.getVar("PERF_SRC") or "").split() |
| 125 | mkdir -p ${B}/ | 135 | src_dir = d.getVar("STAGING_KERNEL_DIR") |
| 136 | dest_dir = d.getVar("S") | ||
| 137 | bb.utils.mkdirhier(dest_dir) | ||
| 138 | for s in sources: | ||
| 139 | src = oe.path.join(src_dir, s) | ||
| 140 | dest = oe.path.join(dest_dir, s) | ||
| 141 | if os.path.isdir(src): | ||
| 142 | oe.path.copyhardlinktree(src, dest) | ||
| 143 | else: | ||
| 144 | bb.utils.copyfile(src, dest) | ||
| 145 | } | ||
| 126 | 146 | ||
| 147 | do_configure_prepend () { | ||
| 127 | # If building a multlib based perf, the incorrect library path will be | 148 | # If building a multlib based perf, the incorrect library path will be |
| 128 | # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit | 149 | # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit |
| 129 | # build, with a 64 bit multilib, the arch won't match and the detection of a | 150 | # build, with a 64 bit multilib, the arch won't match and the detection of a |
