-
Notifications
You must be signed in to change notification settings - Fork 100
/
Dockerfile
63 lines (58 loc) · 1.49 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
FROM amazonlinux:2
LABEL maintainer="Lovell Fuller <[email protected]>"
# Create Amazon Linux 2 (glibc 2.26) container suitable for building Linux x64 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 \
nasm \
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-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 \
&& \
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-x64" \
FLAGS="-march=nehalem" \
MESON="--cross-file=/root/meson.ini"
COPY Toolchain.cmake /root/
COPY meson.ini /root/