diff --git a/target/snitch_cluster/sw/toolchain.mk b/target/snitch_cluster/sw/toolchain.mk index 2604ac1781..2b07c22d87 100644 --- a/target/snitch_cluster/sw/toolchain.mk +++ b/target/snitch_cluster/sw/toolchain.mk @@ -17,7 +17,7 @@ DEBUG ?= OFF # ON to turn on debugging symbols # Compiler toolchain LLVM_BINROOT ?= $(dir $(shell which riscv32-unknown-elf-clang)) -LLVM_VER ?= $(subst git,,$(shell $(LLVM_BINROOT)/llvm-config --version)) +LLVM_VER ?= $(shell $(LLVM_BINROOT)/llvm-config --version | cut -d '-' -f 1) RISCV_CC ?= $(LLVM_BINROOT)/clang RISCV_LD ?= $(LLVM_BINROOT)/ld.lld RISCV_AR ?= $(LLVM_BINROOT)/llvm-ar