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 690a498da050fd3ee5a17608260ede2a42a07d99..1625a06802ca61e7873483ead69d92ae72b03482 100644 (file)
@@ -1,3 +1,5 @@
+subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
+
 obj-y += kernel/
 obj-y += mm/
 obj-y += lib/
index fb70e9b6fa67665f550b6d0cb3ce302962c74159..53d4b8d5b54d41ab00dad96b868a9cf84e10529a 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 d868ba42032f2810a053675f1366f51e3b00c652..b1725ad3e13d4978f3b0317a2b762d49b4dd08a8 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 f872c04bb5b1bb1185a7fcc9df1597540d3d3120..e9d579921a96c181053122636c242da8d7f3bc5e 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 670286808928344f8484faf75a25d7f7df1a3e15..703afa1808ed61eb4441016b12513bc1aabaeef0 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 ceb352ccbc76732caf3e31db927078a7df884bb4..ca96e7be4d0ee2e5086838261e92e10194c805b0 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 7a7834c39f64580443bdd24a8f79da75044ce747..8d26d7416481f1f09816f60bc9255fc476bdd5d2 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 82986d2acd9ba551c68cbdafc218a4a40eb393ca..ab26df5bacb9a323f4b0e335f3469f0656da0f8b 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 e46bb7ea710f83b03e994e11e0c82d20966269de..143d4417f6cccf65486126f508d0a7db48de4801 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 f730539074c4647dbdbc4000e7913a355afc0718..2caa4defdfb62866e539677811440b1b07c3433c 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 5d438d92472bc29e3def90733866ff46e93d2d98..ba1e3117b1c09818f98963679d9cb6bfc663e29e 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 536d6e5706e32c253b0a742065e6c964e914cf3b..dea2abc23f4dd79b3236b67258722dccbac2057b 100644 (file)
@@ -1,4 +1,3 @@
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
 obj-y                          += common.o
 obj-$(CONFIG_PPC_XIVE_NATIVE)  += native.o
index 9d7d8e6d705c4fa07289bc06e0e4f81f48f553bb..69e7fb47bcaa3e39c81f017214e388e450b2ac2d 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