cxl: fix build for GCC 4.6.x
authorBrian Norris <[email protected]>
Fri, 8 Jan 2016 18:30:09 +0000 (10:30 -0800)
committerMichael Ellerman <[email protected]>
Mon, 11 Jan 2016 09:30:52 +0000 (20:30 +1100)
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 <[email protected]>
Suggested-by: Arnd Bergmann <[email protected]>
Signed-off-by: Brian Norris <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
drivers/misc/cxl/Makefile

index 6982f603fadc51a20154f38cbf1f82d95125f8df..ab6f392d3504128ae114c90cd061540839a297c3 100644 (file)
@@ -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