Skip to content

Commit

Permalink
Hardcode version of clang runtime to be 12.0.1
Browse files Browse the repository at this point in the history
Not sure if it works with the newest version
  • Loading branch information
JosseVanDelm committed Dec 19, 2023
1 parent 87255cd commit 3908f36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion target/snitch_cluster/sw/toolchain.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3908f36

Please sign in to comment.