aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/config
diff options
context:
space:
mode:
authorJiri Olsa2012-10-09 17:50:01 +0200
committerArnaldo Carvalho de Melo2012-10-24 14:20:10 -0200
commit28d213bac4649a1868fa78dab2d3b1ef09235171 (patch)
tree27ba4162517e00c406d23ce87021735163ec58e7 /tools/perf/config
parentce37f400336a34bb6e72c4700f9dcc2a41ff7163 (diff)
perf tools: Diplays more output on features check for make V=1
Adding more verbose output for compile time features checking, to ease up debuging of feature detection failures. Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-fbjha6xs5soyaiek8j4142xg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/config')
-rw-r--r--tools/perf/config/utilities.mak11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/perf/config/utilities.mak b/tools/perf/config/utilities.mak
index 8046182a19eb..ea853c279b31 100644
--- a/tools/perf/config/utilities.mak
+++ b/tools/perf/config/utilities.mak
@@ -180,9 +180,16 @@ _gea_warn = $(warning The path '$(1)' is not executable.)
_gea_err = $(if $(1),$(error Please set '$(1)' appropriately))
# try-cc
-# Usage: option = $(call try-cc, source-to-build, cc-options)
+# Usage: option = $(call try-cc, source-to-build, cc-options, msg)
+ifndef V
+TRY_CC_OUTPUT= > /dev/null 2>&1
+else
+TRY_CC_MSG=echo "CHK $(3)" 1>&2;
+endif
+
try-cc = $(shell sh -c \
'TMP="$(OUTPUT)$(TMPOUT).$$$$"; \
+ $(TRY_CC_MSG) \
echo "$(1)" | \
- $(CC) -x c - $(2) -o "$$TMP" > /dev/null 2>&1 && echo y; \
+ $(CC) -x c - $(2) -o "$$TMP" $(TRY_CC_OUTPUT) && echo y; \
rm -f "$$TMP"')