-
Notifications
You must be signed in to change notification settings - Fork 377
/
Dockerfile.mipsel-unknown-linux-gnu
56 lines (44 loc) · 1.73 KB
/
Dockerfile.mipsel-unknown-linux-gnu
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
FROM ubuntu:20.04 as cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh
FROM cross-base as build
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
g++-mipsel-linux-gnu \
gfortran-mipsel-linux-gnu \
libc6-dev-mipsel-cross
COPY deny-debian-packages.sh /
RUN TARGET_ARCH=mipsel /deny-debian-packages.sh \
binutils \
binutils-mipsel-linux-gnu
COPY qemu.sh /
RUN /qemu.sh mipsel softmmu
COPY dropbear.sh /
RUN /dropbear.sh
COPY linux-image.sh /
RUN /linux-image.sh mipsel
COPY linux-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TOOLCHAIN_PREFIX=mipsel-linux-gnu-
ENV CROSS_SYSROOT=/usr/mipsel-linux-gnu
ENV CROSS_TARGET_RUNNER="/linux-runner mipsel"
ENV CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_RUNNER="$CROSS_TARGET_RUNNER" \
AR_mipsel_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_mipsel_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_mipsel_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_mipsel_unknown_linux_gnu=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_mipsel_unknown_linux_gnu="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/mipsel-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}" \
PKG_CONFIG_ALLOW_CROSS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=mips \
CROSS_CMAKE_CRT=gnu \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC"
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /linux-runner