aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/config
diff options
context:
space:
mode:
authorIrina Tirdea2012-10-08 09:43:27 +0300
committerArnaldo Carvalho de Melo2012-10-08 17:42:16 -0300
commitd816ec2d1bea55cfeac373f0ab0ab8a3105e49b4 (patch)
tree5b4ea9fab5c4b0b1364ce1f5dcf722d04b134b43 /tools/perf/config
parent78da39faf7c903bb6e3c20a726fde1bf98d10af8 (diff)
perf tools: Update Makefile for Android
For cross-compiling on Android, some specific changes are needed in the Makefile. Update the Makefile to support cross-compiling for Android. The original ideea for this was send by Bernhard Rosenkraenzer in https://lkml.org/lkml/2012/8/23/316, but this is a rewrite. Changes: () support bionic in addition to glibc () remove rt and pthread libraries that do not exist in Android () use $(CFLAGS) when detecting initial compiler flags. This is needed when setting CFLAGS as an argument of make (e.g. for setting --sysroot). () include perf's local directory when building for Android to be able to find relative paths if using --sysroot (e.g.: ../../include/linux/perf_event.h) Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Cc: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> 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-3-git-send-email-irina.tirdea@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/config')
-rw-r--r--tools/perf/config/feature-tests.mak9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak
index eaeb0fd6f395..3ef5ec9cdff8 100644
--- a/tools/perf/config/feature-tests.mak
+++ b/tools/perf/config/feature-tests.mak
@@ -43,6 +43,15 @@ int main(void)
}
endef
+define SOURCE_BIONIC
+#include <android/api-level.h>
+
+int main(void)
+{
+ return __ANDROID_API__;
+}
+endef
+
define SOURCE_ELF_MMAP
#include <libelf.h>
int main(void)