hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/tools/perf/util/Build
....@@ -253,6 +253,12 @@
253253 else
254254 bison_flags += -w
255255 endif
256
+
257
+BISON_LT_381 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 381)
258
+ifeq ($(BISON_LT_381),1)
259
+ bison_flags += -DYYNOMEM=YYABORT
260
+endif
261
+
256262 CFLAGS_parse-events-bison.o += $(bison_flags)
257263 CFLAGS_pmu-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)
258264 CFLAGS_expr-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)