[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdnuSyExtcddmcnS-08Mj6oNyZfqax4JQJSLBVFkD8S+JA@mail.gmail.com>
Date: Wed, 19 Aug 2020 09:55:49 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Masahiro Yamada <masahiroy@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Arvind Sankar <nivedita@...m.mit.edu>,
Ard Biesheuvel <ardb@...nel.org>,
Dmitry Vyukov <dvyukov@...gle.com>, X86 ML <x86@...nel.org>,
David Laight <David.Laight@...lab.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: -Werror for `make W=0`
On Wed, Aug 19, 2020 at 4:50 AM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> On Wed, Aug 19, 2020 at 1:48 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
> > On Wed, Aug 19, 2020 at 6:44 PM Andy Shevchenko
> > <andriy.shevchenko@...ux.intel.com> wrote:
> > >
> > > Hi!
> > >
> > > Maybe silly idea, but would it make sense to enable -Werror for default warning
> > > level, let's say W=0, at some point?
> > >
> >
> > Every GCC release adds new warning options.
> >
> > Enabling -Werror by default means
> > the kernel build is suddenly broken
> > with new compilers, correct?
>
> Probably, and at the same time we keep our hand on the pulse of the
> changes, right?
> Adding those warnings to W=1, 2, ... block might be not the bad idea after all.
>
> Maybe some flag CONFIG_DEBUG_WERROR ? Then CIs or other early stage
> users can enable by default and be informed.
Google's pixel kernel team carries an out of tree patch creating
exactly such a config. It helps them keep their kernels building
warning free.
Flip side is that if a build isn't warning free, it can be difficult
to get there; you need to at least disable the config to see how many
warnings you have, and identify which are lower hanging fruit. It
also makes compiler upgrades excessively difficult. In my experience
on Android, if folks are too busy to address compiler warnings, then
new warnings added by a new compiler version just get turned off and
never addressed. My experience with the kernel has been that fixes
for different warnings also take varying amounts of time to get
accepted and work their way through mainline, meanwhile builds are
broken.
I agree that it's ideal to have no warnings, but from my perspective
-Werror is a major impediment to upgrading the tools. Wouldn't
recommend.
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists