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