-
Notifications
You must be signed in to change notification settings - Fork 389
/
Copy pathDockerfile.mips64-unknown-linux-muslabi64
41 lines (32 loc) · 1.35 KB
/
Dockerfile.mips64-unknown-linux-muslabi64
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
FROM ubuntu:20.04
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
COPY xargo.sh /
RUN /xargo.sh
COPY qemu.sh /
RUN /qemu.sh mips64
# this is a hard-float target for the mips64r2 architecture
# https://github.com/rust-lang/rust/blob/75d3027fb5ce1af6712e4503c9574802212101bd/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs#L7
COPY musl.sh /
RUN /musl.sh \
TARGET=mips64-linux-musl \
"COMMON_CONFIG += -with-arch=mips64r2"
ENV CROSS_MUSL_SYSROOT=/usr/local/mips64-linux-musl
COPY musl-symlink.sh /
RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT mips64
RUN mkdir -p $CROSS_MUSL_SYSROOT/usr/lib64
# needed for the C/C++ runners
RUN ln -s $CROSS_MUSL_SYSROOT/usr/lib/libc.so $CROSS_MUSL_SYSROOT/usr/lib64/libc.so
RUN ln -s $CROSS_MUSL_SYSROOT/usr/lib/libc.so.1 $CROSS_MUSL_SYSROOT/usr/lib64/libc.so.1
COPY mips64-linux-musl-gcc.sh /usr/bin/
COPY rustc_info.sh /
COPY qemu-runner base-runner.sh /
ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSLABI64_LINKER=mips64-linux-musl-gcc.sh \
CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSLABI64_RUNNER="/qemu-runner mips64" \
CC_mips64_unknown_linux_muslabi64=mips64-linux-musl-gcc \
CXX_mips64_unknown_linux_muslabi64=mips64-linux-musl-g++ \
BINDGEN_EXTRA_CLANG_ARGS_mips64_unknown_linux_muslabi64="--sysroot=$CROSS_MUSL_SYSROOT" \
QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT \
RUST_TEST_THREADS=1