blob: 78da64aa8fb17190d38eabc553581a886f7cd3b1 [file] [log] [blame]
Alex Crichtond820c4a2016-01-18 11:16:38 -08001# Initial script which is run inside of all qemu images. The first argument to
2# this script (as arranged by the qemu image itself) is the path to where the
3# libc crate is mounted.
4#
5# For qemu images we currently need to install Rust manually as this wasn't done
6# by the initial run-travis.sh script
7#
8# FIXME: feels like run-travis.sh should be responsible for downloading the
9# compiler.
10
11set -ex
12
13ROOT=$1
14cp -r $ROOT/libc /tmp/libc
15cd /tmp/libc
16
17TARGET=$(cat $ROOT/TARGET)
18
19case $TARGET in
20 *-freebsd)
21 sudo pkg install -y rust cargo
22 ;;
23
24 *-openbsd)
25 pkg_add rust curl gcc-4.8.4p4
26 curl https://static.rust-lang.org/cargo-dist/2015-04-02/cargo-nightly-x86_64-unknown-openbsd.tar.gz | \
27 tar xzf - -C /tmp
28 export PATH=$PATH:/tmp/cargo-nightly-x86_64-unknown-openbsd/cargo/bin
29 export CC=egcc
30 ;;
31
32 *)
33 echo "Unknown target: $TARGET"
34 exit 1
35 ;;
36esac
37
38exec sh ci/run.sh $TARGET