glibc/manual
Joseph Myers a4ecc9eb9b Use -Werror by default, add --disable-werror.
As discussed starting at
<https://sourceware.org/ml/libc-alpha/2014-11/msg00323.html>, this
patch makes the glibc build use -Werror by default to avoid
accidentally adding new warnings to the build.  The configure option
--disable-werror can be used to disable this.

-Wno-error=undef is temporarily used because the build isn't clean
regarding -Wundef warnings.  The idea is that once the remaining
-Wundef warnings have been cleaned up (in at least one configuration),
-Wno-error=undef will be removed.

I get a clean build and test on x86_64 (GCC 4.9 branch) with this
patch.  The expectation is that this may well break the build for some
other configurations, and people seeing such breakage should make
appropriate fixes to fix or suppress the warnings for their
configurations.  In some cases that may involve using pragmas as the
right fix (I think that will be right for the -Wno-inline issue for
MIPS I referred to in
<https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, for
example), in some cases -Wno-error in sysdeps makefiles (__restore_rt
in MIPS sigaction, for example), in some cases substantive fixes for
the warnings.

Note that if, with a view to listing all the warnings then fixing them
all, you just look for "warning:" in output from building and testing
with --disable-werror, you'll see lots of warnings from the linker
about functions such as tmpnam.  Those warnings can be ignored - only
compiler warnings are relevant to -Werror, not linker warnings.

	* configure.ac (--disable-werror): New configure option.
	(enable_werror): New AC_SUBST.
	* configure: Regenerated.
	* config.make.in (enable-werror): New variable.
	* Makeconfig [$(enable-werror) = yes] (+gccwarn): Add -Werror
	-Wno-error=undef.
	(+gccwarn-c): Do not use -Werror=implicit-function-declaration.
	* manual/install.texi (Configuring and compiling): Document
	--disable-werror.
	* INSTALL: Regenerated.
	* debug/Makefile (CFLAGS-tst-chk1.c): Add -Wno-error.
	(CFLAGS-tst-chk2.c): Likewise.
	(CFLAGS-tst-chk3.c): Likewise.
	(CFLAGS-tst-chk4.cc): Likewise.
	(CFLAGS-tst-chk5.cc): Likewise.
	(CFLAGS-tst-chk6.cc): Likewise.
	(CFLAGS-tst-lfschk1.c): Likewise.
	(CFLAGS-tst-lfschk2.c): Likewise.
	(CFLAGS-tst-lfschk3.c): Likewise.
	(CFLAGS-tst-lfschk4.cc): Likewise.
	(CFLAGS-tst-lfschk5.cc): Likewise.
	(CFLAGS-tst-lfschk6.cc): Likewise.
2014-12-10 01:14:48 +00:00
..
examples fcntl-linux.h: add new definitions and manual updates for open file description locks 2014-07-29 23:27:21 -04:00
argp.texi
arith.texi
charset.texi
check-safety.sh Require check-safety.sh to pass; wish for check that all fns are documented 2014-11-21 02:06:19 -02:00
conf.texi
contrib.texi Update contrib.texi 2014-09-07 16:07:10 +10:00
creature.texi
crypt.texi
ctype.texi
debug.texi
dir
errno.texi
fdl-1.3.texi
filesys.texi manual: Update prototypes for alphasort and friends 2014-05-23 11:26:06 +02:00
freemanuals.texi
getopt.texi
header.texi
install-plain.texi
install.texi Use -Werror by default, add --disable-werror. 2014-12-10 01:14:48 +00:00
intro.texi manual: Sort overview listing by manual order. 2014-04-17 19:41:09 -04:00
io.texi
ipc.texi manual/ipc.texi: Fix AC-safety notes. 2014-04-08 17:12:15 -04:00
job.texi ctermid: return string literal, document MT-Safety pitfall 2014-11-21 02:16:02 -02:00
lang.texi
lgpl-2.1.texi
libc-texinfo.sh
libc.texinfo
libcbook.texi
libdl.texi
libm-err-tab.pl
llio.texi manual/llio.texi: Comment on write atomicity. 2014-11-06 15:58:52 -05:00
locale.texi manual: Update the locale documentation 2014-07-10 16:30:40 +02:00
macros.texi
maint.texi
Makefile Require check-safety.sh to pass; wish for check that all fns are documented 2014-11-21 02:06:19 -02:00
math.texi
memory.texi
message.texi
nss.texi
nsswitch.texi
pattern.texi
pipe.texi
platform.texi
probes.texi
process.texi
resource.texi Fix typo in manual. 2014-06-05 01:13:04 +02:00
search.texi
setjmp.texi manual/setjmp.texi: Clarify setcontext and signal handlers text 2014-04-17 11:40:36 +01:00
signal.texi Fix crossreference to nonexistent node BSD Handler 2014-11-18 11:19:20 +01:00
socket.texi
startup.texi
stdio-fp.c
stdio.texi Fix types of stream hook functions in manual. 2014-04-28 18:54:24 +02:00
string.texi Fix qsort argument order in collation example 2014-04-12 14:26:29 +10:00
summary.awk
sysinfo.texi manual: fix addmntent's MT-Safety race annotation 2014-11-21 02:45:02 -02:00
syslog.texi
terminal.texi
texinfo.tex Update miscellaneous files from upstream sources. 2014-06-26 20:13:44 +00:00
texis.awk
threads.texi
time.texi
tsort.awk
users.texi manual: cuserid is mtasurace if not passed a string 2014-11-21 02:15:09 -02:00
xtract-typefun.awk