[PATCH 11/36] perf build: Add dwarf objects building

From: Jiri Olsa
Date: Thu Jan 15 2015 - 08:10:08 EST


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

Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Alexis Berlemont <alexis.berlemont@xxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Corey Ashford <cjashfor@xxxxxxxxxxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
---
tools/perf/Makefile.perf | 7 -------
tools/perf/config/Makefile | 1 +
tools/perf/util/Build | 3 +++
3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 564d18806446..d0df16556fe4 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -344,13 +344,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
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 1a3720f2cdbb..20f00b2effb9 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -386,6 +386,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
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 65029041bc13..b21f67172983 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -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))"

--
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/