summaryrefslogtreecommitdiffstats
path: root/tools/perf/config/feature-checks
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-07 10:35:39 +0200
committerIngo Molnar <mingo@kernel.org>2013-10-09 08:48:36 +0200
commit8295d4e27262dc49177e70dcc8ba34fa26343cf2 (patch)
tree9d8b2898b6fcd24f0e4c61ac1b82861d3092048b /tools/perf/config/feature-checks
parente12762cfd9b4ec8f9bb5863eea403253175df9f1 (diff)
downloadlinux-8295d4e27262dc49177e70dcc8ba34fa26343cf2.tar.bz2
tools/perf/build: Split out feature check: 'dwarf'
Cc: 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> Link: http://lkml.kernel.org/n/tip-dsx0fn9mjwfprizboANvtuup@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/config/feature-checks')
-rw-r--r--tools/perf/config/feature-checks/Makefile4
-rw-r--r--tools/perf/config/feature-checks/test-dwarf.c9
2 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index c0569c7edb89..566a71dd6168 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -8,6 +8,7 @@ FILES= \
test-bionic \
test-libelf \
test-glibc \
+ test-dwarf \
test-libnuma
CC := $(CC) -MD
@@ -42,6 +43,9 @@ test-libelf:
test-glibc:
$(BUILD)
+test-dwarf:
+ $(BUILD) -ldw
+
test-libnuma:
$(BUILD) -lnuma
diff --git a/tools/perf/config/feature-checks/test-dwarf.c b/tools/perf/config/feature-checks/test-dwarf.c
new file mode 100644
index 000000000000..783dfcd9a5c4
--- /dev/null
+++ b/tools/perf/config/feature-checks/test-dwarf.c
@@ -0,0 +1,9 @@
+#include <dwarf.h>
+#include <elfutils/libdw.h>
+#include <elfutils/version.h>
+
+int main(void)
+{
+ Dwarf *dbg = dwarf_begin(0, DWARF_C_READ);
+ return (long)dbg;
+}