Fix warnings with bison >= 3.4 and autoconf < 2.70
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 11 Jul 2019 18:59:47 +0000 (14:59 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 12 Jul 2019 04:25:32 +0000 (00:25 -0400)
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 <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1690
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
configure.ac
src/plugins/ctf/common/metadata/Makefile.am

index 74993c1d42456d7930fd53407344e0ca883c2981..7d7f9a8ed7c951fbf02e3ee6e08647d2c136cfd7 100644 (file)
@@ -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"], [
index 8cdf35e526c834f53fe78ff2dce8a4ea348b3332..4d1c6358251fee61414d922d16091df772cb194f 100644 (file)
@@ -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
 
This page took 0.025504 seconds and 4 git commands to generate.