[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 11 Nov 2016 13:38:00 +0100
From: Michal Marek <mmarek@...e.com>
To: Jiri Slaby <jslaby@...e.cz>
Cc: linux-kbuild@...r.kernel.org,
Linux kernel mailing list <linux-kernel@...r.kernel.org>,
Jiri Olsa <jolsa@...hat.com>
Subject: Re: Kbuild: CC= handling broken for tools/
On 2016-11-11 12:23, Jiri Slaby wrote:
> Hi,
>
> I am trying a new gcc with new warnings enabled:
>
> make O=../a/gcc7/ CC='gcc-7' V=1 kernel/exit.o
> EXTRA_CFLAGS='-Wimplicit-fallthrough=3'
Note that EXTRA_CFLAGS is a makefile variable read by both kbuild and
tools/build apparently.
>
> But the build fails when building under tools/:
[...]
> gcc: error: unrecognized command line option ‘-Wimplicit-fallthrough=3’;
> did you mean ‘-Wno-fallthrough’?
>
>
> Apparently, CC is not respected for tools/ dir.
Jiri can better explain the behavior of the tools/ Makefiles, but if you
want to use extra flags for kernel compilation, you should be using the
KCFLAGS variable (see Documentation/kbuild/kbuild.txt).
Michal
Powered by blists - more mailing lists