soc/integration/cpu_interface: fix clang detection
This commit is contained in:
parent
e0e56e3655
commit
1b9ab2f1fc
|
@ -16,16 +16,14 @@ def get_cpu_mak(cpu):
|
||||||
clang = bool(int(clang))
|
clang = bool(int(clang))
|
||||||
else:
|
else:
|
||||||
clang = None
|
clang = None
|
||||||
|
|
||||||
if cpu == "lm32":
|
if cpu == "lm32":
|
||||||
assert not clang, "lm32 not supported with clang."
|
assert not clang, "lm32 not supported with clang."
|
||||||
triple = "lm32-elf"
|
triple = "lm32-elf"
|
||||||
cpuflags = "-mbarrel-shift-enabled -mmultiply-enabled -mdivide-enabled -msign-extend-enabled"
|
cpuflags = "-mbarrel-shift-enabled -mmultiply-enabled -mdivide-enabled -msign-extend-enabled"
|
||||||
elif cpu == "or1k":
|
elif cpu == "or1k":
|
||||||
# Default to CLANG unless told otherwise
|
# default to CLANG unless told otherwise
|
||||||
if clang is None:
|
if clang is None:
|
||||||
clang = True
|
clang = True
|
||||||
|
|
||||||
triple = "or1k-elf"
|
triple = "or1k-elf"
|
||||||
cpuflags = "-mhard-mul -mhard-div -mror"
|
cpuflags = "-mhard-mul -mhard-div -mror"
|
||||||
if clang:
|
if clang:
|
||||||
|
@ -42,7 +40,7 @@ def get_cpu_mak(cpu):
|
||||||
("CPU", cpu),
|
("CPU", cpu),
|
||||||
("CPUFLAGS", cpuflags),
|
("CPUFLAGS", cpuflags),
|
||||||
("CPUENDIANNESS", cpu_endianness[cpu]),
|
("CPUENDIANNESS", cpu_endianness[cpu]),
|
||||||
("CLANG", str(int(clang)))
|
("CLANG", str(0 if clang is None else int(clang)))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue