lkml.org 
[lkml]   [2016]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Build failure: -Wno-unused-const-variable DNE on old GCC
From
Date
On Thu, 2016-01-07 at 10:54 -0800, Brian Norris wrote:
> Hi,
>
> I'm using a GCC 4.6.3 compiler for some compile tests, and I noticed
> that commit 2cd55c68c0a4 ("cxl: Fix build failure due to -Wunused-variable
> behaviour change") breaks my builds, because the
> -Wno-unused-const-variable doesn't exist on GCC 4.6.3.
>
>   drivers/misc/cxl/base.c: At top level:
>   cc1: error: unrecognized command line option "-Wno-unused-const-variable" [-Werror]
>
> Any thoughts on how to best fix this? I'd like not to have to scrounge
> up a new cross compiler just for build tests.

drivers/misc/cxl/Makefile:ccflags-y := -Werror -Wno-unused-const-variable

You could take that -Wno-unused-const-variable out of the
Makefile or maybe add something like:

$(call cc-ifversion, -ge, 0530, -Wno-unused-const-variable)

or whatever gcc version actually added that unused-const-variable check

\
 
 \ /
  Last update: 2016-01-07 21:01    [W:0.073 / U:1.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site