From 1b9ab2f1fc69f92d2b7d434bd90712e556e2272b Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 19 Apr 2016 08:06:56 +0200 Subject: [PATCH] soc/integration/cpu_interface: fix clang detection --- litex/soc/integration/cpu_interface.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/litex/soc/integration/cpu_interface.py b/litex/soc/integration/cpu_interface.py index 506f95d9e..2f25e1523 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))) ]