Skip to content

Commit

Permalink
powerpc: Add -Werror at arch/powerpc level
Browse files Browse the repository at this point in the history
Back when I added -Werror in commit ba55bd7 ("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>
  • Loading branch information
Michael Ellerman committed Oct 18, 2018
1 parent c47ca98 commit 23ad1a2
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 21 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/Kbuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror

obj-y += kernel/
obj-y += mm/
obj-y += lib/
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/kernel/trace/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/kvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/mm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/oprofile/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror

ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/perf/Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/platforms/Makefile
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
3 changes: 0 additions & 3 deletions arch/powerpc/sysdev/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror

ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)

Expand Down Expand Up @@ -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/

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/sysdev/xics/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/sysdev/xive/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror

obj-y += common.o
obj-$(CONFIG_PPC_XIVE_NATIVE) += native.o
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/xmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 23ad1a2

Please sign in to comment.