• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2# Copyright (c) 2018-2020 Petr Vorel <pvorel@suse.cz>
3set -ex
4
5if [ -z "$ARCH" ]; then
6	echo "missing \$ARCH!" >&2
7	exit 1
8fi
9
10case "$ARCH" in
11arm64) gcc_arch="aarch64";;
12ppc64el) gcc_arch="powerpc64le";;
13s390x) gcc_arch="$ARCH";;
14*) echo "unsupported arch: '$ARCH'!" >&2; exit 1;;
15esac
16
17dpkg --add-architecture $ARCH
18apt update
19
20apt install -y --no-install-recommends \
21	gcc-${gcc_arch}-linux-gnu \
22	libc6-dev-${ARCH}-cross \
23	libmnl-dev:$ARCH \
24	libtirpc-dev:$ARCH
25