Sets the LIBC option and is independent of LIBELF.

Signed-off-by: David Ahern <dsah...@gmail.com>
Cc: Arnaldo Carvalho de Melo <a...@ghostprotocols.net>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Frederic Weisbecker <fweis...@gmail.com>
Cc: Ingo Molnar <mi...@kernel.org>
Cc: Jiri Olsa <jo...@redhat.com>
Cc: Namhyung Kim <namhy...@kernel.org>
Cc: Peter Zijlstra <a.p.zijls...@chello.nl>
Cc: Stephane Eranian <eran...@google.com>
---
 tools/perf/Makefile |    6 ++++--
 tools/perf/Pconfig  |    7 ++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index d2707ee..969bdd3 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -206,8 +206,10 @@ BASIC_CFLAGS = \
 
 BASIC_LDFLAGS =
 
-ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y)
-       BIONIC := 1
+ifdef CONFIG_BIONIC
+    ifneq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y)
+        $(error No anddroid api-level.h. Unset CONFIG_BIONIC to continue)
+    endif
        EXTLIBS := $(filter-out -lrt,$(EXTLIBS))
        EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
        BASIC_CFLAGS += -I.
diff --git a/tools/perf/Pconfig b/tools/perf/Pconfig
index f744b7b..bec1ac6 100644
--- a/tools/perf/Pconfig
+++ b/tools/perf/Pconfig
@@ -15,12 +15,17 @@ config NEWT
 config GTK2
     bool "Enable GTK-based UI"
 
+config BIONIC
+    bool "Enable support for Bionic (e.g., Android platform)"
+    default n
+    select LIBC
+
 config LIBC
     bool "Development support for libc is available - glibc or bionic"
 
 config LIBELF
     bool "Enable support for libelf"
-    depends on LIBC
+    depends on !BIONIC && LIBC
 
 config LIBUNWIND
     bool "Enable support for libunwind"
-- 
1.7.10.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to