lkml.org 
[lkml]   [2016]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Kbuild: CC= handling broken for tools/
From
Date
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

\
 
 \ /
  Last update: 2016-11-11 13:38    [W:5.510 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site