On Sun, 11 Oct 2009, Joel E. Denny wrote: > http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html > > Based on that discussion, I'm thinking of pushing the following. I'm > hesitating for a few reasons: > > 1. I'm not sure why bootstrap.conf was careful to exclude > m4/printf-posix.m4. Maybe to avoid bloat?
Given that the comments say "we don't need them", I'm assuming the point was to avoid bloat. However, -DGNULIB_POSIXCHECK recommends printf-posix, so I'm removing the exclusion of m4/printf-posix.m4. > 2. -DGNULIB_POSIXCHECK suggests realloc-posix for the sake of > vasnprintf.c, so it seems realloc-posix ought to be a dependency of > vasnprintf-posix. I'll explore further later and maybe take it to the > gnulib maintainers. On second thought, maybe realloc-posix doesn't fix any feature of realloc actually needed by vasnprintf-posix, but -DGNULIB_POSIXCHECK of course isn't precise enough to realize that. I'm not going to pursue this with the gnulib maintainers. > 3. -DGNULIB_POSIXCHECK is suggesting a lot of other modules. We need to > explore those at some point. Later. > 4. I'm trying to decide whether to apply the patch to branch-2.4.2. Because I really don't know what I'm doing, I'm not going to risk that. I pushed the following to master and branch-2.5. It extends the patch I proposed in the previous email by linking gnulib libraries in the test suite parsers. Some tests were failing without that. >From 5c99151aeb4396bf35b482e27075948c33088afa Mon Sep 17 00:00:00 2001 From: Joel E. Denny <[email protected]> Date: Tue, 15 Dec 2009 00:15:41 -0500 Subject: [PATCH] portability: use -DGNULIB_POSIXCHECK. Reported by Eric Blake. See discussions at <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html> and <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>. * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK. * bootstrap.conf (gnulib_modules): Add all the printf modules suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c. (excluded_files): Remove m4/printf-posix.m4. * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add lib/libbison.a so gnulib libraries can be linked. --- ChangeLog | 15 +++++++++++++++ HACKING | 3 +++ bootstrap.conf | 11 +++++++---- lib/.cvsignore | 42 ++++++++++++++++++++++++++++++++++++++++++ lib/.gitignore | 42 ++++++++++++++++++++++++++++++++++++++++++ m4/.cvsignore | 33 +++++++++++++++++++++++++++++++++ m4/.gitignore | 33 +++++++++++++++++++++++++++++++++ tests/atlocal.in | 2 +- 8 files changed, 176 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c4baf4..897b54a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,20 @@ 2009-12-15 Joel E. Denny <[email protected]> + portability: use -DGNULIB_POSIXCHECK. + Reported by Eric Blake. See discussions at + <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html> + and + <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>. + * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK. + * bootstrap.conf (gnulib_modules): Add all the printf modules + suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as + suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c. + (excluded_files): Remove m4/printf-posix.m4. + * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add + lib/libbison.a so gnulib libraries can be linked. + +2009-12-15 Joel E. Denny <[email protected]> + gnulib: update for fix of fprintf-posix, which we'll use soon. * etc/prefix-gnulib-mk (prefix): Adjust regex for make file targets so that gnulib's new arg-nonnull.h and link-warning.h diff --git a/HACKING b/HACKING index 82f07bb..4edb98b 100644 --- a/HACKING +++ b/HACKING @@ -172,6 +172,9 @@ release: that 1. Bison compiles cleanly, 2. the parsers it produces compile cleanly too. +- Build with -DGNULIB_POSIXCHECK. It suggests gnulib modules that can + fix portability issues. + - run `make maintainer-check' which: - runs `valgrind -q bison' to run Bison under Valgrind. - runs the parsers under Valgrind. diff --git a/bootstrap.conf b/bootstrap.conf index dff8d80..4522d8c 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -20,9 +20,13 @@ gnulib_modules=' announce-gen argmatch assert config-h c-strcase configmake dirname error extensions fopen-safer gendocs getopt-gnu gettext git-version-gen hash inttypes javacomp-script javaexec-script - maintainer-makefile malloc mbswidth obstack quote quotearg stdbool - stpcpy strerror strtoul strverscmp unistd unistd-safer unlocked-io - update-copyright unsetenv verify warnings xalloc xalloc-die xstrndup + maintainer-makefile malloc mbswidth obstack quote quotearg + realloc-posix stdbool stpcpy strerror strtoul strverscmp unistd + unistd-safer unlocked-io update-copyright unsetenv verify warnings + xalloc xalloc-die xstrndup + + fprintf-posix printf-posix snprintf-posix sprintf-posix + vsnprintf-posix vsprintf-posix ' # Additional xgettext options to use. Use "\\\newline" to break lines. @@ -52,7 +56,6 @@ excluded_files=' m4/lcmessage.m4 m4/lock.m4 m4/longdouble.m4 - m4/printf-posix.m4 m4/signed.m4 m4/size_max.m4 m4/uintmax_t.m4 diff --git a/tests/atlocal.in b/tests/atlocal.in index 9264a40..fb1cef6 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -33,7 +33,7 @@ CXXFLAGS='@O0CXXFLAGS@ @WARN_CXXFLAGS@ @WERROR_CFLAGS@' LDFLAGS='@LDFLAGS@' # Are special libraries needed? -LIBS='@LIBS@ @INTLLIBS@' +LIBS="$abs_top_builddir/lib/libbison.a @LIBS@ @INTLLIBS@" # Empty if no javac was found CONF_JAVAC='@CONF_JAVAC@' -- 1.5.4.3
