Re: [PATCH 1/2] kbuild: refactor scripts/Makefile.extrawarn
From: Nick Desaulniers
Date: Wed Aug 28 2019 - 14:26:22 EST
On Wed, Aug 28, 2019 at 12:20 AM Sedat Dilek <sedat.dilek@xxxxxxxxx> wrote:
> On Wed, Aug 28, 2019 at 7:55 AM Masahiro Yamada
> <yamada.masahiro@xxxxxxxxxxxxx> wrote:
> > Instead of the warning- magic, let's accumulate compiler options
> > to KBUILD_CFLAGS directly as the top Makefile does. I think this makes
> > easier to understand what is going on in this file.
> > This commit slightly changes the behavior, I think all of which are OK.
> >  Currently, cc-option calls are needlessly evaluated. For example,
> > warning-3 += $(call cc-option, -Wpacked-bitfield-compat)
> > needs evaluating only when W=3, but it is actually evaluated for
> > W=1, W=2 as well. With this commit, only relevant cc-option calls
> > will be evaluated. This is a slight optimization.
> >  Currently, unsupported level like W=4 is checked by:
> > $(error W=$(KBUILD_ENABLE_EXTRA_GCC_CHECKS) is unknown)
> > This will no longer be checked, but I do not think it is a big
> > deal.
> Hi Masahiro Yamada,
> thanks for your patch series.
> If KBUILD_ENABLE_EXTRA_GCC_CHECKS does extra(-warning)-checks for GCC and Clang,
> please rename the Kconfig into...
> ...or something similiar (and maybe with some notes in its Kconfig help-text?).
I too would like to see that changed.