Add -Werror to the kernel build.
authorSascha Wildner <saw@online.de>
Tue, 15 Dec 2009 14:52:07 +0000 (15:52 +0100)
committerSascha Wildner <saw@online.de>
Tue, 15 Dec 2009 14:52:40 +0000 (15:52 +0100)
commit40ec0564adaa677a0dab5299bdd491a2245e94a0
treeda38cd810dbd7629cb7f02f886bdbeeebd640c9f
parent29bb1d924762de336d22fabdd5fb0584bc770992
Add -Werror to the kernel build.

* Add a new 'nowerror' keyword to config(8) for parsing the 'files' files.
  When specified, it will prevent the file from being compiled with
  -Werror.

  Note that files that have their own compile-with rules need "${WERROR}"
  added to get -Werror.

* Adjust all 'files' files accordingly: Set nowerror where we still warn
  (i386 or x86_64) and add "${WERROR}" to compile-with rules where it
  applies.

* Remove explicit -Werror-implicit-function-declaration setting as it is
  now useless (-Wimplicit-function-declaration is already part of -Wall).

You will need an updated config(8) (i.e., one that understands 'nowerror')
for this to work so don't forget to quick/buildworld before recompiling
the kernel. nativekernel users will have to update their host config(8).

NO_WERROR in /etc/make.conf applies here as well and turns off the setting
of -Werror for the kernel, too.

In-discussion-with: corecode, aggelos, and others
sys/conf/bsd.kern.mk
sys/conf/files
sys/conf/kern.post.mk
sys/conf/kern.pre.mk
sys/platform/pc32/conf/files
sys/platform/pc64/conf/files
sys/platform/vkernel/conf/files
usr.sbin/config/config.h
usr.sbin/config/mkmakefile.c