aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/config/Makefile4
-rw-r--r--tools/perf/config/feature-checks/Makefile4
-rw-r--r--tools/perf/config/feature-checks/test-glibc.c8
3 files changed, 14 insertions, 2 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 68654281b973..8cd0fd82967c 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -109,6 +109,7 @@ FEATURE_TESTS = \
109 fortify-source \ 109 fortify-source \
110 bionic \ 110 bionic \
111 libelf \ 111 libelf \
112 glibc \
112 libnuma 113 libnuma
113 114
114$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test))) 115$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
@@ -166,8 +167,7 @@ ifdef NO_LIBELF
166 NO_LIBUNWIND := 1 167 NO_LIBUNWIND := 1
167else 168else
168 ifeq ($(feature-libelf), 0) 169 ifeq ($(feature-libelf), 0)
169 FLAGS_GLIBC=$(CFLAGS) $(LDFLAGS) 170 ifeq ($(feature-glibc), 1)
170 ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y)
171 LIBC_SUPPORT := 1 171 LIBC_SUPPORT := 1
172 endif 172 endif
173 ifeq ($(BIONIC),1) 173 ifeq ($(BIONIC),1)
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index 789a38d21a34..c0569c7edb89 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -7,6 +7,7 @@ FILES= \
7 test-fortify-source \ 7 test-fortify-source \
8 test-bionic \ 8 test-bionic \
9 test-libelf \ 9 test-libelf \
10 test-glibc \
10 test-libnuma 11 test-libnuma
11 12
12CC := $(CC) -MD 13CC := $(CC) -MD
@@ -38,6 +39,9 @@ test-bionic:
38test-libelf: 39test-libelf:
39 $(BUILD) -lelf 40 $(BUILD) -lelf
40 41
42test-glibc:
43 $(BUILD)
44
41test-libnuma: 45test-libnuma:
42 $(BUILD) -lnuma 46 $(BUILD) -lnuma
43 47
diff --git a/tools/perf/config/feature-checks/test-glibc.c b/tools/perf/config/feature-checks/test-glibc.c
new file mode 100644
index 000000000000..13c66a58f2ec
--- /dev/null
+++ b/tools/perf/config/feature-checks/test-glibc.c
@@ -0,0 +1,8 @@
1#include <gnu/libc-version.h>
2
3int main(void)
4{
5 const char *version = gnu_get_libc_version();
6 return (long)version;
7}
8