diff options
-rw-r--r-- | tools/perf/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 64c6b7b57d85..65e6e52fe378 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -201,7 +201,14 @@ EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wold-style-definition | |||
201 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-prototypes | 201 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-prototypes |
202 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wdeclaration-after-statement | 202 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wdeclaration-after-statement |
203 | 203 | ||
204 | CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) | 204 | ifeq ("$(origin DEBUG)", "command line") |
205 | PERF_DEBUG = $(DEBUG) | ||
206 | endif | ||
207 | ifndef PERF_DEBUG | ||
208 | CFLAGS_OPTIMIZE = -O6 | ||
209 | endif | ||
210 | |||
211 | CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) | ||
205 | LDFLAGS = -lpthread -lrt -lelf -lm | 212 | LDFLAGS = -lpthread -lrt -lelf -lm |
206 | ALL_CFLAGS = $(CFLAGS) | 213 | ALL_CFLAGS = $(CFLAGS) |
207 | ALL_LDFLAGS = $(LDFLAGS) | 214 | ALL_LDFLAGS = $(LDFLAGS) |