[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNASVn7CB5uL9tCtNC2u4Ary5eb-vyiB_sS2ey5AZNweKAA@mail.gmail.com>
Date: Wed, 17 Oct 2018 17:21:01 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Leonardo Brás <leobras.c@...il.com>,
lkcamp@...ts.libreplanetbr.org, willy6545@...il.com,
Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS
On Wed, Oct 17, 2018 at 5:11 PM Borislav Petkov <bp@...en8.de> wrote:
>
> On Tue, Oct 16, 2018 at 09:08:09PM -0300, Leonardo Brás wrote:
> > Adds -Wshadow=local on KBUILD_HOSTCFLAGS to show shadow warnings
> > on tools built for HOST.
> >
> > Signed-off-by: Leonardo Brás <leobras.c@...il.com>
> > ---
> > Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Makefile b/Makefile
> > index e8b599b4dcde..fb0a9ac195e7 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -360,7 +360,7 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
> >
> > HOSTCC = gcc
> > HOSTCXX = g++
> > -KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
> > +KBUILD_HOSTCFLAGS := -Wall -Wshadow=local -Wmissing-prototypes -Wstrict-prototypes -O2 \
> > -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS) \
> > $(HOSTCFLAGS)
> > KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
> > --
>
> You might wanna take a look at scripts/Makefile.extrawarn which already
> has -Wshadow.
scripts/Makefile.extrawarn provides options for the target compiler (CC),
whereas this patch adds -Wshadow=local for the host compiler (HOSTCC).
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists