Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757512Ab3JNUCt (ORCPT ); Mon, 14 Oct 2013 16:02:49 -0400 Received: from merlin.infradead.org ([205.233.59.134]:38407 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756807Ab3JNUCl (ORCPT ); Mon, 14 Oct 2013 16:02:41 -0400 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Peter Zijlstra , Namhyung Kim , David Ahern , Jiri Olsa Subject: [PATCH 011/161] tools/perf/build: Split out feature check: 'libelf' Date: Mon, 14 Oct 2013 17:00:00 -0300 Message-Id: <1381780950-25642-12-git-send-email-acme@infradead.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1381780950-25642-1-git-send-email-acme@infradead.org> References: <1381780950-25642-1-git-send-email-acme@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2525 Lines: 81 From: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Namhyung Kim Cc: David Ahern Cc: Jiri Olsa Link: http://lkml.kernel.org/n/tip-qznhihaasbysfqO7ffvRsf9q@git.kernel.org Signed-off-by: Ingo Molnar --- 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(-) create mode 100644 tools/perf/config/feature-checks/test-libelf.c diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index a2e0e1b200c3..68654281b973 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 191df97a031d..789a38d21a34 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 000000000000..1a08f9717344 --- /dev/null +++ b/tools/perf/config/feature-checks/test-libelf.c @@ -0,0 +1,7 @@ +#include + +int main(void) +{ + Elf *elf = elf_begin(0, ELF_C_READ, 0); + return (long)elf; +} -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/