[klibc] [PATCH] klibc: introduce EXTRA_KLIBCWARNFLAGS variable
Sam Ravnborg
sam at ravnborg.org
Thu Jun 28 10:07:05 PDT 2012
On Thu, Jun 28, 2012 at 05:30:42PM +0200, maximilian attems wrote:
> On Wed, 27 Jun 2012, Maciej Żenczykowski wrote:
>
> > From: Maciej Żenczykowski <maze at google.com>
> >
> > Introduce new EXTRA_KLIBCWARNFLAGS variable which is appended to
> > the compiler warning flags.
> >
> > This can be used to enable compiler warning promotion with:
> > make EXTRA_KLIBCWARNFLAGS=-Werror
> > (and/or to disable individual warnings)
> >
> > Signed-off-by: Maciej Żenczykowski <maze at google.com>
> > ---
> > scripts/Kbuild.klibc | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Looks good to me, waiting on Sam to eyeball and ack/nack it?
The kbuild way to deal with this on a directory base is to use:
ccflags-y := -Werror
IMO this approach is better because:
1) We can pass any options to cc - we are not restricted to warning related options
2) lower-case signals that this is not globel - but local for this directory
3) The "-y" part allows you to say ccflags-$(CONFIG_FOO) := -DFOO
4) It is aligned with kbuild
I am obviously a bit biased here as I do not see much other build systems
than kbuild....
Sam
More information about the klibc
mailing list