diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2017-11-30 21:21:15 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2017-11-30 21:21:15 +0000 |
commit | 1faaf7035cabda101e1d6653bff7a539f201db91 (patch) | |
tree | 8563d28593f48f5ac5229db74c2e79db2fe917b2 /configure.ac | |
parent | bd6ea9edd1708c7b0166af685a676b91e5b5950d (diff) | |
download | glibc-1faaf7035cabda101e1d6653bff7a539f201db91.zip glibc-1faaf7035cabda101e1d6653bff7a539f201db91.tar.gz glibc-1faaf7035cabda101e1d6653bff7a539f201db91.tar.bz2 |
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 8ebc490..9707ae4 100644 --- a/configure.ac +++ b/configure.ac @@ -939,6 +939,9 @@ AC_CHECK_PROG_VER(SED, sed, --version, AC_CHECK_PROG_VER(AWK, gawk, --version, [GNU Awk[^0-9]*\([0-9][0-9.]*\)], [3.1.[2-9]*|3.[2-9]*|[4-9]*], critic_missing="$critic_missing gawk") +AC_CHECK_PROG_VER(BISON, bison, --version, + [bison (GNU Bison) \([0-9]*\.[0-9.]*\)], + [2.7*|[3-9].*|[1-9][0-9]*], critic_missing="$critic_missing bison") AC_CACHE_CHECK([if $CC is sufficient to build libc], libc_cv_compiler_ok, [ AC_TRY_COMPILE([], [ @@ -1070,10 +1073,6 @@ if test "$PERL" != no && fi AC_PATH_PROG(INSTALL_INFO, install-info, no, $PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin) -AC_CHECK_PROG_VER(BISON, bison, --version, - [bison (GNU Bison) \([0-9]*\.[0-9.]*\)], - [2.7*|[3-9].*|[1-9][0-9]*], - BISON=no) AC_CACHE_CHECK(for .set assembler directive, libc_cv_asm_set_directive, [dnl cat > conftest.s <<EOF |