Skip to contentSkip to conversation

perf: improve fixing for buildpaths QA warning

PATCH In review [email protected] 2 participants 3 messages Jul 30, 2025 – Aug 1, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: improve fixing for buildpaths QA warning

From: Changqing Li <[email protected]>

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

---
 meta/recipes-kernel/perf/perf.bb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
meta/recipes-kernel/perf/perf.bb +6 -2
index 4f29bd5bbc..61e2ec0557 100644
@@ -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
Signature · 1 line
2.34.1
#1 lore raw
Quoted 5 lines · Changqing Li via lists.openembedded.org

From: Changqing Li <[email protected]>

if O=${B} is removed from EXTRA_OEMAKE, perf will compile failed with error:

Why would you remove O=${B}? That would cause the build to happen inside the shared kernel source, correct?

Ross

#2 lore raw
Quoted 9 lines · Ross Burton

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Quoted 4 lines · Changqing Li via lists.openembedded.org

From: Changqing Li<[email protected]>

if O=${B} is removed from EXTRA_OEMAKE, perf will compile failed with error:

Why would you remove O=${B}? That would cause the build to happen inside the shared kernel source, correct?

Originally, I want to remove O=${B} to workaround the perf build failure with long build path,  and then find arm64 will compile failed

with above error,  and then find it is related to the change of "tools/perf/arch/arm64/Makefile", so I have this patch.

I have send a patch to upstream linux to fix perf build failure with long build path, see followling link.  So I don't need to remove O=${B} now.

https://lore.kernel.org/lkml/[email protected]/

Regards

Changqing

Quoted 3 lines

Ross