1FROM ubuntu:16.04
2
3RUN apt-get update && apt-get install -y --no-install-recommends \
4  autoconf \
5  automake \
6  bison \
7  bzip2 \
8  ca-certificates \
9  cmake \
10  curl \
11  file \
12  flex \
13  g++ \
14  gawk \
15  git \
16  libcurl4-openssl-dev \
17  libssl-dev \
18  make \
19  ninja-build \
20  nasm \
21  pkg-config \
22  python3 \
23  sudo \
24  texinfo \
25  wget \
26  xz-utils \
27  zlib1g-dev
28
29COPY host-x86_64/dist-x86_64-haiku/llvm-config.sh /bin/llvm-config-haiku
30
31ENV ARCH=x86_64
32
33WORKDIR /tmp
34COPY host-x86_64/dist-x86_64-haiku/build-toolchain.sh /tmp/
35RUN /tmp/build-toolchain.sh $ARCH
36
37COPY host-x86_64/dist-x86_64-haiku/fetch-packages.sh /tmp/
38RUN /tmp/fetch-packages.sh
39
40COPY scripts/sccache.sh /scripts/
41RUN sh /scripts/sccache.sh
42
43ENV HOST=x86_64-unknown-haiku
44ENV TARGET=target.$HOST
45
46ENV RUST_CONFIGURE_ARGS --disable-jemalloc \
47  --set=$TARGET.cc=x86_64-unknown-haiku-gcc \
48  --set=$TARGET.cxx=x86_64-unknown-haiku-g++ \
49  --set=$TARGET.llvm-config=/bin/llvm-config-haiku
50ENV SCRIPT python3 ../x.py dist --host=$HOST --target=$HOST
51