diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-09-30 08:11:46 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-09 02:48:33 -0400 |
commit | 78e9d6550807aedfc1f81c199bd4681c09d80ac5 (patch) | |
tree | 54b634afe96893a4c5c23bfaf3676484f84db50b | |
parent | 1ea6f99efd8ae61fce68c97a9cf9f722cfbca3ad (diff) |
tools/perf/build: Split out feature check: 'bionic'
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>
-rw-r--r-- | tools/perf/config/Makefile | 12 | ||||
-rw-r--r-- | tools/perf/config/feature-checks/Makefile | 4 | ||||
-rw-r--r-- | 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 7a614f92ce8c..09e2ecc4b056 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -107,6 +107,7 @@ FEATURE_TESTS = \ | |||
107 | stackprotector \ | 107 | stackprotector \ |
108 | volatile-register-var \ | 108 | volatile-register-var \ |
109 | fortify-source \ | 109 | fortify-source \ |
110 | bionic \ | ||
110 | libnuma | 111 | libnuma |
111 | 112 | ||
112 | $(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test))) | 113 | $(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test))) |
@@ -150,12 +151,13 @@ CFLAGS += -I$(LIB_INCLUDE) | |||
150 | CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE | 151 | CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE |
151 | 152 | ||
152 | ifndef NO_BIONIC | 153 | ifndef NO_BIONIC |
153 | ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y) | 154 | $(feature_check,bionic) |
154 | BIONIC := 1 | 155 | ifeq ($(feature-bionic), 1) |
155 | EXTLIBS := $(filter-out -lrt,$(EXTLIBS)) | 156 | BIONIC := 1 |
156 | EXTLIBS := $(filter-out -lpthread,$(EXTLIBS)) | 157 | EXTLIBS := $(filter-out -lrt,$(EXTLIBS)) |
158 | EXTLIBS := $(filter-out -lpthread,$(EXTLIBS)) | ||
159 | endif | ||
157 | endif | 160 | endif |
158 | endif # NO_BIONIC | ||
159 | 161 | ||
160 | ifdef NO_LIBELF | 162 | ifdef NO_LIBELF |
161 | NO_DWARF := 1 | 163 | NO_DWARF := 1 |
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile index 529317e6009b..191df97a031d 100644 --- a/tools/perf/config/feature-checks/Makefile +++ b/tools/perf/config/feature-checks/Makefile | |||
@@ -5,6 +5,7 @@ FILES= \ | |||
5 | test-stackprotector \ | 5 | test-stackprotector \ |
6 | test-volatile-register-var \ | 6 | test-volatile-register-var \ |
7 | test-fortify-source \ | 7 | test-fortify-source \ |
8 | test-bionic \ | ||
8 | test-libnuma | 9 | test-libnuma |
9 | 10 | ||
10 | CC := $(CC) -MD | 11 | CC := $(CC) -MD |
@@ -30,6 +31,9 @@ test-volatile-register-var: | |||
30 | test-fortify-source: | 31 | test-fortify-source: |
31 | $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2 | 32 | $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2 |
32 | 33 | ||
34 | test-bionic: | ||
35 | $(BUILD) | ||
36 | |||
33 | test-libnuma: | 37 | test-libnuma: |
34 | $(BUILD) -lnuma | 38 | $(BUILD) -lnuma |
35 | 39 | ||
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 000000000000..eac24e9513eb --- /dev/null +++ b/tools/perf/config/feature-checks/test-bionic.c | |||
@@ -0,0 +1,6 @@ | |||
1 | #include <android/api-level.h> | ||
2 | |||
3 | int main(void) | ||
4 | { | ||
5 | return __ANDROID_API__; | ||
6 | } | ||