Skip to contentSkip to conversation

perf build: Add dwarf objects building

tip:perf/core tip-bot for Jiri Olsa 1 participant 1 message Feb 18, 2015 perf events

lore
Share & tools
lore

tip-bot for Jiri Olsa

author merge bot
#0 lore raw
Commit-ID:  8379fce485cc57daa42a06f4cf1ad822b794d95d
Gitweb:     http://git.kernel.org/tip/8379fce485cc57daa42a06f4cf1ad822b794d95d
Author:     Jiri Olsa <[email protected]>
AuthorDate: Tue, 30 Dec 2014 00:06:25 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 12 Feb 2015 11:46:01 -0300

perf build: Add dwarf objects building

Move the dwarf objects building under build framework to be included in the libperf build object.

---
 tools/perf/Makefile.perf   | 7 -------
 tools/perf/config/Makefile | 1 +
 tools/perf/util/Build      | 3 +++
 3 files changed, 4 insertions(+), 7 deletions(-)
tools/perf/Makefile.perf +0 -7
index 0997e2b..5cb62b0 100644
@@ -346,13 +346,6 @@ ifneq ($(OUTPUT),)
   CFLAGS += -I$(OUTPUT)
 endif
 
-ifndef NO_LIBELF
-ifndef NO_DWARF
-  LIB_OBJS += $(OUTPUT)util/probe-finder.o
-  LIB_OBJS += $(OUTPUT)util/dwarf-aux.o
-endif # NO_DWARF
-endif # NO_LIBELF
-
 ifndef NO_LIBDW_DWARF_UNWIND
   LIB_OBJS += $(OUTPUT)util/unwind-libdw.o
   LIB_H += util/unwind-libdw.h
tools/perf/config/Makefile +1 -0
index 79ee4cc..5f55398 100644
@@ -392,6 +392,7 @@ ifndef NO_LIBELF
       CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS)
       LDFLAGS += $(LIBDW_LDFLAGS)
       EXTLIBS += -ldw
+      $(call detected,CONFIG_DWARF)
     endif # PERF_HAVE_DWARF_REGS
   endif # NO_DWARF
 endif # NO_LIBELF
tools/perf/util/Build +3 -0
index 73a0411..10630fb 100644
@@ -82,6 +82,9 @@ ifndef CONFIG_LIBELF
 libperf-y += symbol-minimal.o
 endif
 
+libperf-$(CONFIG_DWARF) += probe-finder.o
+libperf-$(CONFIG_DWARF) += dwarf-aux.o
+
 CFLAGS_config.o   += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
 CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"