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>
This commit is contained in:
parent
8295d4e272
commit
fb3d333b3f
|
@ -199,37 +199,38 @@ else
|
||||||
endif # NO_LIBELF
|
endif # NO_LIBELF
|
||||||
|
|
||||||
ifndef NO_LIBELF
|
ifndef NO_LIBELF
|
||||||
CFLAGS += -DHAVE_LIBELF_SUPPORT
|
CFLAGS += -DHAVE_LIBELF_SUPPORT
|
||||||
FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS)
|
FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS)
|
||||||
ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DHAVE_LIBELF_MMAP_SUPPORT),y)
|
|
||||||
|
ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DHAVE_LIBELF_MMAP_SUPPORT),y)
|
||||||
CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT
|
CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT
|
||||||
endif
|
endif
|
||||||
ifeq ($(call try-cc,$(SOURCE_ELF_GETPHDRNUM),$(FLAGS_LIBELF),-DHAVE_ELF_GETPHDRNUM_SUPPORT),y)
|
|
||||||
|
ifeq ($(call try-cc,$(SOURCE_ELF_GETPHDRNUM),$(FLAGS_LIBELF),-DHAVE_ELF_GETPHDRNUM_SUPPORT),y)
|
||||||
CFLAGS += -DHAVE_ELF_GETPHDRNUM_SUPPORT
|
CFLAGS += -DHAVE_ELF_GETPHDRNUM_SUPPORT
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# include ARCH specific config
|
# include ARCH specific config
|
||||||
-include $(src-perf)/arch/$(ARCH)/Makefile
|
-include $(src-perf)/arch/$(ARCH)/Makefile
|
||||||
|
|
||||||
ifndef NO_DWARF
|
ifndef NO_DWARF
|
||||||
ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined)
|
ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined)
|
||||||
msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled);
|
msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled);
|
||||||
NO_DWARF := 1
|
NO_DWARF := 1
|
||||||
else
|
else
|
||||||
CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS)
|
CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS)
|
||||||
LDFLAGS += $(LIBDW_LDFLAGS)
|
LDFLAGS += $(LIBDW_LDFLAGS)
|
||||||
EXTLIBS += -lelf -ldw
|
EXTLIBS += -lelf -ldw
|
||||||
endif # PERF_HAVE_DWARF_REGS
|
endif # PERF_HAVE_DWARF_REGS
|
||||||
endif # NO_DWARF
|
endif # NO_DWARF
|
||||||
|
|
||||||
endif # NO_LIBELF
|
endif # NO_LIBELF
|
||||||
|
|
||||||
ifndef NO_LIBELF
|
ifndef NO_LIBELF
|
||||||
CFLAGS += -DHAVE_LIBELF_SUPPORT
|
CFLAGS += -DHAVE_LIBELF_SUPPORT
|
||||||
FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS)
|
FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS)
|
||||||
ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DHAVE_LIBELF_MMAP_SUPPORT),y)
|
ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DHAVE_LIBELF_MMAP_SUPPORT),y)
|
||||||
CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT
|
CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT
|
||||||
endif # try-cc
|
endif # try-cc
|
||||||
endif # NO_LIBELF
|
endif # NO_LIBELF
|
||||||
|
|
||||||
# There's only x86 (both 32 and 64) support for CFI unwind so far
|
# There's only x86 (both 32 and 64) support for CFI unwind so far
|
||||||
|
|
Loading…
Reference in New Issue