aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/config/Makefile
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-06 18:17:50 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-06 18:17:50 -0400
commit3eba148d75670f61463dd3c9ef8672da8f290f36 (patch)
tree45cb8fbda6d6ce9d73aeeac673282e37b0be2531 /tools/perf/config/Makefile
parent057b0a7518e4b8fca26201715996d6d928a62300 (diff)
parent4cf563c5d97c83d4b2fb3a778dd7d5e362cc3e34 (diff)
Merge branch 'acpi-pm' into pm-sleep
Diffstat (limited to 'tools/perf/config/Makefile')
-rw-r--r--tools/perf/config/Makefile46
1 files changed, 35 insertions, 11 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index ee21fa95ebcf..802cf544202b 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -34,6 +34,14 @@ ifeq ($(ARCH),arm)
34 LIBUNWIND_LIBS = -lunwind -lunwind-arm 34 LIBUNWIND_LIBS = -lunwind -lunwind-arm
35endif 35endif
36 36
37# So far there's only x86 libdw unwind support merged in perf.
38# Disable it on all other architectures in case libdw unwind
39# support is detected in system. Add supported architectures
40# to the check.
41ifneq ($(ARCH),x86)
42 NO_LIBDW_DWARF_UNWIND := 1
43endif
44
37ifeq ($(LIBUNWIND_LIBS),) 45ifeq ($(LIBUNWIND_LIBS),)
38 NO_LIBUNWIND := 1 46 NO_LIBUNWIND := 1
39else 47else
@@ -109,6 +117,10 @@ CFLAGS += -Wall
109CFLAGS += -Wextra 117CFLAGS += -Wextra
110CFLAGS += -std=gnu99 118CFLAGS += -std=gnu99
111 119
120# Enforce a non-executable stack, as we may regress (again) in the future by
121# adding assembler files missing the .GNU-stack linker note.
122LDFLAGS += -Wl,-z,noexecstack
123
112EXTLIBS = -lelf -lpthread -lrt -lm -ldl 124EXTLIBS = -lelf -lpthread -lrt -lm -ldl
113 125
114ifneq ($(OUTPUT),) 126ifneq ($(OUTPUT),)
@@ -186,7 +198,10 @@ VF_FEATURE_TESTS = \
186 stackprotector-all \ 198 stackprotector-all \
187 timerfd \ 199 timerfd \
188 libunwind-debug-frame \ 200 libunwind-debug-frame \
189 bionic 201 bionic \
202 liberty \
203 liberty-z \
204 cplus-demangle
190 205
191# Set FEATURE_CHECK_(C|LD)FLAGS-all for all CORE_FEATURE_TESTS features. 206# Set FEATURE_CHECK_(C|LD)FLAGS-all for all CORE_FEATURE_TESTS features.
192# If in the future we need per-feature checks/flags for features not 207# If in the future we need per-feature checks/flags for features not
@@ -504,7 +519,21 @@ else
504endif 519endif
505 520
506ifeq ($(feature-libbfd), 1) 521ifeq ($(feature-libbfd), 1)
507 EXTLIBS += -lbfd -lz -liberty 522 EXTLIBS += -lbfd
523
524 # call all detections now so we get correct
525 # status in VF output
526 $(call feature_check,liberty)
527 $(call feature_check,liberty-z)
528 $(call feature_check,cplus-demangle)
529
530 ifeq ($(feature-liberty), 1)
531 EXTLIBS += -liberty
532 else
533 ifeq ($(feature-liberty-z), 1)
534 EXTLIBS += -liberty -lz
535 endif
536 endif
508endif 537endif
509 538
510ifdef NO_DEMANGLE 539ifdef NO_DEMANGLE
@@ -515,15 +544,10 @@ else
515 CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT 544 CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
516 else 545 else
517 ifneq ($(feature-libbfd), 1) 546 ifneq ($(feature-libbfd), 1)
518 $(call feature_check,liberty) 547 ifneq ($(feature-liberty), 1)
519 ifeq ($(feature-liberty), 1) 548 ifneq ($(feature-liberty-z), 1)
520 EXTLIBS += -lbfd -liberty 549 # we dont have neither HAVE_CPLUS_DEMANGLE_SUPPORT
521 else 550 # or any of 'bfd iberty z' trinity
522 $(call feature_check,liberty-z)
523 ifeq ($(feature-liberty-z), 1)
524 EXTLIBS += -lbfd -liberty -lz
525 else
526 $(call feature_check,cplus-demangle)
527 ifeq ($(feature-cplus-demangle), 1) 551 ifeq ($(feature-cplus-demangle), 1)
528 EXTLIBS += -liberty 552 EXTLIBS += -liberty
529 CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT 553 CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT