linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] riscv: don't specify -mno-save-restore when building with clang
@ 2020-07-28 13:12 Tobias Klauser
  2020-07-28 15:20 ` Palmer Dabbelt
  2020-07-29  4:44 ` [PATCH v2] riscv: don't specify -mno-save-restore when building with clang < 11 Tobias Klauser
  0 siblings, 2 replies; 14+ messages in thread
From: Tobias Klauser @ 2020-07-28 13:12 UTC (permalink / raw)
  To: Palmer Dabbelt, Paul Walmsley, Albert Ou; +Cc: linux-riscv, Palmer Dabbelt

Clang doesn't support -msave-restore and -mno-save-restore. This avoids
the following message emitted by clang:

  '-save-restore' is not a recognized feature for this target (ignoring feature)

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
Resent due to infradead.org mailing list issues.

 arch/riscv/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index fb6e37db836d..cd3720bc45e8 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -44,7 +44,9 @@ riscv-march-$(CONFIG_RISCV_ISA_C)	:= $(riscv-march-y)c
 KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y))
 KBUILD_AFLAGS += -march=$(riscv-march-y)
 
+ifndef CONFIG_CC_IS_CLANG
 KBUILD_CFLAGS += -mno-save-restore
+endif
 KBUILD_CFLAGS += -DCONFIG_PAGE_OFFSET=$(CONFIG_PAGE_OFFSET)
 
 ifeq ($(CONFIG_CMODEL_MEDLOW),y)
-- 
2.27.0


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

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

end of thread, other threads:[~2020-08-03 20:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 13:12 [PATCH RESEND] riscv: don't specify -mno-save-restore when building with clang Tobias Klauser
2020-07-28 15:20 ` Palmer Dabbelt
2020-07-28 16:06   ` Tobias Klauser
2020-07-29  4:41     ` Tobias Klauser
2020-07-29  8:08       ` Jerome Forissier
2020-07-29  8:29         ` Tobias Klauser
2020-07-29  9:36           ` Jerome Forissier
2020-07-29  9:43             ` Jerome Forissier
2020-07-29  4:44 ` [PATCH v2] riscv: don't specify -mno-save-restore when building with clang < 11 Tobias Klauser
2020-07-31  3:58   ` Palmer Dabbelt
2020-07-31  8:16     ` Tobias Klauser
2020-07-31 16:16       ` Palmer Dabbelt
2020-08-01 10:30         ` Tobias Klauser
2020-08-03 20:28           ` Palmer Dabbelt

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).