forked from Minki/linux
0a4f2b6a3b
Factor NO_LIBDW_DWARF_UNWIND makefile variable and code that selects default DWARf post unwinder based on detected features (libdw and libunwind support) If both are detected the libunwind is selected as default. Simple 'make' will try to add: - libunwind unwinder if present - libdw unwinder if present - disable dwarf unwind if non of libunwind and libdw libraries are present If one of the DWARF unwind libraries is detected, message is displayed which one (libunwind/libdw) is compiled in. Examples: - compile in libdw unwinder if present: $ make NO_LIBUNWIND=1 - compile in libdw (with libdw installation directory) unwinder if present: $ make LIBDW_DIR=/opt/elfutils/ NO_LIBUNWIND=1 BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ on ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... DWARF post unwind library: libdw - disable post dwarf unwind completely: $ make NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1 BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ on ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... DWARF post unwind library: libunwind Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jean Pihet <jean.pihet@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1392825179-5228-6-git-send-email-jolsa@redhat.com [ Add suggestion about setting LIBDW_DIR when not finding libdw ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
18 lines
535 B
Makefile
18 lines
535 B
Makefile
ifndef NO_DWARF
|
|
PERF_HAVE_DWARF_REGS := 1
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o
|
|
endif
|
|
ifndef NO_LIBUNWIND
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libunwind.o
|
|
endif
|
|
ifndef NO_LIBDW_DWARF_UNWIND
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libdw.o
|
|
endif
|
|
ifndef NO_DWARF_UNWIND
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/regs_load.o
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/dwarf-unwind.o
|
|
endif
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/header.o
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/tsc.o
|
|
LIB_H += arch/$(ARCH)/util/tsc.h
|