|
@@ -37,7 +37,12 @@ include config/utilities.mak
|
|
|
#
|
|
|
# Define NO_NEWT if you do not want TUI support.
|
|
|
#
|
|
|
+# Define NO_GTK2 if you do not want GTK+ GUI support.
|
|
|
+#
|
|
|
# Define NO_DEMANGLE if you do not want C++ symbol demangling.
|
|
|
+#
|
|
|
+# Define NO_LIBELF if you do not want libelf dependency (e.g. cross-builds)
|
|
|
+#
|
|
|
|
|
|
$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
|
|
|
@$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT)
|
|
@@ -450,34 +455,57 @@ PYRF_OBJS += $(OUTPUT)util/xyarray.o
|
|
|
-include config.mak.autogen
|
|
|
-include config.mak
|
|
|
|
|
|
-ifndef NO_DWARF
|
|
|
-FLAGS_DWARF=$(ALL_CFLAGS) -ldw -lelf $(ALL_LDFLAGS) $(EXTLIBS)
|
|
|
-ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF)),y)
|
|
|
- msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev);
|
|
|
+ifdef NO_LIBELF
|
|
|
NO_DWARF := 1
|
|
|
-endif # Dwarf support
|
|
|
-endif # NO_DWARF
|
|
|
-
|
|
|
--include arch/$(ARCH)/Makefile
|
|
|
-
|
|
|
-ifneq ($(OUTPUT),)
|
|
|
- BASIC_CFLAGS += -I$(OUTPUT)
|
|
|
-endif
|
|
|
-
|
|
|
+ NO_DEMANGLE := 1
|
|
|
+else
|
|
|
FLAGS_LIBELF=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS)
|
|
|
ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF)),y)
|
|
|
FLAGS_GLIBC=$(ALL_CFLAGS) $(ALL_LDFLAGS)
|
|
|
ifneq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC)),y)
|
|
|
msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
|
|
|
else
|
|
|
- msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel);
|
|
|
+ NO_LIBELF := 1
|
|
|
+ NO_DWARF := 1
|
|
|
+ NO_DEMANGLE := 1
|
|
|
endif
|
|
|
endif
|
|
|
+endif # NO_LIBELF
|
|
|
+
|
|
|
+-include arch/$(ARCH)/Makefile
|
|
|
+
|
|
|
+ifneq ($(OUTPUT),)
|
|
|
+ BASIC_CFLAGS += -I$(OUTPUT)
|
|
|
+endif
|
|
|
+
|
|
|
+ifdef NO_LIBELF
|
|
|
+BASIC_CFLAGS += -DNO_LIBELF_SUPPORT
|
|
|
+
|
|
|
+EXTLIBS := $(filter-out -lelf,$(EXTLIBS))
|
|
|
+
|
|
|
+# Remove ELF/DWARF dependent codes
|
|
|
+LIB_OBJS := $(filter-out $(OUTPUT)util/symbol-elf.o,$(LIB_OBJS))
|
|
|
+LIB_OBJS := $(filter-out $(OUTPUT)util/dwarf-aux.o,$(LIB_OBJS))
|
|
|
+LIB_OBJS := $(filter-out $(OUTPUT)util/probe-event.o,$(LIB_OBJS))
|
|
|
+LIB_OBJS := $(filter-out $(OUTPUT)util/probe-finder.o,$(LIB_OBJS))
|
|
|
+
|
|
|
+BUILTIN_OBJS := $(filter-out $(OUTPUT)builtin-probe.o,$(BUILTIN_OBJS))
|
|
|
+
|
|
|
+# Use minimal symbol handling
|
|
|
+LIB_OBJS += $(OUTPUT)util/symbol-minimal.o
|
|
|
+
|
|
|
+else # NO_LIBELF
|
|
|
|
|
|
ifneq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_COMMON)),y)
|
|
|
BASIC_CFLAGS += -DLIBELF_NO_MMAP
|
|
|
endif
|
|
|
|
|
|
+FLAGS_DWARF=$(ALL_CFLAGS) -ldw -lelf $(ALL_LDFLAGS) $(EXTLIBS)
|
|
|
+ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF)),y)
|
|
|
+ msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev);
|
|
|
+ NO_DWARF := 1
|
|
|
+endif # Dwarf support
|
|
|
+
|
|
|
ifndef NO_DWARF
|
|
|
ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined)
|
|
|
msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled);
|
|
@@ -488,6 +516,7 @@ else
|
|
|
LIB_OBJS += $(OUTPUT)util/dwarf-aux.o
|
|
|
endif # PERF_HAVE_DWARF_REGS
|
|
|
endif # NO_DWARF
|
|
|
+endif # NO_LIBELF
|
|
|
|
|
|
ifdef NO_NEWT
|
|
|
BASIC_CFLAGS += -DNO_NEWT_SUPPORT
|