Skip to contentSkip to conversation

perf build: fix out of tree build

PATCH Applied Ethan Adams 3 participants 3 messages Mar 14, 2024 – Mar 18, 2024 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf build: fix out of tree build

It seems that a previous modification to sysreg-defs, which corrected emitting the headaer to the specified output directory, exposed missing subdir, prefix variables. This breaks out of tree builds of perf as the file is now built into the output directory, but still tries to descend into output directory as a subdir.

Fixes a29ee6aea703 ("perf build: Ensure sysreg-defs Makefile respects output dir")
---
 tools/perf/Makefile.perf | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
tools/perf/Makefile.perf +4 -3
index 058c9aecf608..63a8b4be5075 100644
@@ -436,18 +436,19 @@ SHELL = $(SHELL_PATH)
 
 arm64_gen_sysreg_dir := $(srctree)/tools/arch/arm64/tools
 ifneq ($(OUTPUT),)
-  arm64_gen_sysreg_outdir := $(OUTPUT)
+  arm64_gen_sysreg_outdir := $(abspath $(OUTPUT))
 else
   arm64_gen_sysreg_outdir := $(CURDIR)
 endif
 
 arm64-sysreg-defs: FORCE
-	$(Q)$(MAKE) -C $(arm64_gen_sysreg_dir) O=$(arm64_gen_sysreg_outdir)
+	$(Q)$(MAKE) -C $(arm64_gen_sysreg_dir) O=$(arm64_gen_sysreg_outdir) \
+		prefix= subdir=
 
 arm64-sysreg-defs-clean:
 	$(call QUIET_CLEAN,arm64-sysreg-defs)
 	$(Q)$(MAKE) -C $(arm64_gen_sysreg_dir) O=$(arm64_gen_sysreg_outdir) \
-		clean > /dev/null
+		prefix= subdir= clean > /dev/null
 
 beauty_linux_dir := $(srctree)/tools/perf/trace/beauty/include/linux/
 linux_uapi_dir := $(srctree)/tools/include/uapi/linux

base-commit: e365762bb26770b53d2475852453bed76c0d85f9

Signature · 1 line
2.43.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Ethan Adams

It seems that a previous modification to sysreg-defs, which corrected emitting the headaer to the specified output directory, exposed missing

typo: header

Quoted 8 lines

subdir, prefix variables. This breaks out of tree builds of perf as the file is now built into the output directory, but still tries to descend into output directory as a subdir.

Fixes a29ee6aea703 ("perf build: Ensure sysreg-defs Makefile respects output dir")
Signature · 2 lines
Thanks,
Oliver
maintainer Applied
#2 lore raw
Quoted 5 lines · Oliver Upton
Quoted 2 lines · Ethan Adams

It seems that a previous modification to sysreg-defs, which corrected emitting the headaer to the specified output directory, exposed missing

typo: header

fixed

Quoted 10 lines
Quoted 8 lines

subdir, prefix variables. This breaks out of tree builds of perf as the file is now built into the output directory, but still tries to descend into output directory as a subdir.

Fixes a29ee6aea703 ("perf build: Ensure sysreg-defs Makefile respects output dir")

Thanks, applied to perf-tools-next,

- Arnaldo