diff options
author | Arnaldo Carvalho de Melo <[email protected]> | 2023-07-28 17:26:54 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-07-28 19:01:14 -0300 |
commit | 88cc47e24597971b05b6e94c28a2fc81d2a8d61a (patch) | |
tree | cd95113ab926d240ee5f4a4b3d881ec77222bc43 | |
parent | 93d7e9c8fbb4624b7dfe8b3605b9f10f192ede98 (diff) |
perf build: Define YYNOMEM as YYNOABORT for bison < 3.81
YYNOMEM was introduced in bison 3.81, so define it as YYABORT for older
versions, which should provide the previous perf behaviour.
Cc: Adrian Hunter <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/util/Build | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 96f4ea1d45c5..9c6c4475524b 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -301,6 +301,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) |