Commit 01287e2c authored by Ingo Molnar's avatar Ingo Molnar Committed by Arnaldo Carvalho de Melo

tools/perf/build: Remove the volatile-register-var feature check

Namhyung Kim noticed that the volatile-register-var feature check
is superfluous:

 > The gcc manpage says this warning is enabled by -Wall, and we add -Wall
 > to CFLAGS before doing feature checks.  So all gcc versions that support
 > -Wvolatile-register-var enables it by default without this check and
 > older gcc versions will always fail the feature check.

Remove it - this will further speed up feature checks.
Reported-by: default avatarNamhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 5f36978c
...@@ -132,8 +132,7 @@ CORE_FEATURE_TESTS = \ ...@@ -132,8 +132,7 @@ CORE_FEATURE_TESTS = \
libunwind \ libunwind \
on-exit \ on-exit \
stackprotector \ stackprotector \
stackprotector-all \ stackprotector-all
volatile-register-var
# #
# So here we detect whether test-all was rebuilt, to be able # So here we detect whether test-all was rebuilt, to be able
...@@ -203,10 +202,6 @@ ifeq ($(feature-stackprotector), 1) ...@@ -203,10 +202,6 @@ ifeq ($(feature-stackprotector), 1)
CFLAGS += -Wstack-protector CFLAGS += -Wstack-protector
endif endif
ifeq ($(feature-volatile-register-var), 1)
CFLAGS += -Wvolatile-register-var
endif
ifeq ($(DEBUG),0) ifeq ($(DEBUG),0)
ifeq ($(feature-fortify-source), 1) ifeq ($(feature-fortify-source), 1)
CFLAGS += -D_FORTIFY_SOURCE=2 CFLAGS += -D_FORTIFY_SOURCE=2
......
...@@ -25,8 +25,7 @@ FILES= \ ...@@ -25,8 +25,7 @@ FILES= \
test-libunwind \ test-libunwind \
test-on-exit \ test-on-exit \
test-stackprotector-all \ test-stackprotector-all \
test-stackprotector \ test-stackprotector
test-volatile-register-var
CC := $(CC) -MD CC := $(CC) -MD
...@@ -37,7 +36,7 @@ BUILD = $(CC) $(LDFLAGS) -o $(OUTPUT)$@ $@.c ...@@ -37,7 +36,7 @@ BUILD = $(CC) $(LDFLAGS) -o $(OUTPUT)$@ $@.c
############################### ###############################
test-all: test-all:
$(BUILD) -Werror -fstack-protector -fstack-protector-all -Wvolatile-register-var -O2 -Werror -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lunwind -lunwind-x86_64 -lelf -laudit -I/usr/include/slang -lslang $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl $(BUILD) -Werror -fstack-protector -fstack-protector-all -O2 -Werror -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lunwind -lunwind-x86_64 -lelf -laudit -I/usr/include/slang -lslang $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl
test-hello: test-hello:
$(BUILD) $(BUILD)
...@@ -48,9 +47,6 @@ test-stackprotector-all: ...@@ -48,9 +47,6 @@ test-stackprotector-all:
test-stackprotector: test-stackprotector:
$(BUILD) -Werror -fstack-protector $(BUILD) -Werror -fstack-protector
test-volatile-register-var:
$(BUILD) -Werror -Wvolatile-register-var
test-fortify-source: test-fortify-source:
$(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2 $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
......
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