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$(src-perf)/lib/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 endif 487 488 ifndef NO_DWARF 489 ifdef PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET 490 CFLAGS += -DHAVE_BPF_PROLOGUE 491 $(call detected,CONFIG_BPF_PROLOGUE) 492 else 493 msg := $(warning BPF prologue is not supported by architecture $(SRCARCH), missing regs_query_register_offset()); 494 endif 495 else 496 msg := $(warning DWARF support is off, BPF prologue is disabled); 497 endif 498 499 endif # NO_LIBBPF 500endif # NO_LIBELF 501 502ifndef NO_SDT 503 ifneq ($(feature-sdt), 1) 504 msg := $(warning No sys/sdt.h found, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev); 505 NO_SDT := 1; 506 else 507 CFLAGS += -DHAVE_SDT_EVENT 508 $(call detected,CONFIG_SDT_EVENT) 509 endif 510endif 511 512ifdef PERF_HAVE_JITDUMP 513 ifndef NO_LIBELF 514 $(call detected,CONFIG_JITDUMP) 515 CFLAGS += -DHAVE_JITDUMP 516 endif 517endif 518 519ifeq ($(SRCARCH),powerpc) 520 ifndef NO_DWARF 521 CFLAGS += -DHAVE_SKIP_CALLCHAIN_IDX 522 endif 523endif 524 525ifndef NO_LIBUNWIND 526 have_libunwind := 527 528 $(call feature_check,libunwind-x86) 529 ifeq ($(feature-libunwind-x86), 1) 530 $(call detected,CONFIG_LIBUNWIND_X86) 531 CFLAGS += -DHAVE_LIBUNWIND_X86_SUPPORT 532 LDFLAGS += -lunwind-x86 533 EXTLIBS_LIBUNWIND += -lunwind-x86 534 have_libunwind = 1 535 endif 536 537 $(call feature_check,libunwind-aarch64) 538 ifeq ($(feature-libunwind-aarch64), 1) 539 $(call detected,CONFIG_LIBUNWIND_AARCH64) 540 CFLAGS += -DHAVE_LIBUNWIND_AARCH64_SUPPORT 541 LDFLAGS += -lunwind-aarch64 542 EXTLIBS_LIBUNWIND += -lunwind-aarch64 543 have_libunwind = 1 544 $(call feature_check,libunwind-debug-frame-aarch64) 545 ifneq ($(feature-libunwind-debug-frame-aarch64), 1) 546 msg := $(warning No debug_frame support found in libunwind-aarch64); 547 CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME_AARCH64 548 endif 549 endif 550 551 ifneq ($(feature-libunwind), 1) 552 msg := $(warning No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR); 553 NO_LOCAL_LIBUNWIND := 1 554 else 555 have_libunwind := 1 556 $(call detected,CONFIG_LOCAL_LIBUNWIND) 557 endif 558 559 ifneq ($(have_libunwind), 1) 560 NO_LIBUNWIND := 1 561 endif 562else 563 NO_LOCAL_LIBUNWIND := 1 564endif 565 566ifndef NO_LIBBPF 567 ifneq ($(feature-bpf), 1) 568 msg := $(warning BPF API too old. Please install recent kernel headers. BPF support in 'perf record' is disabled.) 569 NO_LIBBPF := 1 570 endif 571endif 572 573dwarf-post-unwind := 1 574dwarf-post-unwind-text := BUG 575 576# setup DWARF post unwinder 577ifdef NO_LIBUNWIND 578 ifdef NO_LIBDW_DWARF_UNWIND 579 msg := $(warning Disabling post unwind, no support found.); 580 dwarf-post-unwind := 0 581 else 582 dwarf-post-unwind-text := libdw 583 $(call detected,CONFIG_LIBDW_DWARF_UNWIND) 584 endif 585else 586 dwarf-post-unwind-text := libunwind 587 $(call detected,CONFIG_LIBUNWIND) 588 # Enable libunwind support by default. 589 ifndef NO_LIBDW_DWARF_UNWIND 590 NO_LIBDW_DWARF_UNWIND := 1 591 endif 592endif 593 594ifeq ($(dwarf-post-unwind),1) 595 CFLAGS += -DHAVE_DWARF_UNWIND_SUPPORT 596 $(call detected,CONFIG_DWARF_UNWIND) 597else 598 NO_DWARF_UNWIND := 1 599endif 600 601ifndef NO_LOCAL_LIBUNWIND 602 ifeq ($(SRCARCH),$(filter $(SRCARCH),arm arm64)) 603 $(call feature_check,libunwind-debug-frame) 604 ifneq ($(feature-libunwind-debug-frame), 1) 605 msg := $(warning No debug_frame support found in libunwind); 606 CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME 607 endif 608 else 609 # non-ARM has no dwarf_find_debug_frame() function: 610 CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME 611 endif 612 EXTLIBS += $(LIBUNWIND_LIBS) 613 LDFLAGS += $(LIBUNWIND_LIBS) 614endif 615ifeq ($(findstring -static,${LDFLAGS}),-static) 616 # gcc -static links libgcc_eh which contans piece of libunwind 617 LIBUNWIND_LDFLAGS += -Wl,--allow-multiple-definition 618endif 619 620ifndef NO_LIBUNWIND 621 CFLAGS += -DHAVE_LIBUNWIND_SUPPORT 622 CFLAGS += $(LIBUNWIND_CFLAGS) 623 LDFLAGS += $(LIBUNWIND_LDFLAGS) 624 EXTLIBS += $(EXTLIBS_LIBUNWIND) 625endif 626 627ifeq ($(NO_SYSCALL_TABLE),0) 628 $(call detected,CONFIG_TRACE) 629else 630 ifndef NO_LIBAUDIT 631 ifneq ($(feature-libaudit), 1) 632 msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev); 633 NO_LIBAUDIT := 1 634 else 635 CFLAGS += -DHAVE_LIBAUDIT_SUPPORT 636 EXTLIBS += -laudit 637 $(call detected,CONFIG_TRACE) 638 endif 639 endif 640endif 641 642ifndef NO_LIBCRYPTO 643 ifneq ($(feature-libcrypto), 1) 644 msg := $(warning No libcrypto.h found, disables jitted code injection, please install openssl-devel or libssl-dev); 645 NO_LIBCRYPTO := 1 646 else 647 CFLAGS += -DHAVE_LIBCRYPTO_SUPPORT 648 EXTLIBS += -lcrypto 649 $(call detected,CONFIG_CRYPTO) 650 endif 651endif 652 653ifdef NO_NEWT 654 NO_SLANG=1 655endif 656 657ifndef NO_SLANG 658 ifneq ($(feature-libslang), 1) 659 ifneq ($(feature-libslang-include-subdir), 1) 660 msg := $(warning slang not found, disables TUI support. Please install slang-devel, libslang-dev or libslang2-dev); 661 NO_SLANG := 1 662 else 663 CFLAGS += -DHAVE_SLANG_INCLUDE_SUBDIR 664 endif 665 endif 666 ifndef NO_SLANG 667 # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h 668 CFLAGS += -DHAVE_SLANG_SUPPORT 669 EXTLIBS += -lslang 670 $(call detected,CONFIG_SLANG) 671 endif 672endif 673 674ifndef NO_GTK2 675 FLAGS_GTK2=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) 676 ifneq ($(feature-gtk2), 1) 677 msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev); 678 NO_GTK2 := 1 679 else 680 ifeq ($(feature-gtk2-infobar), 1) 681 GTK_CFLAGS := -DHAVE_GTK_INFO_BAR_SUPPORT 682 endif 683 CFLAGS += -DHAVE_GTK2_SUPPORT 684 GTK_CFLAGS += $(shell $(PKG_CONFIG) --cflags gtk+-2.0 2>/dev/null) 685 GTK_LIBS := $(shell $(PKG_CONFIG) --libs gtk+-2.0 2>/dev/null) 686 EXTLIBS += -ldl 687 endif 688endif 689 690ifdef NO_LIBPERL 691 CFLAGS += -DNO_LIBPERL 692else 693 PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null) 694 PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS)) 695 PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) 696 PERL_EMBED_CCOPTS = $(shell perl -MExtUtils::Embed -e ccopts 2>/dev/null) 697 PERL_EMBED_CCOPTS := $(filter-out -specs=%,$(PERL_EMBED_CCOPTS)) 698 PERL_EMBED_LDOPTS := $(filter-out -specs=%,$(PERL_EMBED_LDOPTS)) 699 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) 700 701 ifneq ($(feature-libperl), 1) 702 CFLAGS += -DNO_LIBPERL 703 NO_LIBPERL := 1 704 msg := $(warning Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev); 705 else 706 LDFLAGS += $(PERL_EMBED_LDFLAGS) 707 EXTLIBS += $(PERL_EMBED_LIBADD) 708 CFLAGS += -DHAVE_LIBPERL_SUPPORT 709 $(call detected,CONFIG_LIBPERL) 710 endif 711endif 712 713ifeq ($(feature-timerfd), 1) 714 CFLAGS += -DHAVE_TIMERFD_SUPPORT 715else 716 msg := $(warning No timerfd support. Disables 'perf kvm stat live'); 717endif 718 719disable-python = $(eval $(disable-python_code)) 720define disable-python_code 721 CFLAGS += -DNO_LIBPYTHON 722 $(warning $1) 723 NO_LIBPYTHON := 1 724endef 725 726ifdef NO_LIBPYTHON 727 $(call disable-python,Python support disabled by user) 728else 729 730 ifndef PYTHON 731 $(call disable-python,No python interpreter was found: disables Python support - please install python-devel/python-dev) 732 else 733 PYTHON_WORD := $(call shell-wordify,$(PYTHON)) 734 735 ifndef PYTHON_CONFIG 736 $(call disable-python,No 'python-config' tool was found: disables Python support - please install python-devel/python-dev) 737 else 738 739 ifneq ($(feature-libpython), 1) 740 $(call disable-python,No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev) 741 else 742 LDFLAGS += $(PYTHON_EMBED_LDFLAGS) 743 EXTLIBS += $(PYTHON_EMBED_LIBADD) 744 LANG_BINDINGS += $(obj-perf)python/perf.so 745 CFLAGS += -DHAVE_LIBPYTHON_SUPPORT 746 $(call detected,CONFIG_LIBPYTHON) 747 endif 748 endif 749 endif 750endif 751 752ifeq ($(feature-libbfd), 1) 753 EXTLIBS += -lbfd -lopcodes 754else 755 # we are on a system that requires -liberty and (maybe) -lz 756 # to link against -lbfd; test each case individually here 757 758 # call all detections now so we get correct 759 # status in VF output 760 $(call feature_check,libbfd-liberty) 761 $(call feature_check,libbfd-liberty-z) 762 763 ifeq ($(feature-libbfd-liberty), 1) 764 EXTLIBS += -lbfd -lopcodes -liberty 765 FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -ldl 766 else 767 ifeq ($(feature-libbfd-liberty-z), 1) 768 EXTLIBS += -lbfd -lopcodes -liberty -lz 769 FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -lz -ldl 770 endif 771 endif 772 $(call feature_check,disassembler-four-args) 773endif 774 775ifdef NO_DEMANGLE 776 CFLAGS += -DNO_DEMANGLE 777else 778 ifdef HAVE_CPLUS_DEMANGLE_SUPPORT 779 EXTLIBS += -liberty 780 else 781 ifeq ($(filter -liberty,$(EXTLIBS)),) 782 $(call feature_check,cplus-demangle) 783 784 # we dont have neither HAVE_CPLUS_DEMANGLE_SUPPORT 785 # or any of 'bfd iberty z' trinity 786 ifeq ($(feature-cplus-demangle), 1) 787 EXTLIBS += -liberty 788 else 789 msg := $(warning No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling) 790 CFLAGS += -DNO_DEMANGLE 791 endif 792 endif 793 endif 794 795 ifneq ($(filter -liberty,$(EXTLIBS)),) 796 CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT 797 endif 798endif 799 800ifneq ($(filter -lbfd,$(EXTLIBS)),) 801 CFLAGS += -DHAVE_LIBBFD_SUPPORT 802endif 803 804ifndef NO_ZLIB 805 ifeq ($(feature-zlib), 1) 806 CFLAGS += -DHAVE_ZLIB_SUPPORT 807 EXTLIBS += -lz 808 $(call detected,CONFIG_ZLIB) 809 else 810 NO_ZLIB := 1 811 endif 812endif 813 814ifndef NO_LZMA 815 ifeq ($(feature-lzma), 1) 816 CFLAGS += -DHAVE_LZMA_SUPPORT 817 EXTLIBS += -llzma 818 $(call detected,CONFIG_LZMA) 819 else 820 msg := $(warning No liblzma found, disables xz kernel module decompression, please install xz-devel/liblzma-dev); 821 NO_LZMA := 1 822 endif 823endif 824 825ifndef NO_LIBZSTD 826 ifeq ($(feature-libzstd), 1) 827 CFLAGS += -DHAVE_ZSTD_SUPPORT 828 CFLAGS += $(LIBZSTD_CFLAGS) 829 LDFLAGS += $(LIBZSTD_LDFLAGS) 830 EXTLIBS += -lzstd 831 $(call detected,CONFIG_ZSTD) 832 else 833 msg := $(warning No libzstd found, disables trace compression, please install libzstd-dev[el] and/or set LIBZSTD_DIR); 834 NO_LIBZSTD := 1 835 endif 836endif 837 838ifndef NO_LIBCAP 839 ifeq ($(feature-libcap), 1) 840 CFLAGS += -DHAVE_LIBCAP_SUPPORT 841 EXTLIBS += -lcap 842 $(call detected,CONFIG_LIBCAP) 843 else 844 msg := $(warning No libcap found, disables capability support, please install libcap-devel/libcap-dev); 845 NO_LIBCAP := 1 846 endif 847endif 848 849ifndef NO_BACKTRACE 850 ifeq ($(feature-backtrace), 1) 851 CFLAGS += -DHAVE_BACKTRACE_SUPPORT 852 endif 853endif 854 855ifndef NO_LIBNUMA 856 ifeq ($(feature-libnuma), 0) 857 msg := $(warning No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev); 858 NO_LIBNUMA := 1 859 else 860 ifeq ($(feature-numa_num_possible_cpus), 0) 861 msg := $(warning Old numa library found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev >= 2.0.8); 862 NO_LIBNUMA := 1 863 else 864 CFLAGS += -DHAVE_LIBNUMA_SUPPORT 865 EXTLIBS += -lnuma 866 $(call detected,CONFIG_NUMA) 867 endif 868 endif 869endif 870 871ifdef HAVE_KVM_STAT_SUPPORT 872 CFLAGS += -DHAVE_KVM_STAT_SUPPORT 873endif 874 875ifeq ($(feature-disassembler-four-args), 1) 876 CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE 877endif 878 879ifeq (${IS_64_BIT}, 1) 880 ifndef NO_PERF_READ_VDSO32 881 $(call feature_check,compile-32) 882 ifeq ($(feature-compile-32), 1) 883 CFLAGS += -DHAVE_PERF_READ_VDSO32 884 else 885 NO_PERF_READ_VDSO32 := 1 886 endif 887 endif 888 ifneq ($(SRCARCH), x86) 889 NO_PERF_READ_VDSOX32 := 1 890 endif 891 ifndef NO_PERF_READ_VDSOX32 892 $(call feature_check,compile-x32) 893 ifeq ($(feature-compile-x32), 1) 894 CFLAGS += -DHAVE_PERF_READ_VDSOX32 895 else 896 NO_PERF_READ_VDSOX32 := 1 897 endif 898 endif 899else 900 NO_PERF_READ_VDSO32 := 1 901 NO_PERF_READ_VDSOX32 := 1 902endif 903 904ifndef NO_LIBBABELTRACE 905 $(call feature_check,libbabeltrace) 906 ifeq ($(feature-libbabeltrace), 1) 907 CFLAGS += -DHAVE_LIBBABELTRACE_SUPPORT $(LIBBABELTRACE_CFLAGS) 908 LDFLAGS += $(LIBBABELTRACE_LDFLAGS) 909 EXTLIBS += -lbabeltrace-ctf 910 $(call detected,CONFIG_LIBBABELTRACE) 911 else 912 msg := $(warning No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev); 913 endif 914endif 915 916ifndef NO_AUXTRACE 917 ifeq ($(SRCARCH),x86) 918 ifeq ($(feature-get_cpuid), 0) 919 msg := $(warning Your gcc lacks the __get_cpuid() builtin, disables support for auxtrace/Intel PT, please install a newer gcc); 920 NO_AUXTRACE := 1 921 endif 922 endif 923 ifndef NO_AUXTRACE 924 $(call detected,CONFIG_AUXTRACE) 925 CFLAGS += -DHAVE_AUXTRACE_SUPPORT 926 endif 927endif 928 929ifndef NO_JVMTI 930 ifneq (,$(wildcard /usr/sbin/update-java-alternatives)) 931 JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | awk '{print $$3}') 932 else 933 ifneq (,$(wildcard /usr/sbin/alternatives)) 934 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') 935 endif 936 endif 937 ifndef JDIR 938 $(warning No alternatives command found, you need to set JDIR= to point to the root of your Java directory) 939 NO_JVMTI := 1 940 endif 941endif 942 943ifndef NO_JVMTI 944 FEATURE_CHECK_CFLAGS-jvmti := -I$(JDIR)/include -I$(JDIR)/include/linux 945 $(call feature_check,jvmti) 946 ifeq ($(feature-jvmti), 1) 947 $(call detected_var,JDIR) 948 ifndef NO_JVMTI_CMLR 949 FEATURE_CHECK_CFLAGS-jvmti-cmlr := $(FEATURE_CHECK_CFLAGS-jvmti) 950 $(call feature_check,jvmti-cmlr) 951 ifeq ($(feature-jvmti-cmlr), 1) 952 CFLAGS += -DHAVE_JVMTI_CMLR 953 endif 954 endif # NO_JVMTI_CMLR 955 else 956 $(warning No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel) 957 NO_JVMTI := 1 958 endif 959endif 960 961USE_CXX = 0 962USE_CLANGLLVM = 0 963ifdef LIBCLANGLLVM 964 $(call feature_check,cxx) 965 ifneq ($(feature-cxx), 1) 966 msg := $(warning No g++ found, disable clang and llvm support. Please install g++) 967 else 968 $(call feature_check,llvm) 969 $(call feature_check,llvm-version) 970 ifneq ($(feature-llvm), 1) 971 msg := $(warning No suitable libLLVM found, disabling builtin clang and LLVM support. Please install llvm-dev(el) (>= 3.9.0)) 972 else 973 $(call feature_check,clang) 974 ifneq ($(feature-clang), 1) 975 msg := $(warning No suitable libclang found, disabling builtin clang and LLVM support. Please install libclang-dev(el) (>= 3.9.0)) 976 else 977 CFLAGS += -DHAVE_LIBCLANGLLVM_SUPPORT 978 CXXFLAGS += -DHAVE_LIBCLANGLLVM_SUPPORT -I$(shell $(LLVM_CONFIG) --includedir) 979 $(call detected,CONFIG_CXX) 980 $(call detected,CONFIG_CLANGLLVM) 981 USE_CXX = 1 982 USE_LLVM = 1 983 USE_CLANG = 1 984 ifneq ($(feature-llvm-version),1) 985 msg := $(warning This version of LLVM is not tested. May cause build errors) 986 endif 987 endif 988 endif 989 endif 990endif 991 992# Among the variables below, these: 993# perfexecdir 994# perf_include_dir 995# perf_examples_dir 996# template_dir 997# mandir 998# infodir 999# htmldir 1000# ETC_PERFCONFIG (but not sysconfdir) 1001# can be specified as a relative path some/where/else; 1002# this is interpreted as relative to $(prefix) and "perf" at 1003# runtime figures out where they are based on the path to the executable. 1004# This can help installing the suite in a relocatable way. 1005 1006# Make the path relative to DESTDIR, not to prefix 1007ifndef DESTDIR 1008prefix ?= $(HOME) 1009endif 1010bindir_relative = bin 1011bindir = $(abspath $(prefix)/$(bindir_relative)) 1012mandir = share/man 1013infodir = share/info 1014perfexecdir = libexec/perf-core 1015perf_include_dir = lib/perf/include 1016perf_examples_dir = lib/perf/examples 1017sharedir = $(prefix)/share 1018template_dir = share/perf-core/templates 1019STRACE_GROUPS_DIR = share/perf-core/strace/groups 1020htmldir = share/doc/perf-doc 1021tipdir = share/doc/perf-tip 1022srcdir = $(srctree)/tools/perf 1023ifeq ($(prefix),/usr) 1024sysconfdir = /etc 1025ETC_PERFCONFIG = $(sysconfdir)/perfconfig 1026else 1027sysconfdir = $(prefix)/etc 1028ETC_PERFCONFIG = etc/perfconfig 1029endif 1030ifndef lib 1031ifeq ($(SRCARCH)$(IS_64_BIT), x861) 1032lib = lib64 1033else 1034lib = lib 1035endif 1036endif # lib 1037libdir = $(prefix)/$(lib) 1038 1039# Shell quote (do not use $(call) to accommodate ancient setups); 1040ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG)) 1041STRACE_GROUPS_DIR_SQ = $(subst ','\'',$(STRACE_GROUPS_DIR)) 1042DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) 1043bindir_SQ = $(subst ','\'',$(bindir)) 1044mandir_SQ = $(subst ','\'',$(mandir)) 1045infodir_SQ = $(subst ','\'',$(infodir)) 1046perfexecdir_SQ = $(subst ','\'',$(perfexecdir)) 1047perf_include_dir_SQ = $(subst ','\'',$(perf_include_dir)) 1048perf_examples_dir_SQ = $(subst ','\'',$(perf_examples_dir)) 1049template_dir_SQ = $(subst ','\'',$(template_dir)) 1050htmldir_SQ = $(subst ','\'',$(htmldir)) 1051tipdir_SQ = $(subst ','\'',$(tipdir)) 1052prefix_SQ = $(subst ','\'',$(prefix)) 1053sysconfdir_SQ = $(subst ','\'',$(sysconfdir)) 1054libdir_SQ = $(subst ','\'',$(libdir)) 1055srcdir_SQ = $(subst ','\'',$(srcdir)) 1056 1057ifneq ($(filter /%,$(firstword $(perfexecdir))),) 1058perfexec_instdir = $(perfexecdir) 1059perf_include_instdir = $(perf_include_dir) 1060perf_examples_instdir = $(perf_examples_dir) 1061STRACE_GROUPS_INSTDIR = $(STRACE_GROUPS_DIR) 1062tip_instdir = $(tipdir) 1063else 1064perfexec_instdir = $(prefix)/$(perfexecdir) 1065perf_include_instdir = $(prefix)/$(perf_include_dir) 1066perf_examples_instdir = $(prefix)/$(perf_examples_dir) 1067STRACE_GROUPS_INSTDIR = $(prefix)/$(STRACE_GROUPS_DIR) 1068tip_instdir = $(prefix)/$(tipdir) 1069endif 1070perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir)) 1071perf_include_instdir_SQ = $(subst ','\'',$(perf_include_instdir)) 1072perf_examples_instdir_SQ = $(subst ','\'',$(perf_examples_instdir)) 1073STRACE_GROUPS_INSTDIR_SQ = $(subst ','\'',$(STRACE_GROUPS_INSTDIR)) 1074tip_instdir_SQ = $(subst ','\'',$(tip_instdir)) 1075 1076# If we install to $(HOME) we keep the traceevent default: 1077# $(HOME)/.traceevent/plugins 1078# Otherwise we install plugins into the global $(libdir). 1079ifdef DESTDIR 1080plugindir=$(libdir)/traceevent/plugins 1081plugindir_SQ= $(subst ','\'',$(plugindir)) 1082endif 1083 1084print_var = $(eval $(print_var_code)) $(info $(MSG)) 1085define print_var_code 1086 MSG = $(shell printf '...%30s: %s' $(1) $($(1))) 1087endef 1088 1089ifeq ($(VF),1) 1090 # Display EXTRA features which are detected manualy 1091 # from here with feature_check call and thus cannot 1092 # be partof global state output. 1093 $(foreach feat,$(FEATURE_TESTS_EXTRA),$(call feature_print_status,$(feat),)) 1094 $(call print_var,prefix) 1095 $(call print_var,bindir) 1096 $(call print_var,libdir) 1097 $(call print_var,sysconfdir) 1098 $(call print_var,LIBUNWIND_DIR) 1099 $(call print_var,LIBDW_DIR) 1100 $(call print_var,JDIR) 1101 1102 ifeq ($(dwarf-post-unwind),1) 1103 $(call feature_print_text,"DWARF post unwind library", $(dwarf-post-unwind-text)) 1104 endif 1105 $(info ) 1106endif 1107 1108$(call detected_var,bindir_SQ) 1109$(call detected_var,PYTHON_WORD) 1110ifneq ($(OUTPUT),) 1111$(call detected_var,OUTPUT) 1112endif 1113$(call detected_var,htmldir_SQ) 1114$(call detected_var,infodir_SQ) 1115$(call detected_var,mandir_SQ) 1116$(call detected_var,ETC_PERFCONFIG_SQ) 1117$(call detected_var,STRACE_GROUPS_DIR_SQ) 1118$(call detected_var,prefix_SQ) 1119$(call detected_var,perfexecdir_SQ) 1120$(call detected_var,perf_include_dir_SQ) 1121$(call detected_var,perf_examples_dir_SQ) 1122$(call detected_var,tipdir_SQ) 1123$(call detected_var,srcdir_SQ) 1124$(call detected_var,LIBDIR) 1125$(call detected_var,GTK_CFLAGS) 1126$(call detected_var,PERL_EMBED_CCOPTS) 1127$(call detected_var,PYTHON_EMBED_CCOPTS) 1128