Commit e12762cf authored by Ingo Molnar's avatar Ingo Molnar

tools/perf/build: Split out feature check: 'glibc'

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-nqnnsptw7ivOzhzbNjiun7ds@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 8f7f8005
...@@ -109,6 +109,7 @@ FEATURE_TESTS = \ ...@@ -109,6 +109,7 @@ FEATURE_TESTS = \
fortify-source \ fortify-source \
bionic \ bionic \
libelf \ libelf \
glibc \
libnuma libnuma
$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test))) $(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
...@@ -166,8 +167,7 @@ ifdef NO_LIBELF ...@@ -166,8 +167,7 @@ ifdef NO_LIBELF
NO_LIBUNWIND := 1 NO_LIBUNWIND := 1
else else
ifeq ($(feature-libelf), 0) ifeq ($(feature-libelf), 0)
FLAGS_GLIBC=$(CFLAGS) $(LDFLAGS) ifeq ($(feature-glibc), 1)
ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y)
LIBC_SUPPORT := 1 LIBC_SUPPORT := 1
endif endif
ifeq ($(BIONIC),1) ifeq ($(BIONIC),1)
......
...@@ -7,6 +7,7 @@ FILES= \ ...@@ -7,6 +7,7 @@ FILES= \
test-fortify-source \ test-fortify-source \
test-bionic \ test-bionic \
test-libelf \ test-libelf \
test-glibc \
test-libnuma test-libnuma
CC := $(CC) -MD CC := $(CC) -MD
...@@ -38,6 +39,9 @@ test-bionic: ...@@ -38,6 +39,9 @@ test-bionic:
test-libelf: test-libelf:
$(BUILD) -lelf $(BUILD) -lelf
test-glibc:
$(BUILD)
test-libnuma: test-libnuma:
$(BUILD) -lnuma $(BUILD) -lnuma
......
#include <gnu/libc-version.h>
int main(void)
{
const char *version = gnu_get_libc_version();
return (long)version;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment