aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-10-17 03:58:25 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-17 03:58:25 -0400
commitbb3c3e807140816b5f5fd4840473ee52a916ad4f (patch)
tree9e8a69d266a7df86ca16177eefffab4b4e910753 /tools/perf/Makefile
parent595c36490deb49381dc51231a3d5e6b66786ed27 (diff)
parent012abeea669ea49636cf952d13298bb68654146a (diff)
Merge commit 'v2.6.32-rc5' into perf/probes
Conflicts: kernel/trace/trace_event_profile.c Merge reason: update to -rc5 and resolve conflict. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile23
1 files changed, 15 insertions, 8 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 1abbf9a5ee57..1811a7015f9c 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -157,11 +157,18 @@ uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
157uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') 157uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
158uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') 158uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
159 159
160# If we're on a 64-bit kernel, use -m64 160#
161ifndef NO_64BIT 161# Add -m32 for cross-builds:
162 ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M)) 162#
163 M64 := -m64 163ifdef NO_64BIT
164 endif 164 MBITS := -m32
165else
166 #
167 # If we're on a 64-bit kernel, use -m64:
168 #
169 ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
170 MBITS := -m64
171 endif
165endif 172endif
166 173
167# CFLAGS and LDFLAGS are for the users to override from the command line. 174# CFLAGS and LDFLAGS are for the users to override from the command line.
@@ -194,7 +201,7 @@ EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wold-style-definition
194EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-prototypes 201EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-prototypes
195EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wdeclaration-after-statement 202EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wdeclaration-after-statement
196 203
197CFLAGS = $(M64) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) 204CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS)
198LDFLAGS = -lpthread -lrt -lelf -lm 205LDFLAGS = -lpthread -lrt -lelf -lm
199ALL_CFLAGS = $(CFLAGS) 206ALL_CFLAGS = $(CFLAGS)
200ALL_LDFLAGS = $(LDFLAGS) 207ALL_LDFLAGS = $(LDFLAGS)
@@ -418,7 +425,7 @@ ifeq ($(uname_S),Darwin)
418endif 425endif
419 426
420ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) 427ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
421 msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel); 428 msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]);
422endif 429endif
423 430
424ifneq ($(shell sh -c "(echo '\#include <libdwarf/dwarf.h>'; echo '\#include <libdwarf/libdwarf.h>'; echo 'int main(void) { Dwarf_Debug dbg; Dwarf_Error err; Dwarf_Ranges *rng; dwarf_init(0, DW_DLC_READ, 0, 0, &dbg, &err); dwarf_get_ranges(dbg, 0, &rng, 0, 0, &err); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -ldwarf -lelf -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) 431ifneq ($(shell sh -c "(echo '\#include <libdwarf/dwarf.h>'; echo '\#include <libdwarf/libdwarf.h>'; echo 'int main(void) { Dwarf_Debug dbg; Dwarf_Error err; Dwarf_Ranges *rng; dwarf_init(0, DW_DLC_READ, 0, 0, &dbg, &err); dwarf_get_ranges(dbg, 0, &rng, 0, 0, &err); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -ldwarf -lelf -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
@@ -739,7 +746,7 @@ $(BUILT_INS): perf$X
739common-cmds.h: util/generate-cmdlist.sh command-list.txt 746common-cmds.h: util/generate-cmdlist.sh command-list.txt
740 747
741common-cmds.h: $(wildcard Documentation/perf-*.txt) 748common-cmds.h: $(wildcard Documentation/perf-*.txt)
742 $(QUIET_GEN)util/generate-cmdlist.sh > $@+ && mv $@+ $@ 749 $(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@
743 750
744$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh 751$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
745 $(QUIET_GEN)$(RM) $@ $@+ && \ 752 $(QUIET_GEN)$(RM) $@ $@+ && \