From 1faaf7035cabda101e1d6653bff7a539f201db91 Mon Sep 17 00:00:00 2001 From: Juro Bystricky Date: Thu, 30 Nov 2017 21:21:15 +0000 Subject: plural.c: improve reproducibility There is a subtle non-determinism when building glibc. This depends on whether the glibc is built using the distibuted file intl/plural.c or built using the generated file intl/plural.c. These two files (intl/plural.c generated vs. distributed) are slightly different, hence we may end up with slightly different libraries. Originally, having "bison" installed was optional. So if "bison" was not present, we always built libraries with the distributed plural.c. If bison was installed, we *** may have *** replaced the distributed file plural.c with a new plural.c generated from plural.y. if the timestamps triggered this rule: plural.c plural.y $(BISON) $(BISONFLAGS) $@ $^ Given that timestamps are not preserved in GIT repositories, the above rule is not reliable without explicitly touching plural.c or plural.y. In other words, the rule may or may not have fired. In summary: there are two distinct sources of non-determinism: 1. Having "bison" installed or not 2. Having "bison" installed but timestamps poorly defined. This patch fixes this by requiring "bison" being installed and by always generating intl/plural.c from intl/plural.y. (This is achieved by simply removing checked-in intl/plural.c) [BZ #22432] * configure.ac (BISON): Require to be present. * configure: Regenerated. * intl/Makefile (generated): Add plural.c. [$(BISON) != no]: Make code unconditional. (plural.c): Change rule to $(objpfx)plural.c. ($(objpfx)plural.o): Depend on $(objpfx)plural.c. * intl/plural.c: Remove. * manual/install.texi (Tools for Compilation): Document bison as required. * INSTALL: Regenerated. --- manual/install.texi | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'manual') diff --git a/manual/install.texi b/manual/install.texi index f1fa28c937..ea559e4e72 100644 --- a/manual/install.texi +++ b/manual/install.texi @@ -509,6 +509,12 @@ function, which was introduced in version 3.1.2 of @code{gawk}. As of release time, @code{gawk} version 4.1.3 is the newest verified to work to build @theglibc{}. +@item +GNU @code{bison} 2.7 or later + +@code{bison} is used to generate the @code{yacc} parser code in the @file{intl} +subdirectory. + @item Perl 5 @@ -540,14 +546,6 @@ and if you change any of the message translation files you will need GNU @code{gettext} 0.10.36 or later @end itemize -@noindent -If you wish to regenerate the @code{yacc} parser code in the @file{intl} -subdirectory you will need - -@itemize @bullet -@item -GNU @code{bison} 2.7 or later -@end itemize @noindent You may also need these packages if you upgrade your source tree using -- cgit 1.4.1