Skip to content

Commit

Permalink
fix bug in install_riscv_gcc task
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Dec 17, 2023
1 parent 32f3abd commit 5e81ab6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mlonmcu/setup/tasks/riscv_gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,25 +117,25 @@ def install_riscv_gcc(
riscvName = utils.makeDirName("riscv_gcc", flags=flags)
riscvInstallDir = context.environment.paths["deps"].path / "install" / riscvName
if (not vext) and (not pext) and "riscv_gcc.install_dir_default" in user_vars:
riscvInstallDir = user_vars["riscv_gcc.install_dir_default"]
riscvInstallDir = Path(user_vars["riscv_gcc.install_dir_default"])
multilib = user_vars.get("riscv_gcc.multilib_default", None)
default_multilib = user_vars.get("riscv_gcc_default.default_multilib_default", None)
multilibs = user_vars.get("riscv_gcc.multilibs_default", None)
elif vext and "riscv_gcc.install_dir_vext" in user_vars:
assert not multilib, "Multilib toolchain does only support riscv_gcc.install_dir"
riscvInstallDir = user_vars["riscv_gcc.install_dir_vext"]
riscvInstallDir = Path(user_vars["riscv_gcc.install_dir_vext"])
multilib = user_vars.get("riscv_gcc.multilib_vext", None)
default_multilib = user_vars.get("riscv_gcc.default_multilib_vext", None)
multilibs = user_vars.get("riscv_gcc.multilibs_vext", None)
elif pext and "riscv_gcc.install_dir_pext" in user_vars:
assert not multilib, "Multilib toolchain does only support riscv_gcc.install_dir"
riscvInstallDir = user_vars["riscv_gcc.install_dir_pext"]
riscvInstallDir = Path(user_vars["riscv_gcc.install_dir_pext"])
multilib = user_vars.get("riscv_gcc.multilib_pext", None)
default_multilib = user_vars.get("riscv_gcc.default_multilib_pext", None)
multilibs = user_vars.get("riscv_gcc.multilibs_pext", None)
elif "riscv_gcc.install_dir" in user_vars: # TODO: also check command line flags?
# This would overwrite the cache.ini entry which is NOT wanted! -> return false but populate gcc_name?
riscvInstallDir = user_vars["riscv_gcc.install_dir"]
riscvInstallDir = Path(user_vars["riscv_gcc.install_dir"])
multilib = user_vars.get("riscv_gcc.multilib", None)
default_multilib = user_vars.get("riscv_gcc.default_multilib", None)
multilibs = user_vars.get("riscv_gcc.multilibs", None)
Expand Down

0 comments on commit 5e81ab6

Please sign in to comment.