aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/Kbuild
diff options
context:
space:
mode:
authorBenjamin Gray <bgray@linux.ibm.com>2024-03-26 15:44:20 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2024-04-03 21:44:17 +1100
commit608d4a5ca56302181e669cea0aa571cbec6680eb (patch)
tree09fd54811f833ce50e4aad25f2be330856632b0d /arch/powerpc/Kbuild
parent01acaf3aa75e1641442cc23d8fe0a7bb4226efb1 (diff)
powerpc: Error on assembly warnings
We currently enable -Werror on the arch/powerpc subtree. However this only catches C warnings. Assembly warnings are logged, but the make invocation will still succeed. This can allow incorrect syntax such as ori r3, r4, r5 to be compiled without catching that the assembler is treating r5 as the immediate value 5. To prevent this in assembly files and inline assembly, add the -fatal-warnings option to assembler invocations. Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> Tested-by: Andrew Donnellan <ajd@linux.ibm.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240326044420.577031-1-bgray@linux.ibm.com
Diffstat (limited to 'arch/powerpc/Kbuild')
-rw-r--r--arch/powerpc/Kbuild3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/Kbuild b/arch/powerpc/Kbuild
index 22cd0d55a892..da862e9558bc 100644
--- a/arch/powerpc/Kbuild
+++ b/arch/powerpc/Kbuild
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
+subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror -Wa,-fatal-warnings
+subdir-asflags-$(CONFIG_PPC_WERROR) := -Wa,-fatal-warnings
obj-y += kernel/
obj-y += mm/