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>
This commit is contained in:
parent
1ea6f99efd
commit
78e9d65508
@ -107,6 +107,7 @@ FEATURE_TESTS = \
|
|||||||
stackprotector \
|
stackprotector \
|
||||||
volatile-register-var \
|
volatile-register-var \
|
||||||
fortify-source \
|
fortify-source \
|
||||||
|
bionic \
|
||||||
libnuma
|
libnuma
|
||||||
|
|
||||||
$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
|
$(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
|
CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
|
||||||
|
|
||||||
ifndef NO_BIONIC
|
ifndef NO_BIONIC
|
||||||
ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y)
|
$(feature_check,bionic)
|
||||||
BIONIC := 1
|
ifeq ($(feature-bionic), 1)
|
||||||
EXTLIBS := $(filter-out -lrt,$(EXTLIBS))
|
BIONIC := 1
|
||||||
EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
|
EXTLIBS := $(filter-out -lrt,$(EXTLIBS))
|
||||||
|
EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif # NO_BIONIC
|
|
||||||
|
|
||||||
ifdef NO_LIBELF
|
ifdef NO_LIBELF
|
||||||
NO_DWARF := 1
|
NO_DWARF := 1
|
||||||
|
@ -5,6 +5,7 @@ FILES= \
|
|||||||
test-stackprotector \
|
test-stackprotector \
|
||||||
test-volatile-register-var \
|
test-volatile-register-var \
|
||||||
test-fortify-source \
|
test-fortify-source \
|
||||||
|
test-bionic \
|
||||||
test-libnuma
|
test-libnuma
|
||||||
|
|
||||||
CC := $(CC) -MD
|
CC := $(CC) -MD
|
||||||
@ -30,6 +31,9 @@ test-volatile-register-var:
|
|||||||
test-fortify-source:
|
test-fortify-source:
|
||||||
$(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
|
$(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
|
||||||
|
|
||||||
|
test-bionic:
|
||||||
|
$(BUILD)
|
||||||
|
|
||||||
test-libnuma:
|
test-libnuma:
|
||||||
$(BUILD) -lnuma
|
$(BUILD) -lnuma
|
||||||
|
|
||||||
|
6
tools/perf/config/feature-checks/test-bionic.c
Normal file
6
tools/perf/config/feature-checks/test-bionic.c
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include <android/api-level.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
return __ANDROID_API__;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user