riscv: Add support for libdw
[sfrench/cifs-2.6.git] / tools / perf / Makefile.config
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 ifeq ($(src-perf),)
4 src-perf := $(srctree)/tools/perf
5 endif
6
7 ifeq ($(obj-perf),)
8 obj-perf := $(OUTPUT)
9 endif
10
11 ifneq ($(obj-perf),)
12 obj-perf := $(abspath $(obj-perf))/
13 endif
14
15 $(shell printf "" > $(OUTPUT).config-detected)
16 detected     = $(shell echo "$(1)=y"       >> $(OUTPUT).config-detected)
17 detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected)
18
19 CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS)
20
21 include $(srctree)/tools/scripts/Makefile.arch
22
23 $(call detected_var,SRCARCH)
24
25 NO_PERF_REGS := 1
26 NO_SYSCALL_TABLE := 1
27
28 # Additional ARCH settings for ppc
29 ifeq ($(SRCARCH),powerpc)
30   NO_PERF_REGS := 0
31   NO_SYSCALL_TABLE := 0
32   CFLAGS += -I$(OUTPUT)arch/powerpc/include/generated
33   LIBUNWIND_LIBS := -lunwind -lunwind-ppc64
34 endif
35
36 # Additional ARCH settings for x86
37 ifeq ($(SRCARCH),x86)
38   $(call detected,CONFIG_X86)
39   ifeq (${IS_64_BIT}, 1)
40     NO_SYSCALL_TABLE := 0
41     CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT -I$(OUTPUT)arch/x86/include/generated
42     ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S
43     LIBUNWIND_LIBS = -lunwind-x86_64 -lunwind -llzma
44     $(call detected,CONFIG_X86_64)
45   else
46     LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind
47   endif
48   NO_PERF_REGS := 0
49 endif
50
51 ifeq ($(SRCARCH),arm)
52   NO_PERF_REGS := 0
53   LIBUNWIND_LIBS = -lunwind -lunwind-arm
54 endif
55
56 ifeq ($(SRCARCH),arm64)
57   NO_PERF_REGS := 0
58   NO_SYSCALL_TABLE := 0
59   CFLAGS += -I$(OUTPUT)arch/arm64/include/generated
60   LIBUNWIND_LIBS = -lunwind -lunwind-aarch64
61 endif
62
63 ifeq ($(SRCARCH),riscv)
64   NO_PERF_REGS := 0
65 endif
66
67 ifeq ($(SRCARCH),csky)
68   NO_PERF_REGS := 0
69 endif
70
71 ifeq ($(ARCH),s390)
72   NO_PERF_REGS := 0
73   NO_SYSCALL_TABLE := 0
74   CFLAGS += -fPIC -I$(OUTPUT)arch/s390/include/generated
75 endif
76
77 ifeq ($(NO_PERF_REGS),0)
78   $(call detected,CONFIG_PERF_REGS)
79 endif
80
81 ifneq ($(NO_SYSCALL_TABLE),1)
82   CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT
83 endif
84
85 # So far there's only x86 and arm libdw unwind support merged in perf.
86 # Disable it on all other architectures in case libdw unwind
87 # support is detected in system. Add supported architectures
88 # to the check.
89 ifneq ($(SRCARCH),$(filter $(SRCARCH),x86 arm arm64 powerpc s390 csky riscv))
90   NO_LIBDW_DWARF_UNWIND := 1
91 endif
92
93 ifeq ($(LIBUNWIND_LIBS),)
94   NO_LIBUNWIND := 1
95 endif
96 #
97 # For linking with debug library, run like:
98 #
99 #   make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/
100 #
101
102 libunwind_arch_set_flags = $(eval $(libunwind_arch_set_flags_code))
103 define libunwind_arch_set_flags_code
104   FEATURE_CHECK_CFLAGS-libunwind-$(1)  = -I$(LIBUNWIND_DIR)/include
105   FEATURE_CHECK_LDFLAGS-libunwind-$(1) = -L$(LIBUNWIND_DIR)/lib
106 endef
107
108 ifdef LIBUNWIND_DIR
109   LIBUNWIND_CFLAGS  = -I$(LIBUNWIND_DIR)/include
110   LIBUNWIND_LDFLAGS = -L$(LIBUNWIND_DIR)/lib
111   LIBUNWIND_ARCHS = x86 x86_64 arm aarch64 debug-frame-arm debug-frame-aarch64
112   $(foreach libunwind_arch,$(LIBUNWIND_ARCHS),$(call libunwind_arch_set_flags,$(libunwind_arch)))
113 endif
114
115 # Set per-feature check compilation flags
116 FEATURE_CHECK_CFLAGS-libunwind = $(LIBUNWIND_CFLAGS)
117 FEATURE_CHECK_LDFLAGS-libunwind = $(LIBUNWIND_LDFLAGS) $(LIBUNWIND_LIBS)
118 FEATURE_CHECK_CFLAGS-libunwind-debug-frame = $(LIBUNWIND_CFLAGS)
119 FEATURE_CHECK_LDFLAGS-libunwind-debug-frame = $(LIBUNWIND_LDFLAGS) $(LIBUNWIND_LIBS)
120
121 FEATURE_CHECK_LDFLAGS-libunwind-arm = -lunwind -lunwind-arm
122 FEATURE_CHECK_LDFLAGS-libunwind-aarch64 = -lunwind -lunwind-aarch64
123 FEATURE_CHECK_LDFLAGS-libunwind-x86 = -lunwind -llzma -lunwind-x86
124 FEATURE_CHECK_LDFLAGS-libunwind-x86_64 = -lunwind -llzma -lunwind-x86_64
125
126 FEATURE_CHECK_LDFLAGS-libcrypto = -lcrypto
127
128 ifdef CSINCLUDES
129   LIBOPENCSD_CFLAGS := -I$(CSINCLUDES)
130 endif
131 OPENCSDLIBS := -lopencsd_c_api -lopencsd
132 ifdef CSLIBS
133   LIBOPENCSD_LDFLAGS := -L$(CSLIBS)
134 endif
135 FEATURE_CHECK_CFLAGS-libopencsd := $(LIBOPENCSD_CFLAGS)
136 FEATURE_CHECK_LDFLAGS-libopencsd := $(LIBOPENCSD_LDFLAGS) $(OPENCSDLIBS)
137
138 ifeq ($(NO_PERF_REGS),0)
139   CFLAGS += -DHAVE_PERF_REGS_SUPPORT
140 endif
141
142 # for linking with debug library, run like:
143 # make DEBUG=1 LIBDW_DIR=/opt/libdw/
144 ifdef LIBDW_DIR
145   LIBDW_CFLAGS  := -I$(LIBDW_DIR)/include
146   LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib
147 endif
148 DWARFLIBS := -ldw
149 ifeq ($(findstring -static,${LDFLAGS}),-static)
150   DWARFLIBS += -lelf -lebl -ldl -lz -llzma -lbz2
151 endif
152 FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS)
153 FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) $(DWARFLIBS)
154
155 # for linking with debug library, run like:
156 # make DEBUG=1 LIBBABELTRACE_DIR=/opt/libbabeltrace/
157 ifdef LIBBABELTRACE_DIR
158   LIBBABELTRACE_CFLAGS  := -I$(LIBBABELTRACE_DIR)/include
159   LIBBABELTRACE_LDFLAGS := -L$(LIBBABELTRACE_DIR)/lib
160 endif
161 FEATURE_CHECK_CFLAGS-libbabeltrace := $(LIBBABELTRACE_CFLAGS)
162 FEATURE_CHECK_LDFLAGS-libbabeltrace := $(LIBBABELTRACE_LDFLAGS) -lbabeltrace-ctf
163
164 ifdef LIBZSTD_DIR
165   LIBZSTD_CFLAGS  := -I$(LIBZSTD_DIR)/lib
166   LIBZSTD_LDFLAGS := -L$(LIBZSTD_DIR)/lib
167 endif
168 FEATURE_CHECK_CFLAGS-libzstd := $(LIBZSTD_CFLAGS)
169 FEATURE_CHECK_LDFLAGS-libzstd := $(LIBZSTD_LDFLAGS)
170
171 FEATURE_CHECK_CFLAGS-bpf = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi -I$(srctree)/tools/include/uapi
172 # include ARCH specific config
173 -include $(src-perf)/arch/$(SRCARCH)/Makefile
174
175 ifdef PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET
176   CFLAGS += -DHAVE_ARCH_REGS_QUERY_REGISTER_OFFSET
177 endif
178
179 include $(srctree)/tools/scripts/utilities.mak
180
181 ifeq ($(call get-executable,$(FLEX)),)
182   dummy := $(error Error: $(FLEX) is missing on this system, please install it)
183 endif
184
185 ifeq ($(call get-executable,$(BISON)),)
186   dummy := $(error Error: $(BISON) is missing on this system, please install it)
187 endif
188
189 # Treat warnings as errors unless directed not to
190 ifneq ($(WERROR),0)
191   CFLAGS += -Werror
192   CXXFLAGS += -Werror
193 endif
194
195 ifndef DEBUG
196   DEBUG := 0
197 endif
198
199 ifeq ($(DEBUG),0)
200 ifeq ($(CC_NO_CLANG), 0)
201   CFLAGS += -O3
202 else
203   CFLAGS += -O6
204 endif
205 endif
206
207 ifdef PARSER_DEBUG
208   PARSER_DEBUG_BISON := -t
209   PARSER_DEBUG_FLEX  := -d
210   CFLAGS             += -DPARSER_DEBUG
211   $(call detected_var,PARSER_DEBUG_BISON)
212   $(call detected_var,PARSER_DEBUG_FLEX)
213 endif
214
215 # Try different combinations to accommodate systems that only have
216 # python[2][-config] in weird combinations but always preferring
217 # python2 and python2-config as per pep-0394. If we catch a
218 # python[-config] in version 3, the version check will kill it.
219 PYTHON2 := $(if $(call get-executable,python2),python2,python)
220 override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON2))
221 PYTHON2_CONFIG := \
222   $(if $(call get-executable,$(PYTHON)-config),$(PYTHON)-config,python-config)
223 override PYTHON_CONFIG := \
224   $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON2_CONFIG))
225
226 grep-libs  = $(filter -l%,$(1))
227 strip-libs  = $(filter-out -l%,$(1))
228
229 PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
230
231 ifdef PYTHON_CONFIG
232   PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
233   PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
234   PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
235   PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --includes 2>/dev/null)
236   FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
237 endif
238
239 FEATURE_CHECK_CFLAGS-libpython := $(PYTHON_EMBED_CCOPTS)
240 FEATURE_CHECK_LDFLAGS-libpython := $(PYTHON_EMBED_LDOPTS)
241 FEATURE_CHECK_CFLAGS-libpython-version := $(PYTHON_EMBED_CCOPTS)
242 FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS)
243
244 FEATURE_CHECK_LDFLAGS-libaio = -lrt
245
246 FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes -ldl
247
248 CFLAGS += -fno-omit-frame-pointer
249 CFLAGS += -ggdb3
250 CFLAGS += -funwind-tables
251 CFLAGS += -Wall
252 CFLAGS += -Wextra
253 CFLAGS += -std=gnu99
254
255 CXXFLAGS += -std=gnu++11 -fno-exceptions -fno-rtti
256 CXXFLAGS += -Wall
257 CXXFLAGS += -fno-omit-frame-pointer
258 CXXFLAGS += -ggdb3
259 CXXFLAGS += -funwind-tables
260 CXXFLAGS += -Wno-strict-aliasing
261
262 # Enforce a non-executable stack, as we may regress (again) in the future by
263 # adding assembler files missing the .GNU-stack linker note.
264 LDFLAGS += -Wl,-z,noexecstack
265
266 EXTLIBS = -lpthread -lrt -lm -ldl
267
268 ifeq ($(FEATURES_DUMP),)
269 include $(srctree)/tools/build/Makefile.feature
270 else
271 include $(FEATURES_DUMP)
272 endif
273
274 ifeq ($(feature-stackprotector-all), 1)
275   CFLAGS += -fstack-protector-all
276 endif
277
278 ifeq ($(DEBUG),0)
279   ifeq ($(feature-fortify-source), 1)
280     CFLAGS += -D_FORTIFY_SOURCE=2
281   endif
282 endif
283
284 INC_FLAGS += -I$(src-perf)/util/include
285 INC_FLAGS += -I$(src-perf)/arch/$(SRCARCH)/include
286 INC_FLAGS += -I$(srctree)/tools/include/uapi
287 INC_FLAGS += -I$(srctree)/tools/include/
288 INC_FLAGS += -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi
289 INC_FLAGS += -I$(srctree)/tools/arch/$(SRCARCH)/include/
290 INC_FLAGS += -I$(srctree)/tools/arch/$(SRCARCH)/
291
292 # $(obj-perf)      for generated common-cmds.h
293 # $(obj-perf)/util for generated bison/flex headers
294 ifneq ($(OUTPUT),)
295 INC_FLAGS += -I$(obj-perf)/util
296 INC_FLAGS += -I$(obj-perf)
297 endif
298
299 INC_FLAGS += -I$(src-perf)/util
300 INC_FLAGS += -I$(src-perf)
301 INC_FLAGS += -I$(srctree)/tools/lib/
302
303 CFLAGS   += $(INC_FLAGS)
304 CXXFLAGS += $(INC_FLAGS)
305
306 CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
307
308 ifeq ($(feature-sync-compare-and-swap), 1)
309   CFLAGS += -DHAVE_SYNC_COMPARE_AND_SWAP_SUPPORT
310 endif
311
312 ifeq ($(feature-pthread-attr-setaffinity-np), 1)
313   CFLAGS += -DHAVE_PTHREAD_ATTR_SETAFFINITY_NP
314 endif
315
316 ifeq ($(feature-pthread-barrier), 1)
317   CFLAGS += -DHAVE_PTHREAD_BARRIER
318 endif
319
320 ifndef NO_BIONIC
321   $(call feature_check,bionic)
322   ifeq ($(feature-bionic), 1)
323     BIONIC := 1
324     CFLAGS += -DLACKS_SIGQUEUE_PROTOTYPE
325     CFLAGS += -DLACKS_OPEN_MEMSTREAM_PROTOTYPE
326     EXTLIBS := $(filter-out -lrt,$(EXTLIBS))
327     EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
328   endif
329 endif
330
331 ifeq ($(feature-eventfd), 1)
332   CFLAGS += -DHAVE_EVENTFD
333 endif
334
335 ifeq ($(feature-get_current_dir_name), 1)
336   CFLAGS += -DHAVE_GET_CURRENT_DIR_NAME
337 endif
338
339 ifeq ($(feature-gettid), 1)
340   CFLAGS += -DHAVE_GETTID
341 endif
342
343 ifdef NO_LIBELF
344   NO_DWARF := 1
345   NO_DEMANGLE := 1
346   NO_LIBUNWIND := 1
347   NO_LIBDW_DWARF_UNWIND := 1
348   NO_LIBBPF := 1
349   NO_JVMTI := 1
350 else
351   ifeq ($(feature-libelf), 0)
352     ifeq ($(feature-glibc), 1)
353       LIBC_SUPPORT := 1
354     endif
355     ifeq ($(BIONIC),1)
356       LIBC_SUPPORT := 1
357     endif
358     ifeq ($(LIBC_SUPPORT),1)
359       msg := $(warning No libelf found. Disables 'probe' tool, jvmti and BPF support in 'perf record'. Please install libelf-dev, libelf-devel or elfutils-libelf-devel);
360
361       NO_LIBELF := 1
362       NO_DWARF := 1
363       NO_DEMANGLE := 1
364       NO_LIBUNWIND := 1
365       NO_LIBDW_DWARF_UNWIND := 1
366       NO_LIBBPF := 1
367       NO_JVMTI := 1
368     else
369       ifneq ($(filter s% -static%,$(LDFLAGS),),)
370         msg := $(error No static glibc found, please install glibc-static);
371       else
372         msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]);
373       endif
374     endif
375   else
376     ifndef NO_LIBDW_DWARF_UNWIND
377       ifneq ($(feature-libdw-dwarf-unwind),1)
378         NO_LIBDW_DWARF_UNWIND := 1
379         msg := $(warning No libdw DWARF unwind found, Please install elfutils-devel/libdw-dev >= 0.158 and/or set LIBDW_DIR);
380       endif
381     endif
382     ifneq ($(feature-dwarf), 1)
383       ifndef NO_DWARF
384         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);
385         NO_DWARF := 1
386       endif
387     else
388       ifneq ($(feature-dwarf_getlocations), 1)
389         msg := $(warning Old libdw.h, finding variables at given 'perf probe' point will not work, install elfutils-devel/libdw-dev >= 0.157);
390       else
391         CFLAGS += -DHAVE_DWARF_GETLOCATIONS_SUPPORT
392       endif # dwarf_getlocations
393     endif # Dwarf support
394   endif # libelf support
395 endif # NO_LIBELF
396
397 ifeq ($(feature-glibc), 1)
398   CFLAGS += -DHAVE_GLIBC_SUPPORT
399 endif
400
401 ifeq ($(feature-libaio), 1)
402   ifndef NO_AIO
403     CFLAGS += -DHAVE_AIO_SUPPORT
404   endif
405 endif
406
407 ifdef NO_DWARF
408   NO_LIBDW_DWARF_UNWIND := 1
409 endif
410
411 ifeq ($(feature-sched_getcpu), 1)
412   CFLAGS += -DHAVE_SCHED_GETCPU_SUPPORT
413 endif
414
415 ifeq ($(feature-setns), 1)
416   CFLAGS += -DHAVE_SETNS_SUPPORT
417   $(call detected,CONFIG_SETNS)
418 endif
419
420 ifdef CORESIGHT
421   $(call feature_check,libopencsd)
422   ifeq ($(feature-libopencsd), 1)
423     CFLAGS += -DHAVE_CSTRACE_SUPPORT $(LIBOPENCSD_CFLAGS)
424     ifeq ($(feature-reallocarray), 0)
425       CFLAGS += -DCOMPAT_NEED_REALLOCARRAY
426     endif
427     LDFLAGS += $(LIBOPENCSD_LDFLAGS)
428     EXTLIBS += $(OPENCSDLIBS)
429     $(call detected,CONFIG_LIBOPENCSD)
430     ifdef CSTRACE_RAW
431       CFLAGS += -DCS_DEBUG_RAW
432       ifeq (${CSTRACE_RAW}, packed)
433         CFLAGS += -DCS_RAW_PACKED
434       endif
435     endif
436   endif
437 endif
438
439 ifndef NO_LIBELF
440   CFLAGS += -DHAVE_LIBELF_SUPPORT
441   EXTLIBS += -lelf
442   $(call detected,CONFIG_LIBELF)
443
444   ifeq ($(feature-libelf-mmap), 1)
445     CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT
446   endif
447
448   ifeq ($(feature-libelf-getphdrnum), 1)
449     CFLAGS += -DHAVE_ELF_GETPHDRNUM_SUPPORT
450   endif
451
452   ifeq ($(feature-libelf-gelf_getnote), 1)
453     CFLAGS += -DHAVE_GELF_GETNOTE_SUPPORT
454   else
455     msg := $(warning gelf_getnote() not found on libelf, SDT support disabled);
456   endif
457
458   ifeq ($(feature-libelf-getshdrstrndx), 1)
459     CFLAGS += -DHAVE_ELF_GETSHDRSTRNDX_SUPPORT
460   endif
461
462   ifndef NO_DWARF
463     ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined)
464       msg := $(warning DWARF register mappings have not been defined for architecture $(SRCARCH), DWARF support disabled);
465       NO_DWARF := 1
466     else
467       CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS)
468       LDFLAGS += $(LIBDW_LDFLAGS)
469       EXTLIBS += ${DWARFLIBS}
470       $(call detected,CONFIG_DWARF)
471     endif # PERF_HAVE_DWARF_REGS
472   endif # NO_DWARF
473
474   ifndef NO_LIBBPF
475     ifeq ($(feature-bpf), 1)
476       CFLAGS += -DHAVE_LIBBPF_SUPPORT
477       $(call detected,CONFIG_LIBBPF)
478     endif
479
480     ifndef NO_DWARF
481       ifdef PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET
482         CFLAGS += -DHAVE_BPF_PROLOGUE
483         $(call detected,CONFIG_BPF_PROLOGUE)
484       else
485         msg := $(warning BPF prologue is not supported by architecture $(SRCARCH), missing regs_query_register_offset());
486       endif
487     else
488       msg := $(warning DWARF support is off, BPF prologue is disabled);
489     endif
490
491   endif # NO_LIBBPF
492 endif # NO_LIBELF
493
494 ifndef NO_SDT
495   ifneq ($(feature-sdt), 1)
496     msg := $(warning No sys/sdt.h found, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev);
497     NO_SDT := 1;
498   else
499     CFLAGS += -DHAVE_SDT_EVENT
500     $(call detected,CONFIG_SDT_EVENT)
501   endif
502 endif
503
504 ifdef PERF_HAVE_JITDUMP
505   ifndef NO_LIBELF
506     $(call detected,CONFIG_JITDUMP)
507     CFLAGS += -DHAVE_JITDUMP
508   endif
509 endif
510
511 ifeq ($(SRCARCH),powerpc)
512   ifndef NO_DWARF
513     CFLAGS += -DHAVE_SKIP_CALLCHAIN_IDX
514   endif
515 endif
516
517 ifndef NO_LIBUNWIND
518   have_libunwind :=
519
520   $(call feature_check,libunwind-x86)
521   ifeq ($(feature-libunwind-x86), 1)
522     $(call detected,CONFIG_LIBUNWIND_X86)
523     CFLAGS += -DHAVE_LIBUNWIND_X86_SUPPORT
524     LDFLAGS += -lunwind-x86
525     EXTLIBS_LIBUNWIND += -lunwind-x86
526     have_libunwind = 1
527   endif
528
529   $(call feature_check,libunwind-aarch64)
530   ifeq ($(feature-libunwind-aarch64), 1)
531     $(call detected,CONFIG_LIBUNWIND_AARCH64)
532     CFLAGS += -DHAVE_LIBUNWIND_AARCH64_SUPPORT
533     LDFLAGS += -lunwind-aarch64
534     EXTLIBS_LIBUNWIND += -lunwind-aarch64
535     have_libunwind = 1
536     $(call feature_check,libunwind-debug-frame-aarch64)
537     ifneq ($(feature-libunwind-debug-frame-aarch64), 1)
538       msg := $(warning No debug_frame support found in libunwind-aarch64);
539       CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME_AARCH64
540     endif
541   endif
542
543   ifneq ($(feature-libunwind), 1)
544     msg := $(warning No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR);
545     NO_LOCAL_LIBUNWIND := 1
546   else
547     have_libunwind := 1
548     $(call detected,CONFIG_LOCAL_LIBUNWIND)
549   endif
550
551   ifneq ($(have_libunwind), 1)
552     NO_LIBUNWIND := 1
553   endif
554 else
555   NO_LOCAL_LIBUNWIND := 1
556 endif
557
558 ifndef NO_LIBBPF
559   ifneq ($(feature-bpf), 1)
560     msg := $(warning BPF API too old. Please install recent kernel headers. BPF support in 'perf record' is disabled.)
561     NO_LIBBPF := 1
562   endif
563 endif
564
565 dwarf-post-unwind := 1
566 dwarf-post-unwind-text := BUG
567
568 # setup DWARF post unwinder
569 ifdef NO_LIBUNWIND
570   ifdef NO_LIBDW_DWARF_UNWIND
571     msg := $(warning Disabling post unwind, no support found.);
572     dwarf-post-unwind := 0
573   else
574     dwarf-post-unwind-text := libdw
575     $(call detected,CONFIG_LIBDW_DWARF_UNWIND)
576   endif
577 else
578   dwarf-post-unwind-text := libunwind
579   $(call detected,CONFIG_LIBUNWIND)
580   # Enable libunwind support by default.
581   ifndef NO_LIBDW_DWARF_UNWIND
582     NO_LIBDW_DWARF_UNWIND := 1
583   endif
584 endif
585
586 ifeq ($(dwarf-post-unwind),1)
587   CFLAGS += -DHAVE_DWARF_UNWIND_SUPPORT
588   $(call detected,CONFIG_DWARF_UNWIND)
589 else
590   NO_DWARF_UNWIND := 1
591 endif
592
593 ifndef NO_LOCAL_LIBUNWIND
594   ifeq ($(SRCARCH),$(filter $(SRCARCH),arm arm64))
595     $(call feature_check,libunwind-debug-frame)
596     ifneq ($(feature-libunwind-debug-frame), 1)
597       msg := $(warning No debug_frame support found in libunwind);
598       CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
599     endif
600   else
601     # non-ARM has no dwarf_find_debug_frame() function:
602     CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
603   endif
604   EXTLIBS += $(LIBUNWIND_LIBS)
605   LDFLAGS += $(LIBUNWIND_LIBS)
606 endif
607 ifeq ($(findstring -static,${LDFLAGS}),-static)
608   # gcc -static links libgcc_eh which contans piece of libunwind
609   LIBUNWIND_LDFLAGS += -Wl,--allow-multiple-definition
610 endif
611
612 ifndef NO_LIBUNWIND
613   CFLAGS  += -DHAVE_LIBUNWIND_SUPPORT
614   CFLAGS  += $(LIBUNWIND_CFLAGS)
615   LDFLAGS += $(LIBUNWIND_LDFLAGS)
616   EXTLIBS += $(EXTLIBS_LIBUNWIND)
617 endif
618
619 ifeq ($(NO_SYSCALL_TABLE),0)
620   $(call detected,CONFIG_TRACE)
621 else
622   ifndef NO_LIBAUDIT
623     ifneq ($(feature-libaudit), 1)
624       msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev);
625       NO_LIBAUDIT := 1
626     else
627       CFLAGS += -DHAVE_LIBAUDIT_SUPPORT
628       EXTLIBS += -laudit
629       $(call detected,CONFIG_TRACE)
630     endif
631   endif
632 endif
633
634 ifndef NO_LIBCRYPTO
635   ifneq ($(feature-libcrypto), 1)
636     msg := $(warning No libcrypto.h found, disables jitted code injection, please install openssl-devel or libssl-dev);
637     NO_LIBCRYPTO := 1
638   else
639     CFLAGS += -DHAVE_LIBCRYPTO_SUPPORT
640     EXTLIBS += -lcrypto
641     $(call detected,CONFIG_CRYPTO)
642   endif
643 endif
644
645 ifdef NO_NEWT
646   NO_SLANG=1
647 endif
648
649 ifndef NO_SLANG
650   ifneq ($(feature-libslang), 1)
651     ifneq ($(feature-libslang-include-subdir), 1)
652       msg := $(warning slang not found, disables TUI support. Please install slang-devel, libslang-dev or libslang2-dev);
653       NO_SLANG := 1
654     else
655       CFLAGS += -DHAVE_SLANG_INCLUDE_SUBDIR
656     endif
657   endif
658   ifndef NO_SLANG
659     # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
660     CFLAGS += -DHAVE_SLANG_SUPPORT
661     EXTLIBS += -lslang
662     $(call detected,CONFIG_SLANG)
663   endif
664 endif
665
666 ifndef NO_GTK2
667   FLAGS_GTK2=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
668   ifneq ($(feature-gtk2), 1)
669     msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev);
670     NO_GTK2 := 1
671   else
672     ifeq ($(feature-gtk2-infobar), 1)
673       GTK_CFLAGS := -DHAVE_GTK_INFO_BAR_SUPPORT
674     endif
675     CFLAGS += -DHAVE_GTK2_SUPPORT
676     GTK_CFLAGS += $(shell $(PKG_CONFIG) --cflags gtk+-2.0 2>/dev/null)
677     GTK_LIBS := $(shell $(PKG_CONFIG) --libs gtk+-2.0 2>/dev/null)
678     EXTLIBS += -ldl
679   endif
680 endif
681
682 ifdef NO_LIBPERL
683   CFLAGS += -DNO_LIBPERL
684 else
685   PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
686   PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
687   PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
688   PERL_EMBED_CCOPTS = $(shell perl -MExtUtils::Embed -e ccopts 2>/dev/null)
689   PERL_EMBED_CCOPTS := $(filter-out -specs=%,$(PERL_EMBED_CCOPTS))
690   PERL_EMBED_LDOPTS := $(filter-out -specs=%,$(PERL_EMBED_LDOPTS))
691   FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
692
693   ifneq ($(feature-libperl), 1)
694     CFLAGS += -DNO_LIBPERL
695     NO_LIBPERL := 1
696     msg := $(warning Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev);
697   else
698     LDFLAGS += $(PERL_EMBED_LDFLAGS)
699     EXTLIBS += $(PERL_EMBED_LIBADD)
700     CFLAGS += -DHAVE_LIBPERL_SUPPORT
701     $(call detected,CONFIG_LIBPERL)
702   endif
703 endif
704
705 ifeq ($(feature-timerfd), 1)
706   CFLAGS += -DHAVE_TIMERFD_SUPPORT
707 else
708   msg := $(warning No timerfd support. Disables 'perf kvm stat live');
709 endif
710
711 disable-python = $(eval $(disable-python_code))
712 define disable-python_code
713   CFLAGS += -DNO_LIBPYTHON
714   $(warning $1)
715   NO_LIBPYTHON := 1
716 endef
717
718 ifdef NO_LIBPYTHON
719   $(call disable-python,Python support disabled by user)
720 else
721
722   ifndef PYTHON
723     $(call disable-python,No python interpreter was found: disables Python support - please install python-devel/python-dev)
724   else
725     PYTHON_WORD := $(call shell-wordify,$(PYTHON))
726
727     ifndef PYTHON_CONFIG
728       $(call disable-python,No 'python-config' tool was found: disables Python support - please install python-devel/python-dev)
729     else
730
731       ifneq ($(feature-libpython), 1)
732         $(call disable-python,No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev)
733       else
734          LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
735          EXTLIBS += $(PYTHON_EMBED_LIBADD)
736          LANG_BINDINGS += $(obj-perf)python/perf.so
737          CFLAGS += -DHAVE_LIBPYTHON_SUPPORT
738          $(call detected,CONFIG_LIBPYTHON)
739       endif
740     endif
741   endif
742 endif
743
744 ifeq ($(feature-libbfd), 1)
745   EXTLIBS += -lbfd -lopcodes
746 else
747   # we are on a system that requires -liberty and (maybe) -lz
748   # to link against -lbfd; test each case individually here
749
750   # call all detections now so we get correct
751   # status in VF output
752   $(call feature_check,libbfd-liberty)
753   $(call feature_check,libbfd-liberty-z)
754
755   ifeq ($(feature-libbfd-liberty), 1)
756     EXTLIBS += -lbfd -lopcodes -liberty
757     FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -ldl
758   else
759     ifeq ($(feature-libbfd-liberty-z), 1)
760       EXTLIBS += -lbfd -lopcodes -liberty -lz
761       FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -lz -ldl
762     endif
763   endif
764   $(call feature_check,disassembler-four-args)
765 endif
766
767 ifdef NO_DEMANGLE
768   CFLAGS += -DNO_DEMANGLE
769 else
770   ifdef HAVE_CPLUS_DEMANGLE_SUPPORT
771     EXTLIBS += -liberty
772   else
773     ifeq ($(filter -liberty,$(EXTLIBS)),)
774       $(call feature_check,cplus-demangle)
775
776       # we dont have neither HAVE_CPLUS_DEMANGLE_SUPPORT
777       # or any of 'bfd iberty z' trinity
778       ifeq ($(feature-cplus-demangle), 1)
779         EXTLIBS += -liberty
780       else
781         msg := $(warning No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling)
782         CFLAGS += -DNO_DEMANGLE
783       endif
784     endif
785   endif
786
787   ifneq ($(filter -liberty,$(EXTLIBS)),)
788     CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
789   endif
790 endif
791
792 ifneq ($(filter -lbfd,$(EXTLIBS)),)
793   CFLAGS += -DHAVE_LIBBFD_SUPPORT
794 endif
795
796 ifndef NO_ZLIB
797   ifeq ($(feature-zlib), 1)
798     CFLAGS += -DHAVE_ZLIB_SUPPORT
799     EXTLIBS += -lz
800     $(call detected,CONFIG_ZLIB)
801   else
802     NO_ZLIB := 1
803   endif
804 endif
805
806 ifndef NO_LZMA
807   ifeq ($(feature-lzma), 1)
808     CFLAGS += -DHAVE_LZMA_SUPPORT
809     EXTLIBS += -llzma
810     $(call detected,CONFIG_LZMA)
811   else
812     msg := $(warning No liblzma found, disables xz kernel module decompression, please install xz-devel/liblzma-dev);
813     NO_LZMA := 1
814   endif
815 endif
816
817 ifndef NO_LIBZSTD
818   ifeq ($(feature-libzstd), 1)
819     CFLAGS += -DHAVE_ZSTD_SUPPORT
820     CFLAGS += $(LIBZSTD_CFLAGS)
821     LDFLAGS += $(LIBZSTD_LDFLAGS)
822     EXTLIBS += -lzstd
823     $(call detected,CONFIG_ZSTD)
824   else
825     msg := $(warning No libzstd found, disables trace compression, please install libzstd-dev[el] and/or set LIBZSTD_DIR);
826     NO_LIBZSTD := 1
827   endif
828 endif
829
830 ifndef NO_BACKTRACE
831   ifeq ($(feature-backtrace), 1)
832     CFLAGS += -DHAVE_BACKTRACE_SUPPORT
833   endif
834 endif
835
836 ifndef NO_LIBNUMA
837   ifeq ($(feature-libnuma), 0)
838     msg := $(warning No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev);
839     NO_LIBNUMA := 1
840   else
841     ifeq ($(feature-numa_num_possible_cpus), 0)
842       msg := $(warning Old numa library found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev >= 2.0.8);
843       NO_LIBNUMA := 1
844     else
845       CFLAGS += -DHAVE_LIBNUMA_SUPPORT
846       EXTLIBS += -lnuma
847       $(call detected,CONFIG_NUMA)
848     endif
849   endif
850 endif
851
852 ifdef HAVE_KVM_STAT_SUPPORT
853     CFLAGS += -DHAVE_KVM_STAT_SUPPORT
854 endif
855
856 ifeq ($(feature-disassembler-four-args), 1)
857     CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE
858 endif
859
860 ifeq (${IS_64_BIT}, 1)
861   ifndef NO_PERF_READ_VDSO32
862     $(call feature_check,compile-32)
863     ifeq ($(feature-compile-32), 1)
864       CFLAGS += -DHAVE_PERF_READ_VDSO32
865     else
866       NO_PERF_READ_VDSO32 := 1
867     endif
868   endif
869   ifneq ($(SRCARCH), x86)
870     NO_PERF_READ_VDSOX32 := 1
871   endif
872   ifndef NO_PERF_READ_VDSOX32
873     $(call feature_check,compile-x32)
874     ifeq ($(feature-compile-x32), 1)
875       CFLAGS += -DHAVE_PERF_READ_VDSOX32
876     else
877       NO_PERF_READ_VDSOX32 := 1
878     endif
879   endif
880 else
881   NO_PERF_READ_VDSO32 := 1
882   NO_PERF_READ_VDSOX32 := 1
883 endif
884
885 ifndef NO_LIBBABELTRACE
886   $(call feature_check,libbabeltrace)
887   ifeq ($(feature-libbabeltrace), 1)
888     CFLAGS += -DHAVE_LIBBABELTRACE_SUPPORT $(LIBBABELTRACE_CFLAGS)
889     LDFLAGS += $(LIBBABELTRACE_LDFLAGS)
890     EXTLIBS += -lbabeltrace-ctf
891     $(call detected,CONFIG_LIBBABELTRACE)
892   else
893     msg := $(warning No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev);
894   endif
895 endif
896
897 ifndef NO_AUXTRACE
898   ifeq ($(SRCARCH),x86)
899     ifeq ($(feature-get_cpuid), 0)
900       msg := $(warning Your gcc lacks the __get_cpuid() builtin, disables support for auxtrace/Intel PT, please install a newer gcc);
901       NO_AUXTRACE := 1
902     endif
903   endif
904   ifndef NO_AUXTRACE
905     $(call detected,CONFIG_AUXTRACE)
906     CFLAGS += -DHAVE_AUXTRACE_SUPPORT
907   endif
908 endif
909
910 ifndef NO_JVMTI
911   ifneq (,$(wildcard /usr/sbin/update-java-alternatives))
912     JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | awk '{print $$3}')
913   else
914     ifneq (,$(wildcard /usr/sbin/alternatives))
915       JDIR=$(shell /usr/sbin/alternatives --display java | tail -1 | cut -d' ' -f 5 | sed 's%/jre/bin/java.%%g')
916     endif
917   endif
918   ifndef JDIR
919     $(warning No alternatives command found, you need to set JDIR= to point to the root of your Java directory)
920     NO_JVMTI := 1
921   endif
922 endif
923
924 ifndef NO_JVMTI
925   FEATURE_CHECK_CFLAGS-jvmti := -I$(JDIR)/include -I$(JDIR)/include/linux
926   $(call feature_check,jvmti)
927   ifeq ($(feature-jvmti), 1)
928     $(call detected_var,JDIR)
929     ifndef NO_JVMTI_CMLR
930       FEATURE_CHECK_CFLAGS-jvmti-cmlr := $(FEATURE_CHECK_CFLAGS-jvmti)
931       $(call feature_check,jvmti-cmlr)
932       ifeq ($(feature-jvmti-cmlr), 1)
933         CFLAGS += -DHAVE_JVMTI_CMLR
934       endif
935     endif # NO_JVMTI_CMLR
936   else
937     $(warning No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel)
938     NO_JVMTI := 1
939   endif
940 endif
941
942 USE_CXX = 0
943 USE_CLANGLLVM = 0
944 ifdef LIBCLANGLLVM
945   $(call feature_check,cxx)
946   ifneq ($(feature-cxx), 1)
947     msg := $(warning No g++ found, disable clang and llvm support. Please install g++)
948   else
949     $(call feature_check,llvm)
950     $(call feature_check,llvm-version)
951     ifneq ($(feature-llvm), 1)
952       msg := $(warning No suitable libLLVM found, disabling builtin clang and LLVM support. Please install llvm-dev(el) (>= 3.9.0))
953     else
954       $(call feature_check,clang)
955       ifneq ($(feature-clang), 1)
956         msg := $(warning No suitable libclang found, disabling builtin clang and LLVM support. Please install libclang-dev(el) (>= 3.9.0))
957       else
958         CFLAGS += -DHAVE_LIBCLANGLLVM_SUPPORT
959         CXXFLAGS += -DHAVE_LIBCLANGLLVM_SUPPORT -I$(shell $(LLVM_CONFIG) --includedir)
960         $(call detected,CONFIG_CXX)
961         $(call detected,CONFIG_CLANGLLVM)
962         USE_CXX = 1
963         USE_LLVM = 1
964         USE_CLANG = 1
965         ifneq ($(feature-llvm-version),1)
966           msg := $(warning This version of LLVM is not tested. May cause build errors)
967         endif
968       endif
969     endif
970   endif
971 endif
972
973 # Among the variables below, these:
974 #   perfexecdir
975 #   perf_include_dir
976 #   perf_examples_dir
977 #   template_dir
978 #   mandir
979 #   infodir
980 #   htmldir
981 #   ETC_PERFCONFIG (but not sysconfdir)
982 # can be specified as a relative path some/where/else;
983 # this is interpreted as relative to $(prefix) and "perf" at
984 # runtime figures out where they are based on the path to the executable.
985 # This can help installing the suite in a relocatable way.
986
987 # Make the path relative to DESTDIR, not to prefix
988 ifndef DESTDIR
989 prefix ?= $(HOME)
990 endif
991 bindir_relative = bin
992 bindir = $(abspath $(prefix)/$(bindir_relative))
993 mandir = share/man
994 infodir = share/info
995 perfexecdir = libexec/perf-core
996 perf_include_dir = lib/perf/include
997 perf_examples_dir = lib/perf/examples
998 sharedir = $(prefix)/share
999 template_dir = share/perf-core/templates
1000 STRACE_GROUPS_DIR = share/perf-core/strace/groups
1001 htmldir = share/doc/perf-doc
1002 tipdir = share/doc/perf-tip
1003 srcdir = $(srctree)/tools/perf
1004 ifeq ($(prefix),/usr)
1005 sysconfdir = /etc
1006 ETC_PERFCONFIG = $(sysconfdir)/perfconfig
1007 else
1008 sysconfdir = $(prefix)/etc
1009 ETC_PERFCONFIG = etc/perfconfig
1010 endif
1011 ifndef lib
1012 ifeq ($(SRCARCH)$(IS_64_BIT), x861)
1013 lib = lib64
1014 else
1015 lib = lib
1016 endif
1017 endif # lib
1018 libdir = $(prefix)/$(lib)
1019
1020 # Shell quote (do not use $(call) to accommodate ancient setups);
1021 ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG))
1022 STRACE_GROUPS_DIR_SQ = $(subst ','\'',$(STRACE_GROUPS_DIR))
1023 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
1024 bindir_SQ = $(subst ','\'',$(bindir))
1025 mandir_SQ = $(subst ','\'',$(mandir))
1026 infodir_SQ = $(subst ','\'',$(infodir))
1027 perfexecdir_SQ = $(subst ','\'',$(perfexecdir))
1028 perf_include_dir_SQ = $(subst ','\'',$(perf_include_dir))
1029 perf_examples_dir_SQ = $(subst ','\'',$(perf_examples_dir))
1030 template_dir_SQ = $(subst ','\'',$(template_dir))
1031 htmldir_SQ = $(subst ','\'',$(htmldir))
1032 tipdir_SQ = $(subst ','\'',$(tipdir))
1033 prefix_SQ = $(subst ','\'',$(prefix))
1034 sysconfdir_SQ = $(subst ','\'',$(sysconfdir))
1035 libdir_SQ = $(subst ','\'',$(libdir))
1036 srcdir_SQ = $(subst ','\'',$(srcdir))
1037
1038 ifneq ($(filter /%,$(firstword $(perfexecdir))),)
1039 perfexec_instdir = $(perfexecdir)
1040 perf_include_instdir = $(perf_include_dir)
1041 perf_examples_instdir = $(perf_examples_dir)
1042 STRACE_GROUPS_INSTDIR = $(STRACE_GROUPS_DIR)
1043 tip_instdir = $(tipdir)
1044 else
1045 perfexec_instdir = $(prefix)/$(perfexecdir)
1046 perf_include_instdir = $(prefix)/$(perf_include_dir)
1047 perf_examples_instdir = $(prefix)/$(perf_examples_dir)
1048 STRACE_GROUPS_INSTDIR = $(prefix)/$(STRACE_GROUPS_DIR)
1049 tip_instdir = $(prefix)/$(tipdir)
1050 endif
1051 perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir))
1052 perf_include_instdir_SQ = $(subst ','\'',$(perf_include_instdir))
1053 perf_examples_instdir_SQ = $(subst ','\'',$(perf_examples_instdir))
1054 STRACE_GROUPS_INSTDIR_SQ = $(subst ','\'',$(STRACE_GROUPS_INSTDIR))
1055 tip_instdir_SQ = $(subst ','\'',$(tip_instdir))
1056
1057 # If we install to $(HOME) we keep the traceevent default:
1058 # $(HOME)/.traceevent/plugins
1059 # Otherwise we install plugins into the global $(libdir).
1060 ifdef DESTDIR
1061 plugindir=$(libdir)/traceevent/plugins
1062 plugindir_SQ= $(subst ','\'',$(plugindir))
1063 endif
1064
1065 print_var = $(eval $(print_var_code)) $(info $(MSG))
1066 define print_var_code
1067     MSG = $(shell printf '...%30s: %s' $(1) $($(1)))
1068 endef
1069
1070 ifeq ($(VF),1)
1071   # Display EXTRA features which are detected manualy
1072   # from here with feature_check call and thus cannot
1073   # be partof global state output.
1074   $(foreach feat,$(FEATURE_TESTS_EXTRA),$(call feature_print_status,$(feat),))
1075   $(call print_var,prefix)
1076   $(call print_var,bindir)
1077   $(call print_var,libdir)
1078   $(call print_var,sysconfdir)
1079   $(call print_var,LIBUNWIND_DIR)
1080   $(call print_var,LIBDW_DIR)
1081   $(call print_var,JDIR)
1082
1083   ifeq ($(dwarf-post-unwind),1)
1084     $(call feature_print_text,"DWARF post unwind library", $(dwarf-post-unwind-text))
1085   endif
1086   $(info )
1087 endif
1088
1089 $(call detected_var,bindir_SQ)
1090 $(call detected_var,PYTHON_WORD)
1091 ifneq ($(OUTPUT),)
1092 $(call detected_var,OUTPUT)
1093 endif
1094 $(call detected_var,htmldir_SQ)
1095 $(call detected_var,infodir_SQ)
1096 $(call detected_var,mandir_SQ)
1097 $(call detected_var,ETC_PERFCONFIG_SQ)
1098 $(call detected_var,STRACE_GROUPS_DIR_SQ)
1099 $(call detected_var,prefix_SQ)
1100 $(call detected_var,perfexecdir_SQ)
1101 $(call detected_var,perf_include_dir_SQ)
1102 $(call detected_var,perf_examples_dir_SQ)
1103 $(call detected_var,tipdir_SQ)
1104 $(call detected_var,srcdir_SQ)
1105 $(call detected_var,LIBDIR)
1106 $(call detected_var,GTK_CFLAGS)
1107 $(call detected_var,PERL_EMBED_CCOPTS)
1108 $(call detected_var,PYTHON_EMBED_CCOPTS)