soc/integration/cpu_interface: don't raise OSError if we are not going to compile software and compilation toolchain is not found
This commit is contained in:
parent
62f53d5035
commit
16b6b357ca
|
@ -80,7 +80,7 @@ class Builder:
|
|||
variables_contents = []
|
||||
def define(k, v):
|
||||
variables_contents.append("{}={}\n".format(k, _makefile_escape(v)))
|
||||
for k, v in cpu_interface.get_cpu_mak(self.soc.cpu):
|
||||
for k, v in cpu_interface.get_cpu_mak(self.soc.cpu, self.compile_software):
|
||||
define(k, v)
|
||||
# Distinguish between LiteX and MiSoC.
|
||||
define("LITEX", "1")
|
||||
|
|
|
@ -30,7 +30,7 @@ def get_constant(name, constants):
|
|||
return v
|
||||
return None
|
||||
|
||||
def get_cpu_mak(cpu):
|
||||
def get_cpu_mak(cpu, compile_software):
|
||||
# select between clang and gcc
|
||||
clang = os.getenv("CLANG", "")
|
||||
if clang != "":
|
||||
|
@ -70,6 +70,8 @@ def get_cpu_mak(cpu):
|
|||
r = t
|
||||
break
|
||||
if r is None:
|
||||
if not compile_software:
|
||||
return "--not-found--"
|
||||
msg = "Unable to find any of the cross compilation toolchains:\n"
|
||||
for i in range(len(triple)):
|
||||
msg += "- " + triple[i] + "\n"
|
||||
|
|
Loading…
Reference in New Issue