Skip to content

Commit

Permalink
bender: Install bender with cargo
Browse files Browse the repository at this point in the history
  • Loading branch information
suehtamacv committed Dec 5, 2023
1 parent 8c78b41 commit 80d6813
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,18 @@ tc-riscv-isa-sim: sw/toolchain/riscv-isa-sim sw/toolchain/dtc

bender: check-bender
check-bender:
@if [ -x $(BENDER_INSTALL_DIR)/bender ]; then \
@if [ -x $(BENDER_INSTALL_DIR)/bin/bender ]; then \
req="bender $(BENDER_VERSION)"; \
current="$$($(BENDER_INSTALL_DIR)/bender --version)"; \
current="$$($(BENDER_INSTALL_DIR)/bin/bender --version)"; \
if [ "$$(printf '%s\n' "$${req}" "$${current}" | sort -V | head -n1)" != "$${req}" ]; then \
rm -rf $(BENDER_INSTALL_DIR); \
fi \
fi
@$(MAKE) -C $(ROOT_DIR) $(BENDER_INSTALL_DIR)/bender
@$(MAKE) -C $(ROOT_DIR) $(BENDER_INSTALL_DIR)/bin/bender

$(BENDER_INSTALL_DIR)/bender:
$(BENDER_INSTALL_DIR)/bin/bender:
mkdir -p $(BENDER_INSTALL_DIR) && cd $(BENDER_INSTALL_DIR) && \
curl --proto '=https' --tlsv1.2 https://pulp-platform.github.io/bender/init -sSf | sh -s -- $(BENDER_VERSION)
cargo install bender --version $(BENDER_VERSION) --root $(BENDER_INSTALL_DIR) --locked

###############
# Verilator #
Expand Down
2 changes: 1 addition & 1 deletion util/Makefrag
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ BENDER_INSTALL_DIR ?= ${INSTALL_DIR}/bender
VERILATOR_INSTALL_DIR ?= ${INSTALL_DIR}/verilator

# Support for local override
BENDER ?= ${BENDER_INSTALL_DIR}/bender
BENDER ?= ${BENDER_INSTALL_DIR}/bin/bender
DASM ?= ${SPIKE_INSTALL_DIR}/bin/spike-dasm
VLT ?= ${VERILATOR_INSTALL_DIR}/bin/verilator_bin
CMAKE ?= cmake-3.18.1
Expand Down

0 comments on commit 80d6813

Please sign in to comment.