]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.1
authorSasha Levin <sashal@kernel.org>
Tue, 3 Oct 2023 11:57:07 +0000 (07:57 -0400)
committerSasha Levin <sashal@kernel.org>
Tue, 3 Oct 2023 11:57:07 +0000 (07:57 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-6.1/perf-build-define-yynomem-as-yynoabort-for-bison-3.8.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/perf-build-define-yynomem-as-yynoabort-for-bison-3.8.patch b/queue-6.1/perf-build-define-yynomem-as-yynoabort-for-bison-3.8.patch
new file mode 100644 (file)
index 0000000..f90c16d
--- /dev/null
@@ -0,0 +1,42 @@
+From 658d61c35f14dde04a247bcdf5c08ce44391a884 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 28 Jul 2023 17:26:54 -0300
+Subject: perf build: Define YYNOMEM as YYNOABORT for bison < 3.81
+
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+
+[ Upstream commit 88cc47e24597971b05b6e94c28a2fc81d2a8d61a ]
+
+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 <adrian.hunter@intel.com>
+Cc: Ian Rogers <irogers@google.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ tools/perf/util/Build | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/tools/perf/util/Build b/tools/perf/util/Build
+index e315ecaec3233..2c364a9087a22 100644
+--- a/tools/perf/util/Build
++++ b/tools/perf/util/Build
+@@ -276,6 +276,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)
+-- 
+2.40.1
+
index a36d07d58171f30c653e7e1dceb90f59250c69a3..e471830d077a9594dc6eb2195ce07a3641b52aee 100644 (file)
@@ -196,3 +196,4 @@ tsnep-fix-napi-scheduling.patch
 tsnep-fix-napi-polling-with-budget-0.patch
 loongarch-set-all-reserved-memblocks-on-node-0-at-in.patch
 fbdev-sh7760fb-depend-on-fb-y.patch
+perf-build-define-yynomem-as-yynoabort-for-bison-3.8.patch