aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-09-30 07:58:12 -0400
committerIngo Molnar <mingo@kernel.org>2013-10-09 02:48:32 -0400
commitc25104452de94102810e86323eabb7d9a4cad083 (patch)
tree2ec473fbc06a63c9ea88d601764a40b2c8b4e5c9
parent430be5ab0a50a9116c689b2b2ea7acd7a635aabe (diff)
tools/perf/build: Split out feature check: 'volatile-register-var'
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-5dOevlybbwvbk3zTbcxrrqet@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--tools/perf/config/Makefile3
-rw-r--r--tools/perf/config/feature-checks/Makefile4
-rw-r--r--tools/perf/config/feature-checks/test-volatile-register-var.c6
3 files changed, 12 insertions, 1 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 9f94912ccf63..a3de2f8bd61a 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -105,6 +105,7 @@ FEATURE_TESTS = \
105 hello \ 105 hello \
106 stackprotector-all \ 106 stackprotector-all \
107 stackprotector \ 107 stackprotector \
108 volatile-register-var \
108 libnuma 109 libnuma
109 110
110$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test))) 111$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
@@ -117,7 +118,7 @@ ifeq ($(feature-stackprotector), 1)
117 CFLAGS += -Wstack-protector 118 CFLAGS += -Wstack-protector
118endif 119endif
119 120
120ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wvolatile-register-var,-Wvolatile-register-var),y) 121ifeq ($(feature-volatile-register-var), 1)
121 CFLAGS += -Wvolatile-register-var 122 CFLAGS += -Wvolatile-register-var
122endif 123endif
123 124
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index 46b7650983cb..5693299b4806 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -3,6 +3,7 @@ FILES= \
3 test-hello \ 3 test-hello \
4 test-stackprotector-all \ 4 test-stackprotector-all \
5 test-stackprotector \ 5 test-stackprotector \
6 test-volatile-register-var \
6 test-libnuma 7 test-libnuma
7 8
8CC := $(CC) -MD 9CC := $(CC) -MD
@@ -22,6 +23,9 @@ test-stackprotector-all:
22test-stackprotector: 23test-stackprotector:
23 $(BUILD) -Werror -fstack-protector 24 $(BUILD) -Werror -fstack-protector
24 25
26test-volatile-register-var:
27 $(BUILD) -Werror -Wvolatile-register-var
28
25test-libnuma: 29test-libnuma:
26 $(BUILD) -lnuma 30 $(BUILD) -lnuma
27 31
diff --git a/tools/perf/config/feature-checks/test-volatile-register-var.c b/tools/perf/config/feature-checks/test-volatile-register-var.c
new file mode 100644
index 000000000000..c9f398d87868
--- /dev/null
+++ b/tools/perf/config/feature-checks/test-volatile-register-var.c
@@ -0,0 +1,6 @@
1#include <stdio.h>
2
3int main(void)
4{
5 return puts("hi");
6}