summaryrefslogtreecommitdiff
path: root/tools/perf/util/Build
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/Build')
-rw-r--r--tools/perf/util/Build6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index f2914d5bed6e..7d085927da41 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -263,6 +263,12 @@ ifeq ($(BISON_GE_35),1)
else
bison_flags += -w
endif
+
+BISON_LT_381 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 381)
+ifeq ($(BISON_LT_381),1)
+ bison_flags += -DYYNOMEM=YYABORT
+endif
+
CFLAGS_parse-events-bison.o += $(bison_flags)
CFLAGS_pmu-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)
CFLAGS_expr-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)