|
1 | 1 | FROM ubuntu:18.04
|
2 | 2 |
|
3 | 3 | RUN apt-get update && apt-get install -y --no-install-recommends \
|
4 |
| - gcc make libc6-dev git curl ca-certificates \ |
5 |
| - gcc-mips-linux-gnu qemu-user qemu-system-mips |
6 |
| -RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.2.22.tar.gz | \ |
7 |
| - tar xzf - && \ |
8 |
| - cd musl-1.1.22 \ |
9 |
| - CC=mips-linux-gcc \ |
10 |
| - ./configure --prefix=/musl-mips --enable-wrapper=yes && \ |
11 |
| - make install -j4 && \ |
12 |
| - cd .. && \ |
13 |
| - rm -rf musl-1.1.22 |
14 |
| -# Install linux kernel headers sanitized for use with musl |
15 |
| -RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \ |
16 |
| - tar xzf - && \ |
17 |
| - cd kernel-headers-3.12.6-6 && \ |
18 |
| - make ARCH=mips prefix=/musl-mips install -j4 && \ |
19 |
| - cd .. && \ |
20 |
| - rm -rf kernel-headers-3.12.6-6 |
| 4 | + gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \ |
| 5 | + bzip2 |
21 | 6 |
|
22 |
| -# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd? |
23 |
| -ENV PATH=$PATH:/musl-aarch64/bin:/rust/bin \ |
24 |
| - CC_mips_unknown_linux_musl=musl-gcc \ |
25 |
| - RUSTFLAGS='-Clink-args=-lgcc' \ |
26 |
| - CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc \ |
27 |
| - CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mips -L /musl-mips" |
28 |
| - |
29 |
| -# RUN mkdir /toolchain |
| 7 | +RUN mkdir /toolchain |
30 | 8 |
|
31 | 9 | # Note that this originally came from:
|
32 | 10 | # https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
|
33 |
| -# RUN curl --retry 5 -L https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \ |
34 |
| -# tar xjf - -C /toolchain --strip-components=1 |
| 11 | +RUN curl --retry 5 -L https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \ |
| 12 | + tar xjf - -C /toolchain --strip-components=1 |
35 | 13 |
|
36 |
| -# ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15/bin \ |
37 |
| -# CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \ |
38 |
| -# CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-openwrt-linux-gcc \ |
39 |
| -# CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mips -L /toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15" |
| 14 | +ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15/bin \ |
| 15 | + CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \ |
| 16 | + CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-openwrt-linux-gcc \ |
| 17 | + CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mips -L /toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15" |
0 commit comments