public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: Set SRCARCH to riscv if ARCH is riscv64 or riscv32
@ 2022-03-30 14:34 Ben Westover
  2022-03-30 15:31 ` Masahiro Yamada
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Westover @ 2022-03-30 14:34 UTC (permalink / raw)
  To: linux-kernel, linux-kbuild, masahiroy, michal.lkml, ndesaulniers


[-- Attachment #1.1: Type: text/plain, Size: 790 bytes --]

When riscv64 or riscv32 are used as the value for ARCH during compilation, like
in tools that get the ARCH value from uname, set SRCARCH to riscv instead of
failing because the riscv64 and riscv32 targets don't exist.

Signed-off-by: Ben Westover <kwestover.kw@gmail.com>
---
 Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Makefile b/Makefile
index c28c5d91e5c8..315c364bf2ba 100644
--- a/Makefile
+++ b/Makefile
@@ -408,6 +408,14 @@ ifeq ($(ARCH),parisc64)
        SRCARCH := parisc
 endif

+# Additional ARCH settings for riscv
+ifeq ($(ARCH),riscv32)
+       SRCARCH := riscv
+endif
+ifeq ($(ARCH),riscv64)
+       SRCARCH := riscv
+endif
+
 export cross_compiling :=
 ifneq ($(SRCARCH),$(SUBARCH))
 cross_compiling := 1
-- 
2.35.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

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

end of thread, other threads:[~2022-03-31  2:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-30 14:34 [PATCH] riscv: Set SRCARCH to riscv if ARCH is riscv64 or riscv32 Ben Westover
2022-03-30 15:31 ` Masahiro Yamada
2022-03-30 18:40   ` Ben Westover
2022-03-31  1:34     ` Masahiro Yamada
2022-03-31  2:16       ` Ben Westover

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox