]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
perf: improve fixing for buildpaths QA warning
authorChangqing Li <changqing.li@windriver.com>
Wed, 30 Jul 2025 01:42:58 +0000 (09:42 +0800)
committerMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Wed, 30 Jul 2025 09:53:45 +0000 (11:53 +0200)
if O=${B} is removed from EXTRA_OEMAKE, perf will compile failed with
error:
| make[2]: *** No rule to make target 'tools/arch/arm64/include/uapi/asm/unistd.h', needed by 'arch/arm64/include/generated/asm/syscalls.c'.  Stop.

Improve to add an extra rel_sysdef for fixing buildpaths QA warning,
and keep original sysdef

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/recipes-kernel/perf/perf.bb

index 4f29bd5bbc3ab3e6b21a6432662570647bfd2199..61e2ec0557df08c4084aca1c22ff081a31dbc07c 100644 (file)
@@ -320,8 +320,12 @@ do_configure:prepend () {
                        "${S}/tools/perf/pmu-events/jevents.py"
     fi
     if [ -e "${S}/tools/perf/arch/arm64/Makefile" ]; then
-       sed -i 's,sysdef := $(srctree)/,sysdef := ,' ${S}/tools/perf/arch/arm64/Makefile
-       sed -i 's,$(incpath) $(sysdef),$(incpath) $(srctree)/$(sysdef) $(sysdef),' ${S}/tools/perf/arch/arm64/Makefile
+       sed -i -E '/^sysdef := \$\(srctree\)\/(.+)/ {
+         h
+         s/^sysdef := \$\(srctree\)\/(.+)/rel_sysdef := \1/
+         G
+       }' ${S}/tools/perf/arch/arm64/Makefile
+       sed -i 's,$(incpath) $(sysdef),$(incpath) $(sysdef) $(rel_sysdef),' ${S}/tools/perf/arch/arm64/Makefile
     fi
     if [ -e "${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl" ]; then
        if ! grep -q input_rel ${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl; then