Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: Remove stackprotector feature check

We use -fstack-protector-all option to enable stack protecting for all
available functions. There's no reason for enabling -Wstack-protector to
get warning for unprotected functions.

Removing stackprotector feature check which was used to enable the
-Wstack-protector option.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1386076182-14484-2-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Jiri Olsa and committed by
Arnaldo Carvalho de Melo
e6d7cee1 906049c8

+1 -16
-5
tools/perf/config/Makefile
··· 141 141 libslang \ 142 142 libunwind \ 143 143 on-exit \ 144 - stackprotector \ 145 144 stackprotector-all \ 146 145 timerfd 147 146 ··· 206 207 207 208 ifeq ($(feature-stackprotector-all), 1) 208 209 CFLAGS += -fstack-protector-all 209 - endif 210 - 211 - ifeq ($(feature-stackprotector), 1) 212 - CFLAGS += -Wstack-protector 213 210 endif 214 211 215 212 ifeq ($(DEBUG),0)
+1 -5
tools/perf/config/feature-checks/Makefile
··· 26 26 test-libunwind-debug-frame \ 27 27 test-on-exit \ 28 28 test-stackprotector-all \ 29 - test-stackprotector \ 30 29 test-timerfd 31 30 32 31 CC := $(CC) -MD ··· 37 38 ############################### 38 39 39 40 test-all: 40 - $(BUILD) -Werror -fstack-protector -fstack-protector-all -O2 -Werror -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma $(LIBUNWIND_LIBS) -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 41 + $(BUILD) -Werror -fstack-protector-all -O2 -Werror -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma $(LIBUNWIND_LIBS) -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 41 42 42 43 test-hello: 43 44 $(BUILD) 44 45 45 46 test-stackprotector-all: 46 47 $(BUILD) -Werror -fstack-protector-all 47 - 48 - test-stackprotector: 49 - $(BUILD) -Werror -fstack-protector -Wstack-protector 50 48 51 49 test-fortify-source: 52 50 $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
-6
tools/perf/config/feature-checks/test-stackprotector.c
··· 1 - #include <stdio.h> 2 - 3 - int main(void) 4 - { 5 - return puts("hi"); 6 - }