-
Notifications
You must be signed in to change notification settings - Fork 100
/
Dockerfile
64 lines (59 loc) · 1.58 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
62
63
64
FROM arm64v8/amazonlinux:2
LABEL maintainer="Lovell Fuller <[email protected]>"
# Create Amazon Linux 2 (glibc 2.26) container suitable for building Linux ARM64v8-A binaries
# Path settings
ENV \
RUSTUP_HOME="/usr/local/rustup" \
CARGO_HOME="/usr/local/cargo" \
PATH="/usr/local/cargo/bin:$PATH"
# Build dependencies
RUN \
yum update -y && \
amazon-linux-extras install epel -y && \
yum install -y --setopt=tsflags=nodocs \
--exclude=gcc \
autoconf \
automake \
bzip2 \
cmake3 \
curl \
gcc10 \
gcc10-binutils \
gcc10-c++ \
gettext \
git \
gperf \
jq \
make \
openssl-devel \
patch \
pkgconfig \
python3 \
tar \
xz \
&& \
ln -s /usr/bin/gcc10-gcc /usr/bin/cc && \
ln -s /usr/bin/gcc10-g++ /usr/bin/c++ && \
ln -s /usr/bin/gcc10-as /usr/bin/as && \
ln -s /usr/bin/gcc10-ar /usr/bin/ar && \
ln -s /usr/bin/gcc10-nm /usr/bin/nm && \
ln -s /usr/bin/gcc10-ld /usr/bin/ld && \
ln -s /usr/bin/gcc10-strip /usr/bin/strip && \
ln -s /usr/bin/gcc10-ranlib /usr/bin/ranlib && \
ln -s /usr/bin/gcc10-readelf /usr/bin/readelf && \
curl https://sh.rustup.rs -sSf | sh -s -- -y \
--no-modify-path \
--profile minimal \
--default-host aarch64-unknown-linux-gnu \
&& \
cargo install cargo-c --locked && \
ln -s /usr/bin/cmake3 /usr/bin/cmake && \
pip3 install meson ninja packaging tomli
# Compiler settings
ENV \
PKG_CONFIG="pkg-config --static" \
PLATFORM="linux-arm64v8" \
FLAGS="-march=armv8-a" \
MESON="--cross-file=/root/meson.ini"
COPY Toolchain.cmake /root/
COPY meson.ini /root/