Skip to content

Commit 14c55b7

Browse files
committed
Merge tag 'perf-tools-fixes-for-v6.15-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
Pull perf tools fixes from Namhyung Kim: "Just a couple of build fixes on arm64" * tag 'perf-tools-fixes-for-v6.15-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: perf tools: Fix in-source libperf build perf tools: Fix arm64 build by generating unistd_64.h
2 parents 59c9ab3 + 8988c4b commit 14c55b7

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

tools/lib/perf/Makefile

+12-2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ libdir_relative_SQ = $(subst ','\'',$(libdir_relative))
4242
TEST_ARGS := $(if $(V),-v)
4343

4444
INCLUDES = \
45+
-I$(OUTPUT)arch/$(SRCARCH)/include/generated/uapi \
4546
-I$(srctree)/tools/lib/perf/include \
4647
-I$(srctree)/tools/lib/ \
4748
-I$(srctree)/tools/include \
@@ -99,7 +100,16 @@ $(LIBAPI)-clean:
99100
$(call QUIET_CLEAN, libapi)
100101
$(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null
101102

102-
$(LIBPERF_IN): FORCE
103+
uapi-asm := $(OUTPUT)arch/$(SRCARCH)/include/generated/uapi/asm
104+
ifeq ($(SRCARCH),arm64)
105+
syscall-y := $(uapi-asm)/unistd_64.h
106+
endif
107+
uapi-asm-generic:
108+
$(if $(syscall-y),\
109+
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-headers obj=$(uapi-asm) \
110+
generic=include/uapi/asm-generic $(syscall-y),)
111+
112+
$(LIBPERF_IN): uapi-asm-generic FORCE
103113
$(Q)$(MAKE) $(build)=libperf
104114

105115
$(LIBPERF_A): $(LIBPERF_IN)
@@ -120,7 +130,7 @@ all: fixdep
120130
clean: $(LIBAPI)-clean
121131
$(call QUIET_CLEAN, libperf) $(RM) $(LIBPERF_A) \
122132
*.o *~ *.a *.so *.so.$(VERSION) *.so.$(LIBPERF_VERSION) .*.d .*.cmd tests/*.o LIBPERF-CFLAGS $(LIBPERF_PC) \
123-
$(TESTS_STATIC) $(TESTS_SHARED)
133+
$(TESTS_STATIC) $(TESTS_SHARED) $(syscall-y)
124134

125135
TESTS_IN = tests-in.o
126136

tools/perf/Makefile.config

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ include $(srctree)/tools/scripts/Makefile.arch
2929
$(call detected_var,SRCARCH)
3030

3131
CFLAGS += -I$(OUTPUT)arch/$(SRCARCH)/include/generated
32+
CFLAGS += -I$(OUTPUT)libperf/arch/$(SRCARCH)/include/generated/uapi
3233

3334
# Additional ARCH settings for ppc
3435
ifeq ($(SRCARCH),powerpc)

0 commit comments

Comments
 (0)