diff options
author | Robert Morell <rmorell@nvidia.com> | 2010-11-16 17:16:33 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-11-19 13:38:04 -0500 |
commit | a71123977eb3c72dd5a8bac723b13faf9cdd2828 (patch) | |
tree | d806daf538d2bc3c9539c1642277050892026f58 /tools/perf/Makefile | |
parent | f5b4a9c3ab53d544a540a6f3a5d17184e374d91a (diff) |
perf tools: Remove hardcoded include paths for elfutils
This change removes the use of hardcoded absolute "/usr/include/elfutils" paths
from the perf build. The problem with hardcoded paths is that it prevents them
from being overridden by $prefix or by -I in CFLAGS (e.g., for cross-compiling
purposes).
Instead, just include the "elfutils/" subdirectory as a relative path when
files are needed from that directory.
Tested by building perf:
- Cross-compiled for ARM on x86_64
- Built natively on x86_64
- Built on x86_64 with /usr/include/elfutils moved to another location
and manually included in CFLAGS
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
LKML-Reference: <1289945793-31441-1-git-send-email-rmorell@nvidia.com>
Signed-off-by: Robert Morell <rmorell@nvidia.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index d1db0f676a4..74b684da8f1 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -507,7 +507,7 @@ PERFLIBS = $(LIB_FILE) | |||
507 | -include config.mak | 507 | -include config.mak |
508 | 508 | ||
509 | ifndef NO_DWARF | 509 | ifndef NO_DWARF |
510 | FLAGS_DWARF=$(ALL_CFLAGS) -I/usr/include/elfutils -ldw -lelf $(ALL_LDFLAGS) $(EXTLIBS) | 510 | FLAGS_DWARF=$(ALL_CFLAGS) -ldw -lelf $(ALL_LDFLAGS) $(EXTLIBS) |
511 | ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF)),y) | 511 | ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF)),y) |
512 | msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev); | 512 | msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev); |
513 | NO_DWARF := 1 | 513 | NO_DWARF := 1 |
@@ -554,7 +554,7 @@ ifndef NO_DWARF | |||
554 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) | 554 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) |
555 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); | 555 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); |
556 | else | 556 | else |
557 | BASIC_CFLAGS += -I/usr/include/elfutils -DDWARF_SUPPORT | 557 | BASIC_CFLAGS += -DDWARF_SUPPORT |
558 | EXTLIBS += -lelf -ldw | 558 | EXTLIBS += -lelf -ldw |
559 | LIB_OBJS += $(OUTPUT)util/probe-finder.o | 559 | LIB_OBJS += $(OUTPUT)util/probe-finder.o |
560 | endif # PERF_HAVE_DWARF_REGS | 560 | endif # PERF_HAVE_DWARF_REGS |