summaryrefslogtreecommitdiff
path: root/linux-lts-5.15.170-blob/0006-v2-kbuild-support-byacc-as-alternative-YACC-to-bison.patch
diff options
context:
space:
mode:
Diffstat (limited to 'linux-lts-5.15.170-blob/0006-v2-kbuild-support-byacc-as-alternative-YACC-to-bison.patch')
-rwxr-xr-xlinux-lts-5.15.170-blob/0006-v2-kbuild-support-byacc-as-alternative-YACC-to-bison.patch91
1 files changed, 91 insertions, 0 deletions
diff --git a/linux-lts-5.15.170-blob/0006-v2-kbuild-support-byacc-as-alternative-YACC-to-bison.patch b/linux-lts-5.15.170-blob/0006-v2-kbuild-support-byacc-as-alternative-YACC-to-bison.patch
new file mode 100755
index 0000000..7d2ef83
--- /dev/null
+++ b/linux-lts-5.15.170-blob/0006-v2-kbuild-support-byacc-as-alternative-YACC-to-bison.patch
@@ -0,0 +1,91 @@
+diff --git a/Makefile b/Makefile
+index a216dcc..49e39b4 100644
+--- a/Makefile
++++ b/Makefile
+@@ -448,7 +448,7 @@ endif
+ PAHOLE = pahole
+ RESOLVE_BTFIDS = $(objtree)/tools/bpf/resolve_btfids/resolve_btfids
+ LEX = flex
+-YACC = bison
++YACC = byacc
+ AWK = awk
+ INSTALLKERNEL := installkernel
+ DEPMOD = depmod
+diff --git a/drivers/scsi/aic7xxx/aicasm/Makefile b/drivers/scsi/aic7xxx/aicasm/Makefile
+index 243adb0..872104f 100644
+--- a/drivers/scsi/aic7xxx/aicasm/Makefile
++++ b/drivers/scsi/aic7xxx/aicasm/Makefile
+@@ -18,7 +18,7 @@ clean-files:= ${GENSRCS} ${GENHDRS} $(YSRCS:.y=.output) $(PROG)
+ # Override default kernel CFLAGS. This is a userland app.
+ AICASM_CFLAGS:= -I/usr/include -I. -I$(OUTDIR)
+ LEX= flex
+-YACC= bison
++YACC= byacc
+ YFLAGS= -d
+
+ NOMAN= noman
+diff --git a/scripts/Makefile.host b/scripts/Makefile.host
+index 278b4d6..4f3fa77 100644
+--- a/scripts/Makefile.host
++++ b/scripts/Makefile.host
+@@ -11,7 +11,7 @@ $(obj)/%.lex.c: $(src)/%.l FORCE
+ # YACC
+ # ---------------------------------------------------------------------------
+ quiet_cmd_bison = YACC $(basename $@).[ch]
+- cmd_bison = $(YACC) -o $(basename $@).c --defines=$(basename $@).h -t -l $<
++ cmd_bison = $(YACC) -b $(basename $(basename $@)) -d -t -l $<
+
+ $(obj)/%.tab.c $(obj)/%.tab.h: $(src)/%.y FORCE
+ $(call if_changed,bison)
+diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile
+index ce4f999..f769970 100644
+--- a/scripts/genksyms/Makefile
++++ b/scripts/genksyms/Makefile
+@@ -14,7 +14,7 @@ genksyms-objs := genksyms.o parse.tab.o lex.lex.o
+ ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
+
+ quiet_cmd_bison_no_warn = $(quiet_cmd_bison)
+- cmd_bison_no_warn = $(YACC) --version >/dev/null; \
++ cmd_bison_no_warn = $(YACC) -V >/dev/null; \
+ $(cmd_bison) 2>/dev/null
+
+ $(obj)/pars%.tab.c $(obj)/pars%.tab.h: $(src)/pars%.y FORCE
+diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l
+index e265c5d..0580c08 100644
+--- a/scripts/genksyms/lex.l
++++ b/scripts/genksyms/lex.l
+@@ -19,6 +19,8 @@
+ #include "genksyms.h"
+ #include "parse.tab.h"
+
++extern YYSTYPE yylval;
++
+ /* We've got a two-level lexer here. We let flex do basic tokenization
+ and then we categorize those basic tokens in the second stage. */
+ #define YY_DECL static int yylex1(void)
+diff --git a/tools/bpf/Makefile b/tools/bpf/Makefile
+index 39bb322..3ec36e8 100644
+--- a/tools/bpf/Makefile
++++ b/tools/bpf/Makefile
+@@ -4,7 +4,7 @@ include ../scripts/Makefile.include
+ prefix ?= /usr/local
+
+ LEX = flex
+-YACC = bison
++YACC = byacc
+ MAKE = make
+ INSTALL ?= install
+
+diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
+index e41a8f9..7a47967 100644
+--- a/tools/perf/Makefile.perf
++++ b/tools/perf/Makefile.perf
+@@ -184,7 +184,7 @@ MKDIR = mkdir
+ FIND = find
+ INSTALL = install
+ FLEX ?= flex
+-BISON ?= bison
++BISON ?= byacc
+ STRIP = strip
+ AWK = awk
+