From 3908f36cd927fd6ae5367965d627c804a47e678d Mon Sep 17 00:00:00 2001 From: Josse Van Delm Date: Tue, 19 Dec 2023 12:14:48 +0100 Subject: [PATCH] Hardcode version of clang runtime to be 12.0.1 Not sure if it works with the newest version --- target/snitch_cluster/sw/toolchain.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/snitch_cluster/sw/toolchain.mk b/target/snitch_cluster/sw/toolchain.mk index c843213be5..05047f2533 100644 --- a/target/snitch_cluster/sw/toolchain.mk +++ b/target/snitch_cluster/sw/toolchain.mk @@ -31,7 +31,7 @@ RISCV_OBJCOPY ?= $(LLVM_BINROOT)/llvm-objcopy$(LLVM_VERSION) RISCV_OBJDUMP ?= $(LLVM_BINROOT)/llvm-objdump$(LLVM_VERSION) RISCV_DWARFDUMP ?= $(LLVM_BINROOT)/llvm-dwarfdump$(LLVM_VERSION) -LLVM_VER ?= $(shell $(LLVM_BINROOT)/llvm-config --version | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+') +LLVM_VER ?= $(shell /tools/riscv-llvm/bin/llvm-config --version | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+') # Compiler flags ifneq ($(SELECT_TOOLCHAIN), llvm-generic) @@ -68,6 +68,7 @@ RISCV_LDFLAGS += -L/tools/riscv-llvm/riscv32-unknown-elf/lib/ endif # Common flags RISCV_LDFLAGS += -lclang_rt.builtins-riscv32 +# Use custom version here regardless RISCV_LDFLAGS += -L/tools/riscv-llvm/lib/clang/$(LLVM_VER)/lib/ RISCV_LDFLAGS += -fuse-ld=$(RISCV_LD) RISCV_LDFLAGS += -nostdlib