diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-10-22 21:27:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 21:27:39 +0200 |
commit | 9282b0da2751f7141fc54cbce4ef6ebbc628b6ed (patch) | |
tree | 37078844ce6f37c17968b57fa13e1a4b2687dbaa /platform/linuxbsd | |
parent | 3bebbcacdbe7922af97fd8b26ef30c19eee94ba0 (diff) | |
parent | 474d0f58f5f7c788f75798504173d653f4371b0a (diff) |
Merge pull request #53508 from aaronfranke/riscv
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r-- | platform/linuxbsd/detect.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py index 1b9dd1e8f3..4b3804d049 100644 --- a/platform/linuxbsd/detect.py +++ b/platform/linuxbsd/detect.py @@ -119,6 +119,13 @@ def configure(env): if env["bits"] == "default": env["bits"] = "64" if is64 else "32" + if env["arch"] == "" and platform.machine() == "riscv64": + env["arch"] = "rv64" + + if env["arch"] == "rv64": + # G = General-purpose extensions, C = Compression extension (very common). + env.Append(CCFLAGS=["-march=rv64gc"]) + ## Compiler configuration if "CXX" in env and "clang" in os.path.basename(env["CXX"]): |