aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-11-17 04:16:43 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-17 04:17:47 -0500
commita7b63425a41cd6a8d50f76fef0660c5110f97e91 (patch)
treebe17ee121f1c8814d8d39c9f3e0205d9397fab54 /tools/perf/Makefile
parent35039eb6b199749943547c8572be6604edf00229 (diff)
parent3726cc75e581c157202da93bb2333cce25c15c98 (diff)
Merge branch 'perf/core' into perf/probes
Resolved merge conflict in tools/perf/Makefile Merge reason: we want to queue up a dependent patch. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile27
1 files changed, 22 insertions, 5 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 147e3cf035d3..3dbb5c5bb8c6 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -177,8 +177,7 @@ endif
177# Include saner warnings here, which can catch bugs: 177# Include saner warnings here, which can catch bugs:
178# 178#
179 179
180EXTRA_WARNINGS := -Wcast-align 180EXTRA_WARNINGS := -Wformat
181EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wformat
182EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wformat-security 181EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wformat-security
183EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wformat-y2k 182EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wformat-y2k
184EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wshadow 183EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wshadow
@@ -208,7 +207,7 @@ ifndef PERF_DEBUG
208 CFLAGS_OPTIMIZE = -O6 207 CFLAGS_OPTIMIZE = -O6
209endif 208endif
210 209
211CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) 210CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS)
212LDFLAGS = -lpthread -lrt -lelf -lm 211LDFLAGS = -lpthread -lrt -lelf -lm
213ALL_CFLAGS = $(CFLAGS) 212ALL_CFLAGS = $(CFLAGS)
214ALL_LDFLAGS = $(LDFLAGS) 213ALL_LDFLAGS = $(LDFLAGS)
@@ -260,6 +259,9 @@ PTHREAD_LIBS = -lpthread
260# explicitly what architecture to check for. Fix this up for yours.. 259# explicitly what architecture to check for. Fix this up for yours..
261SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ 260SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
262 261
262ifeq ($(shell sh -c "echo 'int foo(void) {char X[2]; return 3;}' | $(CC) -x c -c -Werror -fstack-protector-all - -o /dev/null >/dev/null 2>&1 && echo y"), y)
263 CFLAGS := $(CFLAGS) -fstack-protector-all
264endif
263 265
264 266
265### --- END CONFIGURATION SECTION --- 267### --- END CONFIGURATION SECTION ---
@@ -355,6 +357,7 @@ LIB_H += util/include/asm/swab.h
355LIB_H += util/include/asm/system.h 357LIB_H += util/include/asm/system.h
356LIB_H += util/include/asm/uaccess.h 358LIB_H += util/include/asm/uaccess.h
357LIB_H += perf.h 359LIB_H += perf.h
360LIB_H += util/debugfs.h
358LIB_H += util/event.h 361LIB_H += util/event.h
359LIB_H += util/types.h 362LIB_H += util/types.h
360LIB_H += util/levenshtein.h 363LIB_H += util/levenshtein.h
@@ -380,7 +383,9 @@ LIB_OBJS += util/abspath.o
380LIB_OBJS += util/alias.o 383LIB_OBJS += util/alias.o
381LIB_OBJS += util/config.o 384LIB_OBJS += util/config.o
382LIB_OBJS += util/ctype.o 385LIB_OBJS += util/ctype.o
386LIB_OBJS += util/debugfs.o
383LIB_OBJS += util/environment.o 387LIB_OBJS += util/environment.o
388LIB_OBJS += util/event.o
384LIB_OBJS += util/exec_cmd.o 389LIB_OBJS += util/exec_cmd.o
385LIB_OBJS += util/help.o 390LIB_OBJS += util/help.o
386LIB_OBJS += util/levenshtein.o 391LIB_OBJS += util/levenshtein.o
@@ -417,8 +422,16 @@ LIB_OBJS += util/hist.o
417LIB_OBJS += util/data_map.o 422LIB_OBJS += util/data_map.o
418 423
419BUILTIN_OBJS += builtin-annotate.o 424BUILTIN_OBJS += builtin-annotate.o
425
426BUILTIN_OBJS += builtin-bench.o
427
428# Benchmark modules
429BUILTIN_OBJS += bench/sched-messaging.o
430BUILTIN_OBJS += bench/sched-pipe.o
431
420BUILTIN_OBJS += builtin-help.o 432BUILTIN_OBJS += builtin-help.o
421BUILTIN_OBJS += builtin-sched.o 433BUILTIN_OBJS += builtin-sched.o
434BUILTIN_OBJS += builtin-buildid-list.o
422BUILTIN_OBJS += builtin-list.o 435BUILTIN_OBJS += builtin-list.o
423BUILTIN_OBJS += builtin-record.o 436BUILTIN_OBJS += builtin-record.o
424BUILTIN_OBJS += builtin-report.o 437BUILTIN_OBJS += builtin-report.o
@@ -457,12 +470,16 @@ ifeq ($(uname_S),Darwin)
457 PTHREAD_LIBS = 470 PTHREAD_LIBS =
458endif 471endif
459 472
473ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 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)
460ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(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) 474ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(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)
461 msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]); 475 msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]);
462endif 476endif
463 477
464ifneq ($(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) 478 ifneq ($(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)
465 msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel); 479 BASIC_CFLAGS += -DLIBELF_NO_MMAP
480 endif
481else
482 msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]);
466endif 483endif
467 484
468ifneq ($(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) 485ifneq ($(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)