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