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