[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-wiiciip2w6ajvj03huqz50xw@git.kernel.org>
Date: Wed, 18 Feb 2015 10:36:12 -0800
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: fweisbec@...il.com, mingo@...nel.org, sukadev@...ux.vnet.ibm.com,
peterz@...radead.org, cjashfor@...ux.vnet.ibm.com,
namhyung@...nel.org, paulus@...ba.org, tglx@...utronix.de,
jolsa@...nel.org, dsahern@...il.com, acme@...hat.com,
alexis.berlemont@...il.com, bp@...en8.de, will.deacon@....com,
eranian@...gle.com, hpa@...or.com, linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf build: Add perf.o object building
Commit-ID: cb4e67fdee46116d6ec5ad37316cf7ff35ad1d7c
Gitweb: http://git.kernel.org/tip/cb4e67fdee46116d6ec5ad37316cf7ff35ad1d7c
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Tue, 30 Dec 2014 17:09:15 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 12 Feb 2015 13:11:37 -0300
perf build: Add perf.o object building
Move the perf object building under build framework to be included in
the perf build object.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Tested-by: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Tested-by: Will Deacon <will.deacon@....com>
Cc: Alexis Berlemont <alexis.berlemont@...il.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/n/tip-wiiciip2w6ajvj03huqz50xw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/Build | 3 +++
tools/perf/Makefile.perf | 16 +++++-----------
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/tools/perf/Build b/tools/perf/Build
index 133ec64..976e038 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -25,12 +25,15 @@ perf-$(CONFIG_LIBELF) += builtin-probe.o
perf-y += bench/
perf-y += tests/
+perf-y += perf.o
+
paths += -DPERF_HTML_PATH="BUILD_STR($(htmldir_SQ))"
paths += -DPERF_INFO_PATH="BUILD_STR($(infodir_SQ))"
paths += -DPERF_MAN_PATH="BUILD_STR($(mandir_SQ))"
CFLAGS_builtin-help.o += $(paths)
CFLAGS_builtin-timechart.o += $(paths)
+CFLAGS_perf.o += -DPERF_HTML_PATH="BUILD_STR($(htmldir_SQ))" -include $(OUTPUT)PERF-VERSION-FILE
libperf-y += util/
libperf-y += arch/
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 713f4d1..0a669f9 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -376,16 +376,11 @@ PERF_IN := $(OUTPUT)perf-in.o
export srctree OUTPUT RM CC LD AR CFLAGS V BISON FLEX
build := -f $(srctree)/tools/build/Makefile.build dir=. obj
-$(PERF_IN): $(OUTPUT)common-cmds.h FORCE
+$(PERF_IN): $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h FORCE
@$(MAKE) $(build)=perf
-$(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS
- $(QUIET_CC)$(CC) -include $(OUTPUT)PERF-VERSION-FILE \
- '-DPERF_HTML_PATH="$(htmldir_SQ)"' \
- $(CFLAGS) -c $(filter %.c,$^) -o $@
-
-$(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) $(PERF_IN)
- $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(OUTPUT)perf.o \
+$(OUTPUT)perf: $(BUILTIN_OBJS) $(PERFLIBS) $(PERF_IN)
+ $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) \
$(BUILTIN_OBJS) $(PERF_IN) $(LIBS) -o $@
$(GTK_IN): FORCE
@@ -403,8 +398,7 @@ $(SCRIPTS) : % : %.sh
$(QUIET_GEN)$(INSTALL) '$@...' '$(OUTPUT)$@'
# These can record PERF_VERSION
-$(OUTPUT)perf.o perf.spec \
- $(SCRIPTS) \
+perf.spec $(SCRIPTS) \
: $(OUTPUT)PERF-VERSION-FILE
.SUFFIXES:
@@ -659,7 +653,7 @@ config-clean:
@$(MAKE) -C config/feature-checks clean >/dev/null
clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean
- $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(OUTPUT)perf.o $(LANG_BINDINGS)
+ $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS)
@find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
@$(RM) .config-detected
$(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists