diff mbox

[v2,1/2] cxl: fix build for GCC 4.6.x

Message ID 1452277810-98195-1-git-send-email-computersforpeace@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Brian Norris Jan. 8, 2016, 6:30 p.m. UTC
GCC 4.6.3 does not support -Wno-unused-const-variable. Instead, use the
kbuild infrastructure that checks if this options exists.

Fixes: 2cd55c68c0a4 ("cxl: Fix build failure due to -Wunused-variable behaviour change")
Suggested-by: Michal Marek <mmarek@suse.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
v2: don't remove -Werror

 drivers/misc/cxl/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Ellerman Jan. 12, 2016, 12:32 p.m. UTC | #1
On Fri, 2016-08-01 at 18:30:09 UTC, Brian Norris wrote:
> GCC 4.6.3 does not support -Wno-unused-const-variable. Instead, use the
> kbuild infrastructure that checks if this options exists.
> 
> Fixes: 2cd55c68c0a4 ("cxl: Fix build failure due to -Wunused-variable behaviour change")
> Suggested-by: Michal Marek <mmarek@suse.com>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/aa09545589ceeff884421d8eb3

cheers
diff mbox

Patch

diff --git a/drivers/misc/cxl/Makefile b/drivers/misc/cxl/Makefile
index 6982f603fadc..ab6f392d3504 100644
--- a/drivers/misc/cxl/Makefile
+++ b/drivers/misc/cxl/Makefile
@@ -1,4 +1,4 @@ 
-ccflags-y := -Werror -Wno-unused-const-variable
+ccflags-y := -Werror $(call cc-disable-warning, unused-const-variable)
 
 cxl-y				+= main.o file.o irq.o fault.o native.o
 cxl-y				+= context.o sysfs.o debugfs.o pci.o trace.o