diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-10-07 04:05:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-09 02:48:36 -0400 |
commit | fb3d333b3faa6bf975f00973c6a6271b2ab93c0c (patch) | |
tree | c38db3ee1e1d67daed34bdccb79b3f0d03e04e3d | |
parent | 8295d4e27262dc49177e70dcc8ba34fa26343cf2 (diff) |
tools/perf/build: Clean up the mmap logic in config/Makefile
Nest the rules properly. No change in functionality.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-wwktuHl4Ra5lyrrretkxmxqf@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | tools/perf/config/Makefile | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 89630b8c8d59..8a27de27f7c2 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -199,37 +199,38 @@ else | |||
199 | endif # NO_LIBELF | 199 | endif # NO_LIBELF |
200 | 200 | ||
201 | ifndef NO_LIBELF | 201 | ifndef NO_LIBELF |
202 | CFLAGS += -DHAVE_LIBELF_SUPPORT | 202 | CFLAGS += -DHAVE_LIBELF_SUPPORT |
203 | FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) | 203 | FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) |
204 | ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DHAVE_LIBELF_MMAP_SUPPORT),y) | ||
205 | CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT | ||
206 | endif | ||
207 | ifeq ($(call try-cc,$(SOURCE_ELF_GETPHDRNUM),$(FLAGS_LIBELF),-DHAVE_ELF_GETPHDRNUM_SUPPORT),y) | ||
208 | CFLAGS += -DHAVE_ELF_GETPHDRNUM_SUPPORT | ||
209 | endif | ||
210 | 204 | ||
211 | # include ARCH specific config | 205 | ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DHAVE_LIBELF_MMAP_SUPPORT),y) |
212 | -include $(src-perf)/arch/$(ARCH)/Makefile | 206 | CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT |
207 | endif | ||
213 | 208 | ||
214 | ifndef NO_DWARF | 209 | ifeq ($(call try-cc,$(SOURCE_ELF_GETPHDRNUM),$(FLAGS_LIBELF),-DHAVE_ELF_GETPHDRNUM_SUPPORT),y) |
215 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) | 210 | CFLAGS += -DHAVE_ELF_GETPHDRNUM_SUPPORT |
216 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); | 211 | endif |
217 | NO_DWARF := 1 | 212 | |
218 | else | 213 | # include ARCH specific config |
219 | CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) | 214 | -include $(src-perf)/arch/$(ARCH)/Makefile |
220 | LDFLAGS += $(LIBDW_LDFLAGS) | ||
221 | EXTLIBS += -lelf -ldw | ||
222 | endif # PERF_HAVE_DWARF_REGS | ||
223 | endif # NO_DWARF | ||
224 | 215 | ||
216 | ifndef NO_DWARF | ||
217 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) | ||
218 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); | ||
219 | NO_DWARF := 1 | ||
220 | else | ||
221 | CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) | ||
222 | LDFLAGS += $(LIBDW_LDFLAGS) | ||
223 | EXTLIBS += -lelf -ldw | ||
224 | endif # PERF_HAVE_DWARF_REGS | ||
225 | endif # NO_DWARF | ||
225 | endif # NO_LIBELF | 226 | endif # NO_LIBELF |
226 | 227 | ||
227 | ifndef NO_LIBELF | 228 | ifndef NO_LIBELF |
228 | CFLAGS += -DHAVE_LIBELF_SUPPORT | 229 | CFLAGS += -DHAVE_LIBELF_SUPPORT |
229 | FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) | 230 | FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) |
230 | ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DHAVE_LIBELF_MMAP_SUPPORT),y) | 231 | ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DHAVE_LIBELF_MMAP_SUPPORT),y) |
231 | CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT | 232 | CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT |
232 | endif # try-cc | 233 | endif # try-cc |
233 | endif # NO_LIBELF | 234 | endif # NO_LIBELF |
234 | 235 | ||
235 | # There's only x86 (both 32 and 64) support for CFI unwind so far | 236 | # There's only x86 (both 32 and 64) support for CFI unwind so far |