diff options
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index fce4c3f051ef..3ef6621bf6cd 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -148,6 +148,8 @@ all:: | |||
148 | # broken, or spawning external process is slower than built-in grep perf has). | 148 | # broken, or spawning external process is slower than built-in grep perf has). |
149 | # | 149 | # |
150 | # Define LDFLAGS=-static to build a static binary. | 150 | # Define LDFLAGS=-static to build a static binary. |
151 | # | ||
152 | # Define EXTRA_CFLAGS=-m64 or EXTRA_CFLAGS=-m32 as appropriate for cross-builds. | ||
151 | 153 | ||
152 | PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE | 154 | PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE |
153 | @$(SHELL_PATH) util/PERF-VERSION-GEN | 155 | @$(SHELL_PATH) util/PERF-VERSION-GEN |
@@ -160,22 +162,6 @@ uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') | |||
160 | uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') | 162 | uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') |
161 | uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') | 163 | uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') |
162 | 164 | ||
163 | # | ||
164 | # Add -m32 for cross-builds: | ||
165 | # | ||
166 | ifdef NO_64BIT | ||
167 | MBITS := -m32 | ||
168 | else | ||
169 | # | ||
170 | # If we're on a 64-bit kernel (except ia64), use -m64: | ||
171 | # | ||
172 | ifneq ($(uname_M),ia64) | ||
173 | ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M)) | ||
174 | MBITS := -m64 | ||
175 | endif | ||
176 | endif | ||
177 | endif | ||
178 | |||
179 | # 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. |
180 | 166 | ||
181 | # | 167 | # |
@@ -212,7 +198,7 @@ ifndef PERF_DEBUG | |||
212 | CFLAGS_OPTIMIZE = -O6 | 198 | CFLAGS_OPTIMIZE = -O6 |
213 | endif | 199 | endif |
214 | 200 | ||
215 | CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) | 201 | CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) |
216 | EXTLIBS = -lpthread -lrt -lelf -lm | 202 | EXTLIBS = -lpthread -lrt -lelf -lm |
217 | ALL_CFLAGS = $(CFLAGS) | 203 | ALL_CFLAGS = $(CFLAGS) |
218 | ALL_LDFLAGS = $(LDFLAGS) | 204 | ALL_LDFLAGS = $(LDFLAGS) |