strace/travis-install.sh
Dmitry V. Levin f4001a3d12 travis: use a suitable musl revision
There seems to be no readily available binary packages of musl that are
sufficiently up to date to be used to build and test strace, so prepare
a suitable musl from source.

* travis-install.sh (musl-gcc): Do not add an extra repository,
do not install musl-tools and linux-musl-dev packages.
Download, build, and install a suitable musl revision instead.
2016-08-04 01:10:05 +00:00

44 lines
756 B
Bash
Executable File

#!/bin/sh -ex
updated=
apt_get_install()
{
[ -n "$updated" ] || {
sudo apt-get -qq update
updated=1
}
sudo apt-get -qq --no-install-suggests --no-install-recommends \
install -y "$@"
}
case "$CC" in
gcc)
apt_get_install gcc-multilib
;;
clang-*)
apt_get_install gcc-multilib "$CC"
;;
musl-gcc)
apt_get_install gcc-multilib
git clone --depth=1 https://github.com/strace/musl
cd musl
CC=gcc
./configure --prefix=/opt/musl --exec-prefix=/usr
make
sudo make install
cd -
rm -rf musl
sudo ln -s \
/usr/include/linux \
/usr/include/asm \
/usr/include/asm-generic \
/usr/include/mtd \
/opt/musl/include/
;;
esac
if [ "${COVERAGE-}" = true ]; then
apt_get_install lcov
pip install --user codecov
fi