linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH 09/52] tools/perf/build: Split out feature check: 'bionic'
Date: Tue,  8 Oct 2013 12:10:39 +0200	[thread overview]
Message-ID: <1381227082-22039-10-git-send-email-mingo@kernel.org> (raw)
In-Reply-To: <1381227082-22039-1-git-send-email-mingo@kernel.org>

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-xjfVewprrfhlo2wuzbnpVb1k@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 tools/perf/config/Makefile                     | 12 +++++++-----
 tools/perf/config/feature-checks/Makefile      |  4 ++++
 tools/perf/config/feature-checks/test-bionic.c |  6 ++++++
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 7a614f9..09e2ecc 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -107,6 +107,7 @@ FEATURE_TESTS =				\
 	stackprotector			\
 	volatile-register-var		\
 	fortify-source			\
+	bionic				\
 	libnuma
 
 $(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
@@ -150,12 +151,13 @@ CFLAGS += -I$(LIB_INCLUDE)
 CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
 
 ifndef NO_BIONIC
-ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y)
-  BIONIC := 1
-  EXTLIBS := $(filter-out -lrt,$(EXTLIBS))
-  EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
+  $(feature_check,bionic)
+  ifeq ($(feature-bionic), 1)
+    BIONIC := 1
+    EXTLIBS := $(filter-out -lrt,$(EXTLIBS))
+    EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
+  endif
 endif
-endif # NO_BIONIC
 
 ifdef NO_LIBELF
   NO_DWARF := 1
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index 529317e..191df97 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -5,6 +5,7 @@ FILES=					\
 	test-stackprotector		\
 	test-volatile-register-var	\
 	test-fortify-source		\
+	test-bionic			\
 	test-libnuma
 
 CC := $(CC) -MD
