From: Ben Westover <kwestover.kw@gmail.com>
To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
masahiroy@kernel.org, michal.lkml@markovi.net,
ndesaulniers@google.com
Subject: [PATCH] riscv: Set SRCARCH to riscv if ARCH is riscv64 or riscv32
Date: Wed, 30 Mar 2022 10:34:32 -0400 [thread overview]
Message-ID: <479c5c98-0e0d-072d-dae1-f91629989e46@gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2022-03-30 14:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 14:34 Ben Westover [this message]
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
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=479c5c98-0e0d-072d-dae1-f91629989e46@gmail.com \
--to=kwestover.kw@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=ndesaulniers@google.com \
/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
all inboxes | Powered by JetHome®