diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-22 16:29:53 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-22 16:29:53 -0500 |
commit | 065bef5af620dcedeb6dc26fdc0b1739a3c9adef (patch) | |
tree | 8ee2e93b30bcec3b9aa5bfb1abeb43c17fc9e2f9 /tools | |
parent | 5c7a66822c8b619966d9367594054778608fc5d1 (diff) |
perf tools: Fix build by checking if extra warnings are supported
The -Wstack-protector and -Wvolatile-register-var warnings, for
instance, are not supported by gcc 3.4.6.
So fix by doing the same check we already do for -fstack-protector-all.
With this and the other patches in this series, perf builds unmodified
on, for instance, RHEL4.
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 2b5387d53ba5..7141c42e1469 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -204,13 +204,11 @@ EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wshadow | |||
204 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Winit-self | 204 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Winit-self |
205 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wpacked | 205 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wpacked |
206 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wredundant-decls | 206 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wredundant-decls |
207 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstack-protector | ||
208 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-aliasing=3 | 207 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-aliasing=3 |
209 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wswitch-default | 208 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wswitch-default |
210 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wswitch-enum | 209 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wswitch-enum |
211 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wno-system-headers | 210 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wno-system-headers |
212 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wundef | 211 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wundef |
213 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wvolatile-register-var | ||
214 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wwrite-strings | 212 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wwrite-strings |
215 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wbad-function-cast | 213 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wbad-function-cast |
216 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wmissing-declarations | 214 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wmissing-declarations |
@@ -294,6 +292,13 @@ ifeq ($(call try-cc,$(SOURCE_HELLO),-Werror -fstack-protector-all),y) | |||
294 | CFLAGS := $(CFLAGS) -fstack-protector-all | 292 | CFLAGS := $(CFLAGS) -fstack-protector-all |
295 | endif | 293 | endif |
296 | 294 | ||
295 | ifeq ($(call try-cc,$(SOURCE_HELLO),-Werror -Wstack-protector),y) | ||
296 | CFLAGS := $(CFLAGS) -Wstack-protector | ||
297 | endif | ||
298 | |||
299 | ifeq ($(call try-cc,$(SOURCE_HELLO),-Werror -Wvolatile-register-var),y) | ||
300 | CFLAGS := $(CFLAGS) -Wvolatile-register-var | ||
301 | endif | ||
297 | 302 | ||
298 | ### --- END CONFIGURATION SECTION --- | 303 | ### --- END CONFIGURATION SECTION --- |
299 | 304 | ||