forked from lovell/sharp-libvips
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (56 loc) · 1.82 KB
/
Dockerfile
File metadata and controls
62 lines (56 loc) · 1.82 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
61
62
FROM debian/eol:buster
LABEL maintainer="Lovell Fuller <npm@lovell.info>"
## Copyright 2017 Lovell Fuller and others.
## SPDX-License-Identifier: Apache-2.0
# Create Debian 11 (glibc 2.31) container suitable for cross-compiling Linux ARMv6 binaries
# Path settings
ENV \
RUSTUP_HOME="/usr/local/rustup" \
CARGO_HOME="/usr/local/cargo" \
PATH="/usr/local/cargo/bin:/root/tools/x64-gcc-10.3.0-glibc-2.28/arm-rpi-linux-gnueabihf/bin:$PATH"
# Build dependencies
RUN \
echo "deb http://archive.debian.org/debian buster-backports main" >> /etc/apt/sources.list.d/backports.list && \
apt-get update && \
apt-get install -y curl && \
dpkg --add-architecture armhf && \
apt-get update && \
apt-get install -y \
autoconf \
autopoint \
gettext \
git \
gperf \
jq \
libcurl4-openssl-dev \
libssl-dev \
libtool \
ninja-build \
pkg-config \
python3-pip \
&& \
apt-get install -y -t buster-backports cmake && \
mkdir /root/tools && \
curl -Ls https://github.com/rvagg/rpi-newer-crosstools/archive/master.tar.gz | tar xzC /root/tools --strip-components=1 && \
curl https://sh.rustup.rs -sSf | sh -s -- -y \
--no-modify-path \
--profile minimal \
--target arm-unknown-linux-gnueabihf \
--default-toolchain nightly \
&& \
cargo install cargo-c --locked && \
pip3 install meson tomli
# Compiler settings
ENV \
PKG_CONFIG="arm-linux-gnueabihf-pkg-config --static" \
PLATFORM="linux-armv6" \
CHOST="arm-rpi-linux-gnueabihf" \
RUST_TARGET="arm-unknown-linux-gnueabihf" \
FLAGS="-marm -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard" \
RUSTFLAGS="-Zlocation-detail=none -Zfmt-debug=none" \
WITHOUT_NEON="true" \
# Highway requires NEON (Armv7+)
WITHOUT_HIGHWAY="true" \
MESON="--cross-file=/root/meson.ini"
COPY Toolchain.cmake /root/
COPY meson.ini /root/