From 042f640b9ea87bcc17a2a9ff95801b1213f6ba2e Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 11 Jul 2019 14:59:47 -0400 Subject: [PATCH] Fix warnings with bison >= 3.4 and autoconf < 2.70 Autoconf up to version 2.69 calls bison with '-y' to keep the output filenames the same fixed values as the original YACC so the Makefiles stay compatible with both tools. Starting with Bison 3.4 using '-y' will generate warnings for non-POSIX YACC statements. Our parser is not compatible with POSIX YACC, we already check for Bison in the configure script. Bump the minimal version to 2.5 and add '-Wno-yacc' to disable the warnings. Autoconf 2.70 will drop the '-y' and use '-o y.tab.c' to get the same behavior without enabling the warnings which will still work with this workaround. Change-Id: Iad3ba0dcfd9e6b4e2727236abd6ecb4a83de0c70 Signed-off-by: Michael Jeanson Reviewed-on: https://review.lttng.org/c/babeltrace/+/1690 Tested-by: jenkins Reviewed-by: Philippe Proulx --- configure.ac | 2 +- src/plugins/ctf/common/metadata/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 74993c1d..7d7f9a8e 100644 --- a/configure.ac +++ b/configure.ac @@ -201,7 +201,7 @@ AM_CONDITIONAL([IN_GIT_REPO], [test "x$in_git_repo" = "xyes"]) # check for bison AC_PROG_YACC -AX_PROG_BISON_VERSION([2.4], [have_bison=yes]) +AX_PROG_BISON_VERSION([2.5], [have_bison=yes]) AS_IF([test "x$have_bison" != "xyes"], [ AS_IF([test "x$in_git_repo" = "xyes"], [ diff --git a/src/plugins/ctf/common/metadata/Makefile.am b/src/plugins/ctf/common/metadata/Makefile.am index 8cdf35e5..4d1c6358 100644 --- a/src/plugins/ctf/common/metadata/Makefile.am +++ b/src/plugins/ctf/common/metadata/Makefile.am @@ -1,5 +1,5 @@ AM_CPPFLAGS += -I$(builddir) -I$(srcdir) -AM_YFLAGS = -t -d -v +AM_YFLAGS = -t -d -v -Wno-yacc noinst_LTLIBRARIES = libctf-parser.la libctf-ast.la -- 2.34.1