[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <479c5c98-0e0d-072d-dae1-f91629989e46@gmail.com>
Date: Wed, 30 Mar 2022 10:34:32 -0400
From: Ben Westover <kwestover.kw@...il.com>
To: linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
masahiroy@...nel.org, michal.lkml@...kovi.net,
ndesaulniers@...gle.com
Subject: [PATCH] riscv: Set SRCARCH to riscv if ARCH is riscv64 or riscv32
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@...il.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
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)
Powered by blists - more mailing lists