@@ -30,6 +31,9 @@ test-volatile-register-var:
 test-fortify-source:
 	$(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
 
+test-bionic:
+	$(BUILD)
+
 test-libnuma:
 	$(BUILD) -lnuma
 
diff --git a/tools/perf/config/feature-checks/test-bionic.c b/tools/perf/config/feature-checks/test-bionic.c
new file mode 100644
index 0000000..eac24e9
--- /dev/null
+++ b/tools/perf/config/feature-checks/test-bionic.c
@@ -0,0 +1,6 @@
+#include <android/api-level.h>
+
+int main(void)
+{
+	return __ANDROID_API__;
+}
-- 
1.8.3.1


  parent reply	other threads:[~2013-10-08 10:12 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08 10:10 [PATCH -v2 00/52] tools/perf: Speed up the build system Ingo Molnar
2013-10-08 10:10 ` [PATCH 01/52] tools/perf: Standardize feature support define names to: HAVE_{FEATURE}_SUPPORT Ingo Molnar
2013-10-08 10:10 ` [PATCH 02/52] tools/perf/build: Add feature check core code Ingo Molnar
2013-10-10  5:42   ` Namhyung Kim
2013-10-10  7:21     ` Ingo Molnar
2013-10-10  8:22       ` Namhyung Kim
2013-10-08 10:10 ` [PATCH 03/52] tools/perf/build: Add 'autodep' functionality, generate feature test dependencies automatically Ingo Molnar
2013-10-10  5:44   ` Namhyung Kim
2013-10-10  7:12     ` Ingo Molnar
2013-10-10  7:12     ` [PATCH] tools/perf/build: Simplify the autodep inclusion rule Ingo Molnar
2013-10-08 10:10 ` [PATCH 04/52] tools/perf/build: Split out feature check: 'libnuma' Ingo Molnar
2013-10-08 10:10 ` [PATCH 05/52] tools/perf/build: Split out feature check: 'stackprotector-all' Ingo Molnar
2013-10-08 10:10 ` [PATCH 06/52] tools/perf/build: Split out feature check: 'stackprotector' Ingo Molnar
2013-10-10  5:50   ` Namhyung Kim
2013-10-10  7:08     ` Ingo Molnar
2013-10-10  7:09     ` [PATCH] tools/perf/build: Improve the 'stackprotector' feature test Ingo Molnar
2013-10-08 10:10 ` [PATCH 07/52] tools/perf/build: Split out feature check: 'volatile-register-var' Ingo Molnar
2013-10-10  5:55   ` Namhyung Kim
2013-10-10  7:03     ` Ingo Molnar
2013-10-10  7:03     ` [PATCH] tools/perf/build: Remove the volatile-register-var feature check Ingo Molnar
2013-10-08 10:10 ` [PATCH 08/52] tools/perf/build: Split out feature check: 'fortify-source' Ingo Molnar
2013-10-08 10:10 ` Ingo Molnar [this message]
2013-10-08 10:10 ` [PATCH 10/52] tools/perf/build: Clean up the libelf logic in config/Makefile Ingo Molnar
2013-10-08 10:10 ` [PATCH 11/52] tools/perf/build: Split out feature check: 'libelf' Ingo Molnar
2013-10-08 10:10 ` [PATCH 12/52] tools/perf/build: Split out feature check: 'glibc' Ingo Molnar
2013-10-08 10:10 ` [PATCH 13/52] tools/perf/build: Split out feature check: 'dwarf' Ingo Molnar
2013-10-08 10:10 ` [PATCH 14/52] tools/perf/build: Clean up the mmap logic in config/Makefile Ingo Molnar
2013-10-08 10:10 ` [PATCH 15/52] tools/perf/build: Split out feature check: 'libelf-mmap' Ingo Molnar
2013-10-10  6:00   ` Namhyung Kim
2013-10-10  6:56     ` Ingo Molnar
2013-10-10  6:57     ` [PATCH] tools/perf/build: Simplify the libelf logic Ingo Molnar
2013-10-08 10:10 ` [PATCH 16/52] tools/perf/build: Split out feature check: 'libelf-getphdrnum' Ingo Molnar
2013-10-08 10:10 ` [PATCH 17/52] tools/perf/build: Clean up the libunwind logic in config/Makefile Ingo Molnar
2013-10-08 10:10 ` [PATCH 18/52] tools/perf/build: Split out feature check: 'libunwind' Ingo Molnar
2013-10-08 15:21   ` David Ahern
2013-10-09  6:45     ` Ingo Molnar
2013-10-08 10:10 ` [PATCH 19/52] tools/perf/build: Split out feature check: 'libaudit' Ingo Molnar
2013-10-08 10:10 ` [PATCH 20/52] tools/perf/build: Split out feature check: 'libslang' Ingo Molnar
2013-10-08 10:10 ` [PATCH 21/52] tools/perf/build: Split out feature check: 'gtk2' Ingo Molnar
2013-10-08 10:10 ` [PATCH 22/52] tools/perf/build: Split out feature check: 'gtk2-infobar' Ingo Molnar
2013-10-08 10:10 ` [PATCH 23/52] tools/perf/build: Split out feature check: 'libperl' Ingo Molnar
2013-10-08 10:10 ` [PATCH 24/52] tools/perf/build: Split out feature check: 'libpython' Ingo Molnar
2013-10-08 10:10 ` [PATCH 25/52] tools/perf/build: Split out feature check: 'libpython-version' Ingo Molnar
2013-10-08 10:10 ` [PATCH 26/52] tools/perf/build: Split out feature check: 'libbfd' Ingo Molnar
2013-10-10  6:07   ` Namhyung Kim
2013-10-10  6:50     ` [PATCH] tools/perf/build: Fix DPACKAGE definitions for the libbfd et al testcases Ingo Molnar
2013-10-10  6:50     ` [PATCH 26/52] tools/perf/build: Split out feature check: 'libbfd' Ingo Molnar
2013-10-08 10:10 ` [PATCH 27/52] tools/perf/build: Split out feature check: 'strlcpy' Ingo Molnar
2013-10-08 10:10 ` [PATCH 28/52] tools/perf/build: Split out feature check: 'on-exit' Ingo Molnar
2013-10-10  6:12   ` Namhyung Kim
2013-10-10  6:43     ` Ingo Molnar
2013-10-08 10:10 ` [PATCH 29/52] tools/perf/build: Split out feature check: 'backtrace' Ingo Molnar
2013-10-08 10:11 ` [PATCH 30/52] tools/perf: Clean up util/include/linux/compiler.h Ingo Molnar
2013-10-08 10:11 ` [PATCH 31/52] tools/perf: Turn strlcpy() into a __weak function Ingo Molnar
2013-10-08 10:11 ` [PATCH 32/52] tools/perf/build: Speed up auto-detection of features by adding a 'test-all' target Ingo Molnar
2013-10-08 15:51   ` Jiri Olsa
2013-10-09  6:47     ` Ingo Molnar
2013-10-10  6:19   ` Namhyung Kim
2013-10-10  7:24     ` Ingo Molnar
2013-10-10  8:28       ` Namhyung Kim
2013-10-08 10:11 ` [PATCH 33/52] tools/perf/build: Speed up git-version test on re-make Ingo Molnar
2013-10-08 10:11 ` [PATCH 34/52] tools/perf/build: Speed up the final link Ingo Molnar
2013-10-08 10:11 ` [PATCH 35/52] tools/perf: Fix double/triple-build of the feature detection logic during 'make install' et al Ingo Molnar
2013-10-08 10:11 ` [PATCH 36/52] tools/perf/build: Invoke feature-checks 'clean' target from the main Makefile Ingo Molnar
2013-10-08 10:11 ` [PATCH 37/52] tools/perf/build: Speed up auto-detection Ingo Molnar
2013-10-08 10:11 ` [PATCH 38/52] tools/perf/build: Improve printout-of auto-detected features Ingo Molnar
2013-10-08 10:11 ` [PATCH 39/52] tools/perf/build: Automatically build in parallel, based on number of CPUs in the system Ingo Molnar
2013-10-08 10:11 ` [PATCH 40/52] tools/perf/build: Flip Makefile.parallel and Makefile.perf Ingo Molnar
2013-10-08 10:11 ` [PATCH 41/52] tools/perf/build: Standardize the various messages output by parallel make Ingo Molnar
2013-10-08 10:11 ` [PATCH 42/52] tools/perf/build: Split out feature checks: 'liberty', 'liberty-z', 'cplus-demangle' Ingo Molnar
2013-10-08 10:11 ` [PATCH 43/52] tools/perf/build: Remove unused config/feature-tests.mak Ingo Molnar
2013-10-08 10:11 ` [PATCH 44/52] tools/perf/build: Clean up various testcases Ingo Molnar
2013-10-10  6:20   ` Namhyung Kim
2013-10-10  6:41     ` Ingo Molnar
2013-10-08 10:11 ` [PATCH 45/52] tools/perf/build: Collapse the test-all.c testcase Ingo Molnar
2013-10-08 10:11 ` [PATCH 46/52] tools/perf/build: Pass through all targets to Makefile.perf Ingo Molnar
2013-10-08 10:11 ` [PATCH 47/52] tools/perf/build: Make sure autodep feature binaries honor the O= setting Ingo Molnar
2013-10-08 10:11 ` [PATCH 48/52] tools/perf/build: Exclude MAKEFLAGS from nested invocation Ingo Molnar
2013-10-10  6:24   ` Namhyung Kim
2013-10-10  6:36     ` Ingo Molnar
2013-10-08 10:11 ` [PATCH 49/52] tools/perf/build: Fix non-canonical directory names in O= Ingo Molnar
2013-10-08 10:11 ` [PATCH 50/52] tools/perf/build: Fix O=/some/dir perf.o type of targets Ingo Molnar
2013-10-10  6:35   ` Namhyung Kim
2013-10-10  6:39     ` Ingo Molnar
2013-10-10  8:43       ` Namhyung Kim
2013-10-08 10:11 ` [PATCH 51/52] tools/perf/build: Harmonize the style of the feature testcases Ingo Molnar
2013-10-08 10:11 ` [PATCH 52/52] tools/perf/build: Pass through LDFLAGS to feature tests Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1381227082-22039-10-git-send-email-mingo@kernel.org \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).