powerpc: Add -Werror at arch/powerpc level
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 10 Oct 2018 05:13:06 +0000 (16:13 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 18 Oct 2018 13:56:17 +0000 (00:56 +1100)
Back when I added -Werror in commit ba55bd74360e ("powerpc: Add
configurable -Werror for arch/powerpc") I did it by adding it to most
of the arch Makefiles.

At the time we excluded math-emu, because apparently it didn't build
cleanly. But that seems to have been fixed somewhere in the interim.

So move the -Werror addition to the top-level of the arch, this saves
us from repeating it in every Makefile and means we won't forget to
add it to any new sub-dirs.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
13 files changed:
arch/powerpc/Kbuild
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/trace/Makefile
arch/powerpc/kvm/Makefile
arch/powerpc/lib/Makefile
arch/powerpc/mm/Makefile
arch/powerpc/oprofile/Makefile
arch/powerpc/perf/Makefile
arch/powerpc/platforms/Makefile
arch/powerpc/sysdev/Makefile
arch/powerpc/sysdev/xics/Makefile
arch/powerpc/sysdev/xive/Makefile
arch/powerpc/xmon/Makefile

index 690a498..1625a06 100644 (file)
@@ -1,3 +1,5 @@
+subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
+
 obj-y += kernel/
 obj-y += mm/
 obj-y += lib/
index fb70e9b..53d4b8d 100644 (file)
@@ -8,8 +8,6 @@ CFLAGS_ptrace.o         += -DUTS_MACHINE='"$(UTS_MACHINE)"'
 # Disable clang warning for using setjmp without setjmp.h header
 CFLAGS_crash.o         += $(call cc-disable-warning, builtin-requires-header)
 
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
-
 ifdef CONFIG_PPC64
 CFLAGS_prom_init.o     += $(NO_MINIMAL_TOC)
 endif
index d868ba4..b1725ad 100644 (file)
@@ -3,8 +3,6 @@
 # Makefile for the powerpc trace subsystem
 #
 
-subdir-ccflags-$(CONFIG_PPC_WERROR)    := -Werror
-
 ifdef CONFIG_FUNCTION_TRACER
 # do not trace tracer code
 CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
index f872c04..e9d5799 100644 (file)
@@ -3,8 +3,6 @@
 # Makefile for Kernel-based Virtual Machine module
 #
 
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
-
 ccflags-y := -Ivirt/kvm -Iarch/powerpc/kvm
 KVM := ../../../virt/kvm
 
index 6702868..703afa1 100644 (file)
@@ -3,8 +3,6 @@
 # Makefile for ppc-specific library files..
 #
 
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
-
 ccflags-$(CONFIG_PPC64)        := $(NO_MINIMAL_TOC)
 
 CFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE)
index ceb352c..ca96e7b 100644 (file)
@@ -3,8 +3,6 @@
 # Makefile for the linux ppc-specific parts of the memory manager.
 #
 
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
-
 ccflags-$(CONFIG_PPC64)        := $(NO_MINIMAL_TOC)
 
 CFLAGS_REMOVE_slb.o = $(CC_FLAGS_FTRACE)
index 7a7834c..8d26d74 100644 (file)
@@ -1,5 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
 ccflags-$(CONFIG_PPC64)        := $(NO_MINIMAL_TOC)
 
index 82986d2..ab26df5 100644 (file)
@@ -1,5 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
 obj-$(CONFIG_PERF_EVENTS)      += callchain.o perf_regs.o
 
index e46bb7e..143d441 100644 (file)
@@ -1,7 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
-
 obj-$(CONFIG_FSL_ULI1575)      += fsl_uli1575.o
 
 obj-$(CONFIG_PPC_PMAC)         += powermac/
index f730539..2caa4de 100644 (file)
@@ -1,5 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
 ccflags-$(CONFIG_PPC64)                := $(NO_MINIMAL_TOC)
 
@@ -56,8 +55,6 @@ obj-$(CONFIG_PPC_SCOM)                += scom.o
 
 obj-$(CONFIG_PPC_EARLY_DEBUG_MEMCONS)  += udbg_memcons.o
 
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
-
 obj-$(CONFIG_PPC_XICS)         += xics/
 obj-$(CONFIG_PPC_XIVE)         += xive/
 
index 5d438d9..ba1e311 100644 (file)
@@ -1,5 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
 obj-y                          += xics-common.o
 obj-$(CONFIG_PPC_ICP_NATIVE)   += icp-native.o
index 536d6e5..dea2abc 100644 (file)
@@ -1,4 +1,3 @@
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
 obj-y                          += common.o
 obj-$(CONFIG_PPC_XIVE_NATIVE)  += native.o
index 9d7d8e6..69e7fb4 100644 (file)
@@ -4,8 +4,6 @@
 # Disable clang warning for using setjmp without setjmp.h header
 subdir-ccflags-y := $(call cc-disable-warning, builtin-requires-header)
 
-subdir-ccflags-$(CONFIG_PPC_WERROR) += -Werror
-
 GCOV_PROFILE := n
 UBSAN_SANITIZE := n