lkml.org 
[lkml]   [2018]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] ftrace: Build with CPPFLAGS to get -Qunused-arguments
2018-09-18 2:24 GMT+09:00 Nick Desaulniers <ndesaulniers@google.com>:
> On Mon, Sep 17, 2018 at 12:38 AM Joel Stanley <joel@jms.id.au> wrote:
>>
>> When building to record the mcount locations the kernel uses
>> KBUILD_CFLAGS but not KBUILD_CPPFLAGS. This means it lacks
>> -Qunused-arguments when building with clang, resulting in a lot of
>> noisy warnings.
>>
>> Signed-off-by: Joel Stanley <joel@jms.id.au>
>> ---
>> Not sure why -Qunused-arguments is in CPP instead of KBUILD_CFLAGS. We
>> could instead put it in KBUILD_CFLAGS, and not need this patch.
>
> The preprocessor has flags that can change the definitions of macros.
> So there might be unused flags there. I'm not a fan of covering up
> those warnings via -Qunused-arguments; the flags should be feature
> detected via cc-option and friends rather than always added then
> silenced if excessive. That hides flags that are long dead/unused.
>
> Thanks for this patch!
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
>>
>> scripts/Makefile.build | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>


Applied to linux-kbuild/fixes. Thanks!


--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2018-09-19 16:56    [W:0.061 / U:3.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site