* [tip:perf/core] tools/perf/build: Split out feature check: ' libelf'
@ 2013-10-15 5:13 tip-bot for Ingo Molnar
0 siblings, 0 replies; only message in thread
From: tip-bot for Ingo Molnar @ 2013-10-15 5:13 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, acme, hpa, mingo, a.p.zijlstra, namhyung, jolsa,
dsahern, tglx
Commit-ID: 8f7f8005f526c23d3e5537f5ab68c1c3fb422453
Gitweb: http://git.kernel.org/tip/8f7f8005f526c23d3e5537f5ab68c1c3fb422453
Author: Ingo Molnar <mingo@kernel.org>
AuthorDate: Mon, 30 Sep 2013 14:20:25 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 9 Oct 2013 08:48:34 +0200
tools/perf/build: Split out feature check: 'libelf'
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-qznhihaasbysfqO7ffvRsf9q@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
tools/perf/config/Makefile | 4 ++--
tools/perf/config/feature-checks/Makefile | 4 ++++
tools/perf/config/feature-checks/test-libelf.c | 7 +++++++
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index a2e0e1b..6865428 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -108,6 +108,7 @@ FEATURE_TESTS = \
volatile-register-var \
fortify-source \
bionic \
+ libelf \
libnuma
$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
@@ -164,8 +165,7 @@ ifdef NO_LIBELF
NO_DEMANGLE := 1
NO_LIBUNWIND := 1
else
- FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS)
- ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y)
+ ifeq ($(feature-libelf), 0)
FLAGS_GLIBC=$(CFLAGS) $(LDFLAGS)
ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y)
LIBC_SUPPORT := 1
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index 191df97..789a38d 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -6,6 +6,7 @@ FILES= \
test-volatile-register-var \
test-fortify-source \
test-bionic \
+ test-libelf \
test-libnuma
CC := $(CC) -MD
@@ -34,6 +35,9 @@ test-fortify-source:
test-bionic:
$(BUILD)
+test-libelf:
+ $(BUILD) -lelf
+
test-libnuma:
$(BUILD) -lnuma
diff --git a/tools/perf/config/feature-checks/test-libelf.c b/tools/perf/config/feature-checks/test-libelf.c
new file mode 100644
index 0000000..1a08f97
--- /dev/null
+++ b/tools/perf/config/feature-checks/test-libelf.c
@@ -0,0 +1,7 @@
+#include <libelf.h>
+
+int main(void)
+{
+ Elf *elf = elf_begin(0, ELF_C_READ, 0);
+ return (long)elf;
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-15 5:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-15 5:13 [tip:perf/core] tools/perf/build: Split out feature check: ' libelf' tip-bot for Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®