litex_setup/riscv_gcc_toolchain_download: Add Fedora support (get linux-centos6).

This commit is contained in:
Florent Kermarrec 2021-11-26 14:20:55 +01:00
parent 85d6cb4b8d
commit 0503188661
1 changed files with 6 additions and 1 deletions

View File

@ -171,7 +171,12 @@ def riscv_gcc_toolchain_download():
end_file = "w64-mingw32.zip"
# Linux
elif sys.platform.startswith("linux"):
end_file = "linux-ubuntu14.tar.gz"
os_release = (open("/etc/os-release").read()).lower()
if "fedora" in os_release:
end_file = "linux-centos6.tar.gz"
else:
end_file = "linux-ubuntu14.tar.gz"
# Mac OS
elif sys.platform.startswith("darwin"):
end_file = "apple-darwin.tar.gz"