162306a36Sopenharmony_ciinclude $(srctree)/tools/scripts/Makefile.include 262306a36Sopenharmony_ciinclude $(srctree)/tools/scripts/utilities.mak 362306a36Sopenharmony_ci 462306a36Sopenharmony_ciperf-y += arm64-frame-pointer-unwind-support.o 562306a36Sopenharmony_ciperf-y += addr_location.o 662306a36Sopenharmony_ciperf-y += annotate.o 762306a36Sopenharmony_ciperf-y += block-info.o 862306a36Sopenharmony_ciperf-y += block-range.o 962306a36Sopenharmony_ciperf-y += build-id.o 1062306a36Sopenharmony_ciperf-y += cacheline.o 1162306a36Sopenharmony_ciperf-y += config.o 1262306a36Sopenharmony_ciperf-y += copyfile.o 1362306a36Sopenharmony_ciperf-y += ctype.o 1462306a36Sopenharmony_ciperf-y += db-export.o 1562306a36Sopenharmony_ciperf-y += env.o 1662306a36Sopenharmony_ciperf-y += event.o 1762306a36Sopenharmony_ciperf-y += evlist.o 1862306a36Sopenharmony_ciperf-y += sideband_evlist.o 1962306a36Sopenharmony_ciperf-y += evsel.o 2062306a36Sopenharmony_ciperf-y += evsel_fprintf.o 2162306a36Sopenharmony_ciperf-y += perf_event_attr_fprintf.o 2262306a36Sopenharmony_ciperf-y += evswitch.o 2362306a36Sopenharmony_ciperf-y += find_bit.o 2462306a36Sopenharmony_ciperf-y += get_current_dir_name.o 2562306a36Sopenharmony_ciperf-y += levenshtein.o 2662306a36Sopenharmony_ciperf-y += mmap.o 2762306a36Sopenharmony_ciperf-y += memswap.o 2862306a36Sopenharmony_ciperf-y += parse-events.o 2962306a36Sopenharmony_ciperf-y += print-events.o 3062306a36Sopenharmony_ciperf-y += tracepoint.o 3162306a36Sopenharmony_ciperf-y += perf_regs.o 3262306a36Sopenharmony_ciperf-y += perf-regs-arch/ 3362306a36Sopenharmony_ciperf-y += path.o 3462306a36Sopenharmony_ciperf-y += print_binary.o 3562306a36Sopenharmony_ciperf-y += rlimit.o 3662306a36Sopenharmony_ciperf-y += argv_split.o 3762306a36Sopenharmony_ciperf-y += rbtree.o 3862306a36Sopenharmony_ciperf-y += libstring.o 3962306a36Sopenharmony_ciperf-y += bitmap.o 4062306a36Sopenharmony_ciperf-y += hweight.o 4162306a36Sopenharmony_ciperf-y += smt.o 4262306a36Sopenharmony_ciperf-y += strbuf.o 4362306a36Sopenharmony_ciperf-y += string.o 4462306a36Sopenharmony_ciperf-y += strlist.o 4562306a36Sopenharmony_ciperf-y += strfilter.o 4662306a36Sopenharmony_ciperf-y += top.o 4762306a36Sopenharmony_ciperf-y += usage.o 4862306a36Sopenharmony_ciperf-y += dso.o 4962306a36Sopenharmony_ciperf-y += dsos.o 5062306a36Sopenharmony_ciperf-y += symbol.o 5162306a36Sopenharmony_ciperf-y += symbol_fprintf.o 5262306a36Sopenharmony_ciperf-y += color.o 5362306a36Sopenharmony_ciperf-y += color_config.o 5462306a36Sopenharmony_ciperf-y += metricgroup.o 5562306a36Sopenharmony_ciperf-y += header.o 5662306a36Sopenharmony_ciperf-y += callchain.o 5762306a36Sopenharmony_ciperf-y += values.o 5862306a36Sopenharmony_ciperf-y += debug.o 5962306a36Sopenharmony_ciperf-y += fncache.o 6062306a36Sopenharmony_ciperf-y += machine.o 6162306a36Sopenharmony_ciperf-y += map.o 6262306a36Sopenharmony_ciperf-y += maps.o 6362306a36Sopenharmony_ciperf-y += pstack.o 6462306a36Sopenharmony_ciperf-y += session.o 6562306a36Sopenharmony_ciperf-y += sample-raw.o 6662306a36Sopenharmony_ciperf-y += s390-sample-raw.o 6762306a36Sopenharmony_ciperf-y += amd-sample-raw.o 6862306a36Sopenharmony_ciperf-$(CONFIG_TRACE) += syscalltbl.o 6962306a36Sopenharmony_ciperf-y += ordered-events.o 7062306a36Sopenharmony_ciperf-y += namespaces.o 7162306a36Sopenharmony_ciperf-y += comm.o 7262306a36Sopenharmony_ciperf-y += thread.o 7362306a36Sopenharmony_ciperf-y += thread_map.o 7462306a36Sopenharmony_ciperf-y += parse-events-flex.o 7562306a36Sopenharmony_ciperf-y += parse-events-bison.o 7662306a36Sopenharmony_ciperf-y += pmu.o 7762306a36Sopenharmony_ciperf-y += pmus.o 7862306a36Sopenharmony_ciperf-y += pmu-flex.o 7962306a36Sopenharmony_ciperf-y += pmu-bison.o 8062306a36Sopenharmony_ciperf-y += svghelper.o 8162306a36Sopenharmony_ciperf-$(CONFIG_LIBTRACEEVENT) += trace-event-info.o 8262306a36Sopenharmony_ciperf-y += trace-event-scripting.o 8362306a36Sopenharmony_ciperf-$(CONFIG_LIBTRACEEVENT) += trace-event.o 8462306a36Sopenharmony_ciperf-$(CONFIG_LIBTRACEEVENT) += trace-event-parse.o 8562306a36Sopenharmony_ciperf-$(CONFIG_LIBTRACEEVENT) += trace-event-read.o 8662306a36Sopenharmony_ciperf-y += sort.o 8762306a36Sopenharmony_ciperf-y += hist.o 8862306a36Sopenharmony_ciperf-y += util.o 8962306a36Sopenharmony_ciperf-y += cpumap.o 9062306a36Sopenharmony_ciperf-y += affinity.o 9162306a36Sopenharmony_ciperf-y += cputopo.o 9262306a36Sopenharmony_ciperf-y += cgroup.o 9362306a36Sopenharmony_ciperf-y += target.o 9462306a36Sopenharmony_ciperf-y += rblist.o 9562306a36Sopenharmony_ciperf-y += intlist.o 9662306a36Sopenharmony_ciperf-y += vdso.o 9762306a36Sopenharmony_ciperf-y += counts.o 9862306a36Sopenharmony_ciperf-y += stat.o 9962306a36Sopenharmony_ciperf-y += stat-shadow.o 10062306a36Sopenharmony_ciperf-y += stat-display.o 10162306a36Sopenharmony_ciperf-y += perf_api_probe.o 10262306a36Sopenharmony_ciperf-y += record.o 10362306a36Sopenharmony_ciperf-y += srcline.o 10462306a36Sopenharmony_ciperf-y += srccode.o 10562306a36Sopenharmony_ciperf-y += synthetic-events.o 10662306a36Sopenharmony_ciperf-y += data.o 10762306a36Sopenharmony_ciperf-y += tsc.o 10862306a36Sopenharmony_ciperf-y += cloexec.o 10962306a36Sopenharmony_ciperf-y += call-path.o 11062306a36Sopenharmony_ciperf-y += rwsem.o 11162306a36Sopenharmony_ciperf-y += thread-stack.o 11262306a36Sopenharmony_ciperf-y += spark.o 11362306a36Sopenharmony_ciperf-y += topdown.o 11462306a36Sopenharmony_ciperf-y += iostat.o 11562306a36Sopenharmony_ciperf-y += stream.o 11662306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += auxtrace.o 11762306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/ 11862306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += intel-pt.o 11962306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += intel-bts.o 12062306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += arm-spe.o 12162306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += arm-spe-decoder/ 12262306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += hisi-ptt.o 12362306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += hisi-ptt-decoder/ 12462306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += s390-cpumsf.o 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ciifdef CONFIG_LIBOPENCSD 12762306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += cs-etm.o 12862306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += cs-etm-decoder/ 12962306a36Sopenharmony_ciendif 13062306a36Sopenharmony_ciperf-$(CONFIG_AUXTRACE) += cs-etm-base.o 13162306a36Sopenharmony_ci 13262306a36Sopenharmony_ciperf-y += parse-branch-options.o 13362306a36Sopenharmony_ciperf-y += dump-insn.o 13462306a36Sopenharmony_ciperf-y += parse-regs-options.o 13562306a36Sopenharmony_ciperf-y += parse-sublevel-options.o 13662306a36Sopenharmony_ciperf-y += term.o 13762306a36Sopenharmony_ciperf-y += help-unknown-cmd.o 13862306a36Sopenharmony_ciperf-y += dlfilter.o 13962306a36Sopenharmony_ciperf-y += mem-events.o 14062306a36Sopenharmony_ciperf-y += vsprintf.o 14162306a36Sopenharmony_ciperf-y += units.o 14262306a36Sopenharmony_ciperf-y += time-utils.o 14362306a36Sopenharmony_ciperf-y += expr-flex.o 14462306a36Sopenharmony_ciperf-y += expr-bison.o 14562306a36Sopenharmony_ciperf-y += expr.o 14662306a36Sopenharmony_ciperf-y += branch.o 14762306a36Sopenharmony_ciperf-y += mem2node.o 14862306a36Sopenharmony_ciperf-y += clockid.o 14962306a36Sopenharmony_ciperf-y += list_sort.o 15062306a36Sopenharmony_ciperf-y += mutex.o 15162306a36Sopenharmony_ciperf-y += sharded_mutex.o 15262306a36Sopenharmony_ci 15362306a36Sopenharmony_ciperf-$(CONFIG_LIBBPF) += bpf_map.o 15462306a36Sopenharmony_ciperf-$(CONFIG_PERF_BPF_SKEL) += bpf_counter.o 15562306a36Sopenharmony_ciperf-$(CONFIG_PERF_BPF_SKEL) += bpf_counter_cgroup.o 15662306a36Sopenharmony_ciperf-$(CONFIG_PERF_BPF_SKEL) += bpf_ftrace.o 15762306a36Sopenharmony_ciperf-$(CONFIG_PERF_BPF_SKEL) += bpf_off_cpu.o 15862306a36Sopenharmony_ciperf-$(CONFIG_PERF_BPF_SKEL) += bpf-filter.o 15962306a36Sopenharmony_ciperf-$(CONFIG_PERF_BPF_SKEL) += bpf-filter-flex.o 16062306a36Sopenharmony_ciperf-$(CONFIG_PERF_BPF_SKEL) += bpf-filter-bison.o 16162306a36Sopenharmony_ci 16262306a36Sopenharmony_ciifeq ($(CONFIG_LIBTRACEEVENT),y) 16362306a36Sopenharmony_ci perf-$(CONFIG_PERF_BPF_SKEL) += bpf_lock_contention.o 16462306a36Sopenharmony_ciendif 16562306a36Sopenharmony_ci 16662306a36Sopenharmony_ciifeq ($(CONFIG_LIBTRACEEVENT),y) 16762306a36Sopenharmony_ci perf-$(CONFIG_PERF_BPF_SKEL) += bpf_kwork.o 16862306a36Sopenharmony_ciendif 16962306a36Sopenharmony_ci 17062306a36Sopenharmony_ciperf-$(CONFIG_LIBELF) += symbol-elf.o 17162306a36Sopenharmony_ciperf-$(CONFIG_LIBELF) += probe-file.o 17262306a36Sopenharmony_ciperf-$(CONFIG_LIBELF) += probe-event.o 17362306a36Sopenharmony_ci 17462306a36Sopenharmony_ciifdef CONFIG_LIBBPF_DYNAMIC 17562306a36Sopenharmony_ci hashmap := 1 17662306a36Sopenharmony_ciendif 17762306a36Sopenharmony_ciifndef CONFIG_LIBBPF 17862306a36Sopenharmony_ci hashmap := 1 17962306a36Sopenharmony_ciendif 18062306a36Sopenharmony_ci 18162306a36Sopenharmony_ciifdef hashmap 18262306a36Sopenharmony_ciperf-y += hashmap.o 18362306a36Sopenharmony_ciendif 18462306a36Sopenharmony_ci 18562306a36Sopenharmony_ciifndef CONFIG_LIBELF 18662306a36Sopenharmony_ciperf-y += symbol-minimal.o 18762306a36Sopenharmony_ciendif 18862306a36Sopenharmony_ci 18962306a36Sopenharmony_ciifndef CONFIG_SETNS 19062306a36Sopenharmony_ciperf-y += setns.o 19162306a36Sopenharmony_ciendif 19262306a36Sopenharmony_ci 19362306a36Sopenharmony_ciperf-$(CONFIG_DWARF) += probe-finder.o 19462306a36Sopenharmony_ciperf-$(CONFIG_DWARF) += dwarf-aux.o 19562306a36Sopenharmony_ciperf-$(CONFIG_DWARF) += dwarf-regs.o 19662306a36Sopenharmony_ci 19762306a36Sopenharmony_ciperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o 19862306a36Sopenharmony_ciperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o 19962306a36Sopenharmony_ciperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o 20062306a36Sopenharmony_ciperf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o 20162306a36Sopenharmony_ciperf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_ciifeq ($(CONFIG_LIBTRACEEVENT),y) 20462306a36Sopenharmony_ci perf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o 20562306a36Sopenharmony_ciendif 20662306a36Sopenharmony_ci 20762306a36Sopenharmony_ciperf-y += data-convert-json.o 20862306a36Sopenharmony_ci 20962306a36Sopenharmony_ciperf-y += scripting-engines/ 21062306a36Sopenharmony_ci 21162306a36Sopenharmony_ciperf-$(CONFIG_ZLIB) += zlib.o 21262306a36Sopenharmony_ciperf-$(CONFIG_LZMA) += lzma.o 21362306a36Sopenharmony_ciperf-$(CONFIG_ZSTD) += zstd.o 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_ciperf-$(CONFIG_LIBCAP) += cap.o 21662306a36Sopenharmony_ci 21762306a36Sopenharmony_ciperf-$(CONFIG_CXX_DEMANGLE) += demangle-cxx.o 21862306a36Sopenharmony_ciperf-y += demangle-ocaml.o 21962306a36Sopenharmony_ciperf-y += demangle-java.o 22062306a36Sopenharmony_ciperf-y += demangle-rust.o 22162306a36Sopenharmony_ci 22262306a36Sopenharmony_ciifdef CONFIG_JITDUMP 22362306a36Sopenharmony_ciperf-$(CONFIG_LIBELF) += jitdump.o 22462306a36Sopenharmony_ciperf-$(CONFIG_LIBELF) += genelf.o 22562306a36Sopenharmony_ciperf-$(CONFIG_DWARF) += genelf_debug.o 22662306a36Sopenharmony_ciendif 22762306a36Sopenharmony_ci 22862306a36Sopenharmony_ciperf-y += perf-hooks.o 22962306a36Sopenharmony_ci 23062306a36Sopenharmony_ciperf-$(CONFIG_LIBBPF) += bpf-event.o 23162306a36Sopenharmony_ciperf-$(CONFIG_LIBBPF) += bpf-utils.o 23262306a36Sopenharmony_ci 23362306a36Sopenharmony_ciperf-$(CONFIG_LIBPFM4) += pfm.o 23462306a36Sopenharmony_ci 23562306a36Sopenharmony_ciCFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 23662306a36Sopenharmony_ci 23762306a36Sopenharmony_ci# avoid compiler warnings in 32-bit mode 23862306a36Sopenharmony_ciCFLAGS_genelf_debug.o += -Wno-packed 23962306a36Sopenharmony_ci 24062306a36Sopenharmony_ci$(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-flex.h: util/parse-events.l $(OUTPUT)util/parse-events-bison.c 24162306a36Sopenharmony_ci $(call rule_mkdir) 24262306a36Sopenharmony_ci $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/parse-events-flex.c \ 24362306a36Sopenharmony_ci --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) $< 24462306a36Sopenharmony_ci 24562306a36Sopenharmony_ci$(OUTPUT)util/parse-events-bison.c $(OUTPUT)util/parse-events-bison.h: util/parse-events.y 24662306a36Sopenharmony_ci $(call rule_mkdir) 24762306a36Sopenharmony_ci $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) $(BISON_FALLBACK_FLAGS) \ 24862306a36Sopenharmony_ci -o $(OUTPUT)util/parse-events-bison.c -p parse_events_ 24962306a36Sopenharmony_ci 25062306a36Sopenharmony_ci$(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-flex.h: util/expr.l $(OUTPUT)util/expr-bison.c 25162306a36Sopenharmony_ci $(call rule_mkdir) 25262306a36Sopenharmony_ci $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/expr-flex.c \ 25362306a36Sopenharmony_ci --header-file=$(OUTPUT)util/expr-flex.h $(PARSER_DEBUG_FLEX) $< 25462306a36Sopenharmony_ci 25562306a36Sopenharmony_ci$(OUTPUT)util/expr-bison.c $(OUTPUT)util/expr-bison.h: util/expr.y 25662306a36Sopenharmony_ci $(call rule_mkdir) 25762306a36Sopenharmony_ci $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ 25862306a36Sopenharmony_ci -o $(OUTPUT)util/expr-bison.c -p expr_ 25962306a36Sopenharmony_ci 26062306a36Sopenharmony_ci$(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-flex.h: util/pmu.l $(OUTPUT)util/pmu-bison.c 26162306a36Sopenharmony_ci $(call rule_mkdir) 26262306a36Sopenharmony_ci $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/pmu-flex.c \ 26362306a36Sopenharmony_ci --header-file=$(OUTPUT)util/pmu-flex.h $(PARSER_DEBUG_FLEX) $< 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_ci$(OUTPUT)util/pmu-bison.c $(OUTPUT)util/pmu-bison.h: util/pmu.y 26662306a36Sopenharmony_ci $(call rule_mkdir) 26762306a36Sopenharmony_ci $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ 26862306a36Sopenharmony_ci -o $(OUTPUT)util/pmu-bison.c -p perf_pmu_ 26962306a36Sopenharmony_ci 27062306a36Sopenharmony_ci$(OUTPUT)util/bpf-filter-flex.c $(OUTPUT)util/bpf-filter-flex.h: util/bpf-filter.l $(OUTPUT)util/bpf-filter-bison.c 27162306a36Sopenharmony_ci $(call rule_mkdir) 27262306a36Sopenharmony_ci $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/bpf-filter-flex.c \ 27362306a36Sopenharmony_ci --header-file=$(OUTPUT)util/bpf-filter-flex.h $(PARSER_DEBUG_FLEX) $< 27462306a36Sopenharmony_ci 27562306a36Sopenharmony_ci$(OUTPUT)util/bpf-filter-bison.c $(OUTPUT)util/bpf-filter-bison.h: util/bpf-filter.y 27662306a36Sopenharmony_ci $(call rule_mkdir) 27762306a36Sopenharmony_ci $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ 27862306a36Sopenharmony_ci -o $(OUTPUT)util/bpf-filter-bison.c -p perf_bpf_filter_ 27962306a36Sopenharmony_ci 28062306a36Sopenharmony_ciFLEX_VERSION := $(shell $(FLEX) --version | cut -d' ' -f2) 28162306a36Sopenharmony_ci 28262306a36Sopenharmony_ciFLEX_GE_260 := $(call version-ge3,$(FLEX_VERSION),2.6.0) 28362306a36Sopenharmony_ciifeq ($(FLEX_GE_260),1) 28462306a36Sopenharmony_ci flex_flags := -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-misleading-indentation 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_ci # Some newer clang and gcc version complain about this 28762306a36Sopenharmony_ci # util/parse-events-bison.c:1317:9: error: variable 'parse_events_nerrs' set but not used [-Werror,-Wunused-but-set-variable] 28862306a36Sopenharmony_ci # int yynerrs = 0; 28962306a36Sopenharmony_ci 29062306a36Sopenharmony_ci flex_flags += -Wno-unused-but-set-variable 29162306a36Sopenharmony_ci 29262306a36Sopenharmony_ci FLEX_LT_262 := $(call version-lt3,$(FLEX_VERSION),2.6.2) 29362306a36Sopenharmony_ci ifeq ($(FLEX_LT_262),1) 29462306a36Sopenharmony_ci flex_flags += -Wno-sign-compare 29562306a36Sopenharmony_ci endif 29662306a36Sopenharmony_cielse 29762306a36Sopenharmony_ci flex_flags := -w 29862306a36Sopenharmony_ciendif 29962306a36Sopenharmony_ci 30062306a36Sopenharmony_ci# Some newer clang and gcc version complain about this 30162306a36Sopenharmony_ci# util/parse-events-bison.c:1317:9: error: variable 'parse_events_nerrs' set but not used [-Werror,-Wunused-but-set-variable] 30262306a36Sopenharmony_ci# int yynerrs = 0; 30362306a36Sopenharmony_ci 30462306a36Sopenharmony_cibison_flags := -DYYENABLE_NLS=0 -Wno-unused-but-set-variable 30562306a36Sopenharmony_ci 30662306a36Sopenharmony_ci# Old clangs don't grok -Wno-unused-but-set-variable, remove it 30762306a36Sopenharmony_ciifeq ($(CC_NO_CLANG), 0) 30862306a36Sopenharmony_ci CLANG_VERSION := $(shell $(CLANG) --version | head -1 | sed 's/.*clang version \([[:digit:]]\+.[[:digit:]]\+.[[:digit:]]\+\).*/\1/g') 30962306a36Sopenharmony_ci ifeq ($(call version-lt3,$(CLANG_VERSION),13.0.0),1) 31062306a36Sopenharmony_ci bison_flags := $(subst -Wno-unused-but-set-variable,,$(bison_flags)) 31162306a36Sopenharmony_ci flex_flags := $(subst -Wno-unused-but-set-variable,,$(flex_flags)) 31262306a36Sopenharmony_ci endif 31362306a36Sopenharmony_ciendif 31462306a36Sopenharmony_ci 31562306a36Sopenharmony_ciBISON_GE_382 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \>\= 382) 31662306a36Sopenharmony_ciifeq ($(BISON_GE_382),1) 31762306a36Sopenharmony_ci bison_flags += -Wno-switch-enum 31862306a36Sopenharmony_cielse 31962306a36Sopenharmony_ci bison_flags += -w 32062306a36Sopenharmony_ciendif 32162306a36Sopenharmony_ci 32262306a36Sopenharmony_ciBISON_LT_381 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 381) 32362306a36Sopenharmony_ciifeq ($(BISON_LT_381),1) 32462306a36Sopenharmony_ci bison_flags += -DYYNOMEM=YYABORT 32562306a36Sopenharmony_ciendif 32662306a36Sopenharmony_ci 32762306a36Sopenharmony_ciCFLAGS_parse-events-flex.o += $(flex_flags) -Wno-unused-label 32862306a36Sopenharmony_ciCFLAGS_pmu-flex.o += $(flex_flags) 32962306a36Sopenharmony_ciCFLAGS_expr-flex.o += $(flex_flags) 33062306a36Sopenharmony_ciCFLAGS_bpf-filter-flex.o += $(flex_flags) 33162306a36Sopenharmony_ci 33262306a36Sopenharmony_ciCFLAGS_parse-events-bison.o += $(bison_flags) 33362306a36Sopenharmony_ciCFLAGS_pmu-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) 33462306a36Sopenharmony_ciCFLAGS_expr-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) 33562306a36Sopenharmony_ciCFLAGS_bpf-filter-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) 33662306a36Sopenharmony_ci 33762306a36Sopenharmony_ci$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c 33862306a36Sopenharmony_ci$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c 33962306a36Sopenharmony_ci$(OUTPUT)util/expr.o: $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-bison.c 34062306a36Sopenharmony_ci$(OUTPUT)util/bpf-filter.o: $(OUTPUT)util/bpf-filter-flex.c $(OUTPUT)util/bpf-filter-bison.c 34162306a36Sopenharmony_ci 34262306a36Sopenharmony_ciCFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 34362306a36Sopenharmony_ciCFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 34462306a36Sopenharmony_ciCFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 34562306a36Sopenharmony_ciCFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 34662306a36Sopenharmony_ciCFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 34762306a36Sopenharmony_ciCFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE 34862306a36Sopenharmony_ciCFLAGS_arm-spe.o += -I$(srctree)/tools/arch/arm64/include/ 34962306a36Sopenharmony_ci 35062306a36Sopenharmony_ci$(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE 35162306a36Sopenharmony_ci $(call rule_mkdir) 35262306a36Sopenharmony_ci $(call if_changed_dep,cc_o_c) 35362306a36Sopenharmony_ci 35462306a36Sopenharmony_ci$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE 35562306a36Sopenharmony_ci $(call rule_mkdir) 35662306a36Sopenharmony_ci $(call if_changed_dep,cc_o_c) 35762306a36Sopenharmony_ci 35862306a36Sopenharmony_ci$(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE 35962306a36Sopenharmony_ci $(call rule_mkdir) 36062306a36Sopenharmony_ci $(call if_changed_dep,cc_o_c) 36162306a36Sopenharmony_ci 36262306a36Sopenharmony_ci$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE 36362306a36Sopenharmony_ci $(call rule_mkdir) 36462306a36Sopenharmony_ci $(call if_changed_dep,cc_o_c) 36562306a36Sopenharmony_ci 36662306a36Sopenharmony_ci$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE 36762306a36Sopenharmony_ci $(call rule_mkdir) 36862306a36Sopenharmony_ci $(call if_changed_dep,cc_o_c) 36962306a36Sopenharmony_ci 37062306a36Sopenharmony_ci$(OUTPUT)util/libstring.o: ../lib/string.c FORCE 37162306a36Sopenharmony_ci $(call rule_mkdir) 37262306a36Sopenharmony_ci $(call if_changed_dep,cc_o_c) 37362306a36Sopenharmony_ci 37462306a36Sopenharmony_ci$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE 37562306a36Sopenharmony_ci $(call rule_mkdir) 37662306a36Sopenharmony_ci $(call if_changed_dep,cc_o_c) 37762306a36Sopenharmony_ci 37862306a36Sopenharmony_ci$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE 37962306a36Sopenharmony_ci $(call rule_mkdir) 38062306a36Sopenharmony_ci $(call if_changed_dep,cc_o_c) 38162306a36Sopenharmony_ci 38262306a36Sopenharmony_ci$(OUTPUT)util/list_sort.o: ../lib/list_sort.c FORCE 38362306a36Sopenharmony_ci $(call rule_mkdir) 38462306a36Sopenharmony_ci $(call if_changed_dep,cc_o_c) 385