diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2010-03-22 12:10:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-22 13:47:35 -0400 |
commit | ca721e45b39209415d2288dbac3667b26d9d1def (patch) | |
tree | d288d047b1099164e58f432804e7ad6bba6973b2 /tools/perf | |
parent | 4b4da7f76660ea8b5aa45615165c48f62167ffa8 (diff) |
perf probe: Add NO_DWARF make option
Add NO_DWARF make option for testing build without libdw.
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-3-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index c9918182715a..690364577611 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -150,6 +150,8 @@ all:: | |||
150 | # Define LDFLAGS=-static to build a static binary. | 150 | # Define LDFLAGS=-static to build a static binary. |
151 | # | 151 | # |
152 | # Define EXTRA_CFLAGS=-m64 or EXTRA_CFLAGS=-m32 as appropriate for cross-builds. | 152 | # Define EXTRA_CFLAGS=-m64 or EXTRA_CFLAGS=-m32 as appropriate for cross-builds. |
153 | # | ||
154 | # Define NO_DWARF if you do not want debug-info analysis feature at all. | ||
153 | 155 | ||
154 | PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE | 156 | PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE |
155 | @$(SHELL_PATH) util/PERF-VERSION-GEN | 157 | @$(SHELL_PATH) util/PERF-VERSION-GEN |
@@ -507,10 +509,12 @@ endif | |||
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) | 509 | 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); | 510 | msg := $(warning No libdw.h found or old libdw.h found, disables dwarf support. Please install elfutils-devel/elfutils-dev); |
509 | else | 511 | else |
512 | ifndef NO_DWARF | ||
510 | BASIC_CFLAGS += -I/usr/include/elfutils -DDWARF_SUPPORT | 513 | BASIC_CFLAGS += -I/usr/include/elfutils -DDWARF_SUPPORT |
511 | EXTLIBS += -lelf -ldw | 514 | EXTLIBS += -lelf -ldw |
512 | LIB_OBJS += util/probe-finder.o | 515 | LIB_OBJS += util/probe-finder.o |
513 | endif | 516 | endif |
517 | endif | ||
514 | 518 | ||
515 | ifneq ($(shell sh -c "(echo '\#include <newt.h>'; echo 'int main(void) { newtInit(); newtCls(); return newtFinished(); }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -lnewt -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) | 519 | ifneq ($(shell sh -c "(echo '\#include <newt.h>'; echo 'int main(void) { newtInit(); newtCls(); return newtFinished(); }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -lnewt -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) |
516 | msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev); | 520 | msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev); |