[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190828181719.GA127646@archlinux-threadripper>
Date: Wed, 28 Aug 2019 11:17:19 -0700
From: Nathan Chancellor <natechancellor@...il.com>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: linux-kbuild@...r.kernel.org,
Nick Desaulniers <ndesaulniers@...gle.com>,
Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Arnd Bergmann <arnd@...db.de>,
Michal Marek <michal.lkml@...kovi.net>,
clang-built-linux@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] kbuild: refactor scripts/Makefile.extrawarn
On Wed, Aug 28, 2019 at 02:54:24PM +0900, Masahiro Yamada wrote:
> Instead of the warning-[123] 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.
>
> [1] 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.
>
> [2] 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.
>
> [3] Currently, 4 Clang warnings (Winitializer-overrides, Wformat,
> Wsign-compare, Wformat-zero-length) are shown by any of W=1, W=2,
> and W=3. With this commit, they will be warned only by W=1. I
> think this is a more correct behavior since each warning belongs
> to only one warning level.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
Reviewed-by: Nathan Chancellor <natechancellor@...il.com>
Powered by blists - more mailing lists