On Mon, Oct 04, 2010 at 12:20:19PM -0600, Eric Blake wrote: > On 10/04/2010 12:15 PM, Dmitry V. Levin wrote: > >>In summary, please turn off -Werror when compiling gnulib code. We don't > >>guarantee the absence of warnings. > > > >The project where -Werror is enabled by default is GNU grep. If the > >statement that gnulib code may emit -Wcast-align warnings is correct, then > >I suggest to remove either -Wcast-align or $(WERROR_CFLAGS) when compiling > >gnulib in grep. > > Jim maintains both grep and coreutils. In coreutils, his solution is to > manually disable compiler flags known to be incompatible with gnulib > while still using -Werror for the flags that are okay; such that the > gnulib portion of coreutils is compiled with fewer warnings than the > coreutils portion. It shouldn't be too hard to use that same paradigm > in grep.
The same method is already in use in grep nowadays, so the patch is straightforward: From a2b98bac33cb209a5b037351d68d981e9dc78dfc Mon Sep 17 00:00:00 2001 From: Dmitry V. Levin <[email protected]> Date: Mon, 4 Oct 2010 18:49:14 +0000 Subject: [PATCH] Compile gnulib without -Wcast-align that cause warnings on ARM * configure.ac (GNULIB_WARN_CFLAGS): Remove -Wcast-align. --- configure.ac | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 481ce86..3c28218 100644 --- a/configure.ac +++ b/configure.ac @@ -124,6 +124,7 @@ if test "$gl_gcc_warnings" = yes; then nw="$nw -Wunused-macros" #nw="$nw -Wmissing-prototypes" nw="$nw -Wold-style-definition" + nw="$nw -Wcast-align" gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw]) AC_SUBST([GNULIB_WARN_CFLAGS]) fi -- ldv
pgpMdGUtT7arp.pgp
Description: PGP signature
