All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Stop emitting attributes
@ 2023-02-23 19:51 Palmer Dabbelt
  2023-02-23 21:18 ` Conor Dooley
  0 siblings, 1 reply; 3+ messages in thread
From: Palmer Dabbelt @ 2023-02-23 19:51 UTC (permalink / raw)
  To: linux-riscv; +Cc: Palmer Dabbelt

The RISC-V ELF attributes don't contain any useful information.  New
toolchains ignore them, but they frequently trip up various older/mixed
toolchains.  So just turn them off.

Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
 arch/riscv/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 76989561566b..1fc504e2b85e 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -81,6 +81,11 @@ ifeq ($(CONFIG_PERF_EVENTS),y)
         KBUILD_CFLAGS += -fno-omit-frame-pointer
 endif
 
+# The RISC-V attributes frequently cause compatibility issues and provide no
+# information, so just turn them off.
+KBUILD_CFLAGS += $(call cc-option,-mno-riscv-attribute)
+KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mno-arch-attr)
+
 KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax)
 KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma)-mno-relax)
 
-- 
2.39.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-23 22:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-23 19:51 [PATCH] RISC-V: Stop emitting attributes Palmer Dabbelt
2023-02-23 21:18 ` Conor Dooley
2023-02-23 22:13   ` Palmer Dabbelt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.