From: Benjamin Gray <bgray@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: ajd@linux.ibm.com, Benjamin Gray <bgray@linux.ibm.com>
Subject: [PATCH v1] powerpc: Error on assembly warnings
Date: Tue, 26 Mar 2024 15:44:20 +1100 [thread overview]
Message-ID: <20240326044420.577031-1-bgray@linux.ibm.com> (raw)
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>
---
arch/powerpc/Kbuild | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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/
--
2.44.0
next reply other threads:[~2024-03-26 4:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 4:44 Benjamin Gray [this message]
2024-04-02 4:09 ` [PATCH v1] powerpc: Error on assembly warnings Andrew Donnellan
2024-04-22 8:16 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240326044420.577031-1-bgray@linux.ibm.com \
--to=bgray@linux.ibm.com \
--cc=ajd@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).