-
Notifications
You must be signed in to change notification settings - Fork 100
/
Dockerfile
61 lines (55 loc) · 1.54 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM debian:bullseye
LABEL maintainer="Lovell Fuller <npm@lovell.info>"
# Create Debian 11 (glibc 2.31) container suitable for cross-compiling Linux s390x binaries
# Path settings
ENV \
RUSTUP_HOME="/usr/local/rustup" \
CARGO_HOME="/usr/local/cargo" \
PATH="/usr/local/cargo/bin:$PATH"
# Build dependencies
RUN \
apt-get update && \
apt-get install -y curl && \
dpkg --add-architecture s390x && \
apt-get update && \
apt-get install -y \
autoconf \
autopoint \
cmake \
crossbuild-essential-s390x \
gettext \
git \
gperf \
jq \
libssl-dev \
libtool \
ninja-build \
pkg-config \
python3-packaging \
python3-pip \
&& \
curl https://sh.rustup.rs -sSf | sh -s -- -y \
--no-modify-path \
--profile minimal \
&& \
rustup target add s390x-unknown-linux-gnu && \
cargo install cargo-c --locked && \
pip3 install meson tomli
# Handy for debugging the compiled targets in Highway (hwy_list_targets)
#RUN apt-get install -y qemu-user-static
#ENV QEMU_LD_PREFIX="/usr/s390x-linux-gnu"
# Compiler settings
ENV \
PKG_CONFIG="s390x-linux-gnu-pkg-config --static" \
PLATFORM="linux-s390x" \
CHOST="s390x-linux-gnu" \
RUST_TARGET="s390x-unknown-linux-gnu" \
FLAGS="" \
# Highway supports IBMZ starting from IBM/Z14, which needs GCC 11 or
# higher (i.e. Debian 12, glibc 2.36). Therefore, it should be disabled
# for the time being.
#FLAGS="-march=z14 -mzvector" \
WITHOUT_HIGHWAY="true" \
MESON="--cross-file=/root/meson.ini"
COPY Toolchain.cmake /root/
COPY meson.ini /root/