1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-20 01:18:53 +03:00
mold/install-build-deps.sh

50 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/sh
2024-03-02 11:42:57 +03:00
# This script installs binary packages needed to build mold.
# Feel free to send me a PR if your OS is not on this list.
set -e
. /etc/os-release
2022-09-27 06:53:08 +03:00
set -x
2022-08-05 09:40:06 +03:00
case "$ID-$VERSION_ID" in
ubuntu-20.* | pop-20.*)
apt-get update
2024-04-13 15:13:08 +03:00
apt-get install -y cmake gcc g++ g++-10
;;
ubuntu-* | pop-* | linuxmint-* | debian-* | raspbian-*)
apt-get update
2024-04-13 15:13:08 +03:00
apt-get install -y cmake gcc g++
;;
fedora-* | amzn-* | rhel-*)
2024-04-13 15:13:08 +03:00
dnf install -y gcc-g++ cmake glibc-static libstdc++-static diffutils util-linux
;;
2022-08-05 09:40:06 +03:00
opensuse-leap-*)
2024-03-02 11:42:57 +03:00
zypper install -y make cmake gcc-c++ gcc11-c++ glibc-devel-static tar diffutils util-linux
2022-05-14 08:47:10 +03:00
;;
2022-08-05 09:40:06 +03:00
opensuse-tumbleweed-*)
2024-03-02 11:42:57 +03:00
zypper install -y make cmake gcc-c++ glibc-devel-static tar diffutils util-linux
2022-05-14 08:47:10 +03:00
;;
2022-08-05 09:40:06 +03:00
gentoo-*)
emerge-webrsync
2024-04-23 16:14:15 +03:00
emerge dev-build/cmake
2022-05-13 05:45:08 +03:00
;;
arch-* | archarm-* | artix-* | endeavouros-*)
2024-03-02 11:42:57 +03:00
pacman -Sy --needed --noconfirm base-devel cmake util-linux
2022-07-14 08:02:11 +03:00
;;
void-*)
2024-03-02 11:42:57 +03:00
xbps-install -Sy xbps bash make cmake gcc tar diffutils util-linux
;;
alpine-*)
apk update
2023-08-19 07:45:33 +03:00
apk add bash make linux-headers cmake gcc g++
;;
2024-04-23 15:46:57 +03:00
clear-linux-*)
swupd update
swupd bundle-add c-basic diffutils
;;
*)
2022-08-05 09:47:30 +03:00
echo "Error: don't know anything about build dependencies on $ID-$VERSION_ID"
exit 1
esac