[PATCH v1 4/4] perf build: Cleanup perf register configuration

From: Leo Yan
Date: Wed Feb 14 2024 - 06:41:22 EST


The target is to allow the tool to always enable the perf register
feature for native parsing and cross parsing, and current code doesn't
depend on the macro 'HAVE_PERF_REGS_SUPPORT'.

This patch remove the variable 'NO_PERF_REGS' and the defined macro
'HAVE_PERF_REGS_SUPPORT' from the Makefile.

Signed-off-by: Leo Yan <leo.yan@xxxxxxxxx>
---
tools/perf/Makefile.config | 21 ---------------------
1 file changed, 21 deletions(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 8b740c668ab7..7de7111c0226 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -28,8 +28,6 @@ include $(srctree)/tools/scripts/Makefile.arch

$(call detected_var,SRCARCH)

-NO_PERF_REGS := 1
-
ifneq ($(NO_SYSCALL_TABLE),1)
NO_SYSCALL_TABLE := 1

@@ -50,7 +48,6 @@ endif

# Additional ARCH settings for ppc
ifeq ($(SRCARCH),powerpc)
- NO_PERF_REGS := 0
CFLAGS += -I$(OUTPUT)arch/powerpc/include/generated
LIBUNWIND_LIBS := -lunwind -lunwind-ppc64
endif
@@ -66,41 +63,27 @@ ifeq ($(SRCARCH),x86)
else
LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind
endif
- NO_PERF_REGS := 0
endif

ifeq ($(SRCARCH),arm)
- NO_PERF_REGS := 0
LIBUNWIND_LIBS = -lunwind -lunwind-arm
endif

ifeq ($(SRCARCH),arm64)
- NO_PERF_REGS := 0
CFLAGS += -I$(OUTPUT)arch/arm64/include/generated
LIBUNWIND_LIBS = -lunwind -lunwind-aarch64
endif

ifeq ($(SRCARCH),loongarch)
- NO_PERF_REGS := 0
CFLAGS += -I$(OUTPUT)arch/loongarch/include/generated
LIBUNWIND_LIBS = -lunwind -lunwind-loongarch64
endif

-ifeq ($(SRCARCH),riscv)
- NO_PERF_REGS := 0
-endif
-
-ifeq ($(SRCARCH),csky)
- NO_PERF_REGS := 0
-endif
-
ifeq ($(ARCH),s390)
- NO_PERF_REGS := 0
CFLAGS += -fPIC -I$(OUTPUT)arch/s390/include/generated
endif

ifeq ($(ARCH),mips)
- NO_PERF_REGS := 0
CFLAGS += -I$(OUTPUT)arch/mips/include/generated
LIBUNWIND_LIBS = -lunwind -lunwind-mips
endif
@@ -161,10 +144,6 @@ endif
FEATURE_CHECK_CFLAGS-libopencsd := $(LIBOPENCSD_CFLAGS)
FEATURE_CHECK_LDFLAGS-libopencsd := $(LIBOPENCSD_LDFLAGS) $(OPENCSDLIBS)

-ifeq ($(NO_PERF_REGS),0)
- CFLAGS += -DHAVE_PERF_REGS_SUPPORT
-endif
-
# for linking with debug library, run like:
# make DEBUG=1 LIBDW_DIR=/opt/libdw/
ifdef LIBDW_DIR
--
2.34.1