soc/integration/cpu_interface: fix clang detection

This commit is contained in:
Florent Kermarrec 2016-04-19 08:06:56 +02:00
parent e0e56e3655
commit 1b9ab2f1fc
1 changed files with 2 additions and 4 deletions

View File

@ -16,16 +16,14 @@ def get_cpu_mak(cpu):
clang = bool(int(clang))
else:
clang = None
if cpu == "lm32":
assert not clang, "lm32 not supported with clang."
triple = "lm32-elf"
cpuflags = "-mbarrel-shift-enabled -mmultiply-enabled -mdivide-enabled -msign-extend-enabled"
elif cpu == "or1k":
# Default to CLANG unless told otherwise
# default to CLANG unless told otherwise
if clang is None:
clang = True
triple = "or1k-elf"
cpuflags = "-mhard-mul -mhard-div -mror"
if clang:
@ -42,7 +40,7 @@ def get_cpu_mak(cpu):
("CPU", cpu),
("CPUFLAGS", cpuflags),
("CPUENDIANNESS", cpu_endianness[cpu]),
("CLANG", str(int(clang)))
("CLANG", str(0 if clang is None else int(clang)))
]