Download binary for mold on Ubuntu 20.04

This commit is contained in:
Jordan Carlin 2024-11-23 21:32:42 -08:00
parent 3e9d5a48df
commit 4f5db12b2c
No known key found for this signature in database
2 changed files with 11 additions and 3 deletions

View File

@ -64,16 +64,15 @@ if [ "$FAMILY" == rhel ]; then
elif [[ "$FAMILY" == ubuntu || "$FAMILY" == debian ]]; then
if (( UBUNTU_VERSION >= 24 )); then
PYTHON_VERSION=python3.12
VERILATOR_PACKAGES+=(mold) # Not availale in Ubuntu 20.04, nice for Verilator
elif (( UBUNTU_VERSION >= 22 )); then
PYTHON_VERSION=python3.11
VERILATOR_PACKAGES+=(mold) # Not availale in Ubuntu 20.04, nice for Verilator
elif (( UBUNTU_VERSION >= 20 )); then
PYTHON_VERSION=python3.9
OTHER_PACKAGES+=(gcc-10 g++-10 cpp-10) # Newer version of gcc needed for Verilator
elif (( DEBIAN_VERSION >= 12 )); then
PYTHON_VERSION=python3.11
VERILATOR_PACKAGES+=(mold) # Not availale in Ubuntu 20.04, nice for Verilator
if (( UBUNTU_VERSION != 20 )); then
VERILATOR_PACKAGES+=(mold) # Not availale in Ubuntu 20.04, binary will be downloaded instead
fi
PACKAGE_MANAGER="DEBIAN_FRONTEND=noninteractive apt-get"
UPDATE_COMMAND="sudo $PACKAGE_MANAGER update -y && sudo $PACKAGE_MANAGER upgrade -y --with-new-pkgs"

View File

@ -263,6 +263,15 @@ if (( RHEL_VERSION == 8 )); then
fi
fi
# Mold needed for Verilator
if (( UBUNTU_VERSION == 20 )); then
STATUS="mold"
if [ ! -e "$RISCV"/bin/mold ]; then
section_header "Installing mold"
cd "$RISCV"
wget -nv --retry-connrefused $retry_on_host_error https://github.com/rui314/mold/releases/download/v2.34.1/mold-2.34.1-x86_64-linux.tar.gz
fi
fi
# RISC-V GNU Toolchain (https://github.com/riscv-collab/riscv-gnu-toolchain)
# The RISC-V GNU Toolchain includes the GNU Compiler Collection (gcc), GNU Binutils, Newlib,