diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index e8346f95fbb0..714db7327b94 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -157,9 +157,14 @@ uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') | |||
157 | uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') | 157 | uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') |
158 | uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') | 158 | uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') |
159 | 159 | ||
160 | # If we're on a 64-bit kernel, use -m64 | ||
161 | ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M)) | ||
162 | M64 := -m64 | ||
163 | endif | ||
164 | |||
160 | # CFLAGS and LDFLAGS are for the users to override from the command line. | 165 | # CFLAGS and LDFLAGS are for the users to override from the command line. |
161 | 166 | ||
162 | CFLAGS = -ggdb3 -Wall -Werror -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -std=gnu99 -Wdeclaration-after-statement -O6 | 167 | CFLAGS = $(M64) -ggdb3 -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -std=gnu99 -Wdeclaration-after-statement -O6 |
163 | LDFLAGS = -lpthread -lrt -lelf -lm | 168 | LDFLAGS = -lpthread -lrt -lelf -lm |
164 | ALL_CFLAGS = $(CFLAGS) | 169 | ALL_CFLAGS = $(CFLAGS) |
165 | ALL_LDFLAGS = $(LDFLAGS) | 170 | ALL_LDFLAGS = $(LDFLAGS) |