package/olsr: fix build with bison 3.7.1
PATCH 1/1 package/olsr: fix build with bison 3.7.1
Fixes:
- http://autobuild.buildroot.org/results/174f64f5663e655eb97994b903293c07c70268fe
Signed-off-by Fabrice Fontaine <[email protected]>
--- ...1-olsrd-migrate-to-using-bison-3.7.1.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/olsr/0001-olsrd-migrate-to-using-bison-3.7.1.patch
package/olsr/0001-olsrd-migrate-to-using-bison-3.7.1.patch new file +48 -0
@@ -0,0 +1,48 @@ +From f31eec323ae65124474664f8a0444f7c035556dd Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Sun, 6 Sep 2020 22:31:12 +0200 +Subject: [PATCH] olsrd: migrate to using bison 3.7.1 + +With the upgrade to bison 3.7.1 (openwrt commit 1cf842d) building +olsrd was failing. Now, instead of the contents of header files +being directly inserted into the generated source files, they are +instead included with a #include directive. + +The local.mk has, until now, done some magic with *-tmp files, +which is not longer necessary and even causes builds to fail. + +src/cfgparser/oparse.c:265:10: fatal error: oparse.h-tmp: No such file or directory + #include "oparse.h-tmp" + +Suggested-by: Jo-Philipp Wich <[email protected]> +Signed-off-by: Perry Melange <[email protected]> +[Retrieved from: +https://github.com/openwrt-routing/packages/commit/5cc8e058850acbc22fe92c5e2b24863efc577971] +Signed-off-by: Fabrice Fontaine <[email protected]> +[Upstream status: https://github.com/OLSR/olsrd/pull/87] +--- + src/cfgparser/local.mk | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/src/cfgparser/local.mk b/src/cfgparser/local.mk +index e767abfc..56e594e4 100644 +--- a/src/cfgparser/local.mk ++++ b/src/cfgparser/local.mk +@@ -74,12 +74,8 @@ $(C)oparse.c: $(C)oparse.y $(C)olsrd_conf.h $(C)Makefile + ifeq ($(VERBOSE),0) + @echo "[BISON] $@" + endif +- $(MAKECMDPREFIX)$(BISON) -d -o "$@-tmp" "$<" +- $(MAKECMDPREFIX)sed -e 's/register //' \ +- -e '/^#line/s/$(call quote,$@-tmp)/$(call quote,$@)/' \ +- < "$@-tmp" >"$@" +- $(MAKECMDPREFIX)mv "$(subst .c,.h,$@-tmp)" "$(subst .c,.h,$@)" +- $(MAKECMDPREFIX)$(RM) "$@-tmp" "$(subst .c,.h,$@-tmp)" ++ $(MAKECMDPREFIX)$(BISON) -d -o "$@" "$<" ++ $(MAKECMDPREFIX)sed -e 's/register //' "$@" > "[email protected]" && mv "[email protected]" "$@" + + $(C)oparse.o: CFLAGS := $(filter-out -Wunreachable-code,$(CFLAGS)) + +-- +2.28.0 +
Signature · 1 line
2.28.0
PATCH 1/1 package/olsr: fix build with bison 3.7.1
Quoted 8 lines · On Sun, 6 Sep 2020 22:35:19 +0200 Fabrice Fontaine…
Fixes:
- http://autobuild.buildroot.org/results/174f64f5663e655eb97994b903293c07c70268feSigned-off-by Fabrice Fontaine <[email protected]>--- ...1-olsrd-migrate-to-using-bison-3.7.1.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/olsr/0001-olsrd-migrate-to-using-bison-3.7.1.patch
Applied to master, thanks. However, I think your fix is not suitable for upstream. Indeed, most likely upstream will not want a solution that forces to have Bison >= 3.7.1, they will probably want to support building on older systems that have an older Bison version.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com