summaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer2012-10-08 08:43:26 +0200
committerArnaldo Carvalho de Melo2012-10-08 22:38:25 +0200
commit78da39faf7c903bb6e3c20a726fde1bf98d10af8 (patch)
treec3aa294624d66d52ce6952568ac95880c202a16a /tools/perf/Makefile
parentperf kvm: Add braces around multi-line statements (diff)
downloadkernel-qcow2-linux-78da39faf7c903bb6e3c20a726fde1bf98d10af8.tar.gz
kernel-qcow2-linux-78da39faf7c903bb6e3c20a726fde1bf98d10af8.tar.xz
kernel-qcow2-linux-78da39faf7c903bb6e3c20a726fde1bf98d10af8.zip
perf tools: Add on_exit implementation
on_exit() is only available in new versions of glibc. It is not implemented in Bionic and will lead to linking errors when compiling for Android. Implement a wrapper for on_exit using atexit. The implementation for on_exit is the one sent by Bernhard Rosenkraenzer in https://lkml.org/lkml/2012/8/23/316. The configuration part from the Makefile is different than the one from the original patch. Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Irina Tirdea <irina.tirdea@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1349678613-7045-2-git-send-email-irina.tirdea@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index d80a33324785..a7d8745e0ab2 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -753,6 +753,12 @@ ifndef NO_STRLCPY
endif
endif
+ifndef NO_ON_EXIT
+ ifeq ($(call try-cc,$(SOURCE_ON_EXIT),),y)
+ BASIC_CFLAGS += -DHAVE_ON_EXIT
+ endif
+endif
+
ifndef NO_BACKTRACE
ifeq ($(call try-cc,$(SOURCE_BACKTRACE),),y)
BASIC_CFLAGS += -DBACKTRACE_SUPPORT