From 5fbd0fc667be43228b96d0d919c7d02162b446cb Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Mon, 25 Feb 2019 16:25:16 +0800 Subject: [PATCH] lxbuildenv: riscv: also allow riscv32 toolchain Signed-off-by: Sean Cross --- lxbuildenv.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lxbuildenv.py b/lxbuildenv.py index d09da85..e571248 100644 --- a/lxbuildenv.py +++ b/lxbuildenv.py @@ -170,7 +170,15 @@ def check_make(args): return check_cmd(args, "make", "GNU Make") def check_riscv(args): - return check_cmd(args, "riscv64-unknown-elf-gcc", "riscv toolchain", "download it from https://www.sifive.com/products/tools/") + riscv64 = check_cmd(args, "riscv64-unknown-elf-gcc", "riscv toolchain", "download it from https://www.sifive.com/products/tools/") + if riscv64[0] == True: + return riscv64 + + riscv32 = check_cmd(args, "riscv32-unknown-elf-gcc", "riscv toolchain", "download it from https://www.sifive.com/products/tools/") + if riscv32[0] == True: + return riscv32 + + return riscv64 def check_yosys(args): return check_cmd(args, "yosys")