diff mbox series

perf: improve fixing for buildpaths QA warning

Message ID 20250730014258.3962647-1-changqing.li@windriver.com
State New
Headers show
Series perf: improve fixing for buildpaths QA warning | expand

Commit Message

Changqing Li July 30, 2025, 1:42 a.m. UTC
From: Changqing Li <changqing.li@windriver.com>

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>
---
 meta/recipes-kernel/perf/perf.bb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Ross Burton July 31, 2025, 9:38 a.m. UTC | #1
On 30 Jul 2025, at 02:42, Changqing Li via lists.openembedded.org <changqing.li=windriver.com@lists.openembedded.org> wrote:
> 
> From: Changqing Li <changqing.li@windriver.com>
> 
> 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
Changqing Li Aug. 1, 2025, 2:07 a.m. UTC | #2
On 7/31/25 17:38, Ross Burton wrote:
> 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.
>
> On 30 Jul 2025, at 02:42, Changqing Li via lists.openembedded.org<changqing.li=windriver.com@lists.openembedded.org> wrote:
>> From: Changqing Li<changqing.li@windriver.com>
>>
>> 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/20250728093153.2330009-1-changqing.li@windriver.com/


Regards

Changqing

>
> Ross
>
diff mbox series

Patch

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 4f29bd5bbc..61e2ec0557 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -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