summaryrefslogtreecommitdiffstats
path: root/tools/perf/config
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-10 08:05:25 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-10-14 10:29:07 -0300
commitfcf92585014f0a0e390d2819de8278ae90da5842 (patch)
tree2bc7eb7876b8d5d79959bb078cde774ccc428e94 /tools/perf/config
parent3fb66335e13ef7426affe9efa48c08857202c1cb (diff)
downloadop-kernel-dev-fcf92585014f0a0e390d2819de8278ae90da5842.zip
op-kernel-dev-fcf92585014f0a0e390d2819de8278ae90da5842.tar.gz
tools/perf/build: Pass through DEBUG parameter
Arnaldo reported that 'make DEBUG=1' does not work anymore. The reason is that 'Makefile' only passes it through to 'Makefile.perf' via the environment, but 'Makefile.perf' checks that it's a command line option: ifeq ("$(origin DEBUG)", "command line") PERF_DEBUG = $(DEBUG) endif So pass it through properly, and also clean up DEBUG parameter handling while at it and fix a couple of annoyances: - DEBUG=0 used to be interpreted as 'debugging on'. Turn it into 'debugging off' instead. - Same was the case for 'DEBUG=' - turn that into debug-off as well. - Pass in just a clean, sanitized 'DEBUG' value and get rid of the intermediate, unnecessary PERF_DEBUG variable. Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/config')
-rw-r--r--tools/perf/config/Makefile7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 9680424..9524c0c 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -66,10 +66,7 @@ ifneq ($(WERROR),0)
CFLAGS += -Werror
endif
-ifeq ("$(origin DEBUG)", "command line")
- PERF_DEBUG = $(DEBUG)
-endif
-ifndef PERF_DEBUG
+ifeq ($(DEBUG),0)
CFLAGS += -O6
endif
@@ -210,7 +207,7 @@ ifeq ($(feature-volatile-register-var), 1)
CFLAGS += -Wvolatile-register-var
endif
-ifndef PERF_DEBUG
+ifeq ($(DEBUG),0)
ifeq ($(feature-fortify-source), 1)
CFLAGS += -D_FORTIFY_SOURCE=2
endif
OpenPOWER on IntegriCloud