-
Notifications
You must be signed in to change notification settings - Fork 119
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (54 loc) · 1.45 KB
/
Dockerfile
File metadata and controls
60 lines (54 loc) · 1.45 KB
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
FROM --platform=linux/arm64 rockylinux:8
LABEL maintainer="Lovell Fuller <npm@lovell.info>"
## Copyright 2017 Lovell Fuller and others.
## SPDX-License-Identifier: Apache-2.0
# Create Rocky Linux 8 (glibc 2.28) 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:/opt/rh/gcc-toolset-15/root/usr/bin:$PATH"
# Build dependencies
RUN \
dnf update -y && \
dnf install -y epel-release && \
dnf config-manager --set-enabled powertools && \
dnf install -y --setopt=tsflags=nodocs \
autoconf \
automake \
bzip2 \
cmake \
curl-devel \
findutils \
gcc-toolset-15-gcc \
gcc-toolset-15-gcc-c++ \
gettext \
git \
gperf \
jq \
make \
openssl-devel \
patch \
pkgconf \
python3.12-pip \
tar \
xz \
&& \
curl https://sh.rustup.rs -sSf | sh -s -- -y \
--no-modify-path \
--profile minimal \
--default-host aarch64-unknown-linux-gnu \
--default-toolchain nightly \
&& \
cargo install cargo-c --locked && \
pip3.12 install meson ninja
# Compiler settings
ENV \
PKG_CONFIG="aarch64-linux-gnu-pkgconf --static" \
PLATFORM="linux-arm64v8" \
FLAGS="-march=armv8-a" \
RUSTFLAGS="-Zlocation-detail=none -Zfmt-debug=none" \
MESON="--cross-file=/root/meson.ini"
COPY Toolchain.cmake /root/
COPY meson.ini /root/
COPY aarch64-linux-gnu-pkgconf /usr/bin