From: Florent Kermarrec Date: Tue, 19 Apr 2016 06:06:56 +0000 (+0200) Subject: soc/integration/cpu_interface: fix clang detection X-Git-Tag: 24jan2021_ls180~1971 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b9ab2f1fc69f92d2b7d434bd90712e556e2272b;p=litex.git soc/integration/cpu_interface: fix clang detection --- diff --git a/litex/soc/integration/cpu_interface.py b/litex/soc/integration/cpu_interface.py index 506f95d9..2f25e152 100644 --- a/litex/soc/integration/cpu_interface.py +++ b/litex/soc/integration/cpu_interface.py @@ -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))) ]