diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2010-03-22 12:10:26 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-22 13:47:35 -0400 |
commit | 4b4da7f76660ea8b5aa45615165c48f62167ffa8 (patch) | |
tree | 927274cf9fe9fca657983f4a5d3d3a91a40a051b /tools/perf/Makefile | |
parent | f3a1f0ea9432ec395cd112f42201e8e523c07bc5 (diff) |
perf probe: Cleanup debuginfo related code
Cleanup debuginfo related code to eliminate fragile code which
pointed by Ingo (Thanks!).
1) Invert logic of NO_DWARF_SUPPORT to DWARF_SUPPORT.
2) For removing assymetric/local variable ifdefs, introduce
more helper functions.
3) Change options order to reduce the number of ifdefs.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1269274229-20442-2-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 0abd25ee595f..c9918182715a 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -506,9 +506,8 @@ endif | |||
506 | 506 | ||
507 | ifneq ($(shell sh -c "(echo '\#include <dwarf.h>'; echo '\#include <libdw.h>'; echo 'int main(void) { Dwarf *dbg; dbg = dwarf_begin(0, DWARF_C_READ); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/elfutils -ldw -lelf -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) | 507 | ifneq ($(shell sh -c "(echo '\#include <dwarf.h>'; echo '\#include <libdw.h>'; echo 'int main(void) { Dwarf *dbg; dbg = dwarf_begin(0, DWARF_C_READ); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/elfutils -ldw -lelf -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) |
508 | msg := $(warning No libdw.h found or old libdw.h found, disables dwarf support. Please install elfutils-devel/elfutils-dev); | 508 | msg := $(warning No libdw.h found or old libdw.h found, disables dwarf support. Please install elfutils-devel/elfutils-dev); |
509 | BASIC_CFLAGS += -DNO_DWARF_SUPPORT | ||
510 | else | 509 | else |
511 | BASIC_CFLAGS += -I/usr/include/elfutils | 510 | BASIC_CFLAGS += -I/usr/include/elfutils -DDWARF_SUPPORT |
512 | EXTLIBS += -lelf -ldw | 511 | EXTLIBS += -lelf -ldw |
513 | LIB_OBJS += util/probe-finder.o | 512 | LIB_OBJS += util/probe-finder.o |
514 | endif | 513 | endif |