perf build: Add dwarf objects building
authorJiri Olsa <jolsa@kernel.org>
Mon, 29 Dec 2014 23:06:25 +0000 (00:06 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 12 Feb 2015 14:46:01 +0000 (11:46 -0300)
Move the dwarf objects building under build framework to be included in
the libperf build object.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-5ody6tnfnkt4rezvpem8n7rm@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile.perf
tools/perf/config/Makefile
tools/perf/util/Build

index 0997e2b33c77769b7663b47f8304acdf04cc8f0a..5cb62b070e046631d12fbb41267914d59510548d 100644 (file)
@@ -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
index 79ee4ccce3dcc6e00808d76dc7f6fb96aa863995..5f553989d8a136d9d28d9c1bb6ea9981a6e68c19 100644 (file)
@@ -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
index 73a0411e20140afc9c8ae7c718097f949251dfa5..10630fbe43c16347ef783fbf975b9712d38a5700 100644 (file)
@@ -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))"