Skip to content

Commit c3e2ff8

Browse files
committed
Create Dockerfile based on dist-various-1.
1 parent 0c0315c commit c3e2ff8

File tree

1 file changed

+127
-0
lines changed

1 file changed

+127
-0
lines changed

src/ci/docker/thumb-none/Dockerfile

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
sudo \
13+
xz-utils \
14+
zlib1g-dev \
15+
g++-arm-linux-gnueabi \
16+
g++-arm-linux-gnueabihf \
17+
g++-aarch64-linux-gnu \
18+
gcc-sparc64-linux-gnu \
19+
libc6-dev-sparc64-cross \
20+
bzip2 \
21+
patch \
22+
libssl-dev \
23+
pkg-config \
24+
gcc-arm-none-eabi \
25+
libnewlib-arm-none-eabi
26+
27+
WORKDIR /build
28+
29+
COPY dist-various-1/build-rumprun.sh /build
30+
RUN ./build-rumprun.sh
31+
32+
COPY dist-various-1/install-x86_64-redox.sh /build
33+
RUN ./install-x86_64-redox.sh
34+
35+
COPY dist-various-1/install-mips-musl.sh /build
36+
RUN ./install-mips-musl.sh
37+
38+
COPY dist-various-1/install-mipsel-musl.sh /build
39+
RUN ./install-mipsel-musl.sh
40+
41+
# Suppress some warnings in the openwrt toolchains we downloaded
42+
ENV STAGING_DIR=/tmp
43+
44+
COPY scripts/musl.sh /build
45+
RUN env \
46+
CC=arm-linux-gnueabi-gcc CFLAGS="-march=armv5te -marm -mfloat-abi=soft" \
47+
CXX=arm-linux-gnueabi-g++ CXXFLAGS="-march=armv5te -marm -mfloat-abi=soft" \
48+
bash musl.sh armv5te && \
49+
env \
50+
CC=arm-linux-gnueabi-gcc CFLAGS="-march=armv6 -marm" \
51+
CXX=arm-linux-gnueabi-g++ CXXFLAGS="-march=armv6 -marm" \
52+
bash musl.sh arm && \
53+
env \
54+
CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv6 -marm" \
55+
CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv6 -marm" \
56+
bash musl.sh armhf && \
57+
env \
58+
CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv7-a" \
59+
CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv7-a" \
60+
bash musl.sh armv7 && \
61+
env \
62+
CC=aarch64-linux-gnu-gcc \
63+
CXX=aarch64-linux-gnu-g++ \
64+
bash musl.sh aarch64 && \
65+
env \
66+
CC=mips-openwrt-linux-gcc \
67+
CXX=mips-openwrt-linux-g++ \
68+
bash musl.sh mips && \
69+
env \
70+
CC=mipsel-openwrt-linux-gcc \
71+
CXX=mipsel-openwrt-linux-g++ \
72+
bash musl.sh mipsel && \
73+
rm -rf /build/*
74+
75+
# FIXME(mozilla/sccache#235) this shouldn't be necessary but is currently
76+
# necessary to disambiguate the mips compiler with the mipsel compiler. We want
77+
# to give these two wrapper scripts (currently identical ones) different hashes
78+
# to ensure that sccache understands that they're different compilers.
79+
RUN \
80+
echo "# a" >> /usr/local/mips-linux-musl/bin/mips-openwrt-linux-musl-wrapper.sh && \
81+
echo "# b" >> /usr/local/mipsel-linux-musl/bin/mipsel-openwrt-linux-musl-wrapper.sh
82+
83+
ENV TARGETS=asmjs-unknown-emscripten
84+
ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
85+
ENV TARGETS=$TARGETS,x86_64-rumprun-netbsd
86+
ENV TARGETS=$TARGETS,mips-unknown-linux-musl
87+
ENV TARGETS=$TARGETS,mipsel-unknown-linux-musl
88+
ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi
89+
ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf
90+
ENV TARGETS=$TARGETS,armv5te-unknown-linux-gnueabi
91+
ENV TARGETS=$TARGETS,armv5te-unknown-linux-musleabi
92+
ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf
93+
ENV TARGETS=$TARGETS,aarch64-unknown-linux-musl
94+
ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu
95+
ENV TARGETS=$TARGETS,x86_64-unknown-redox
96+
ENV TARGETS=$TARGETS,thumbv6m-none-eabi
97+
ENV TARGETS=$TARGETS,thumbv7m-none-eabi
98+
ENV TARGETS=$TARGETS,thumbv7em-none-eabi
99+
ENV TARGETS=$TARGETS,thumbv7em-none-eabihf
100+
101+
# FIXME: remove armv5te vars after https://github.com/alexcrichton/cc-rs/issues/271
102+
# get fixed and cc update
103+
ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
104+
CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
105+
CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
106+
CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc \
107+
CC_armv5te_unknown_linux_gnueabi=arm-linux-gnueabi-gcc \
108+
CFLAGS_armv5te_unknown_linux_gnueabi="-march=armv5te -marm -mfloat-abi=soft" \
109+
CC_armv5te_unknown_linux_musleabi=arm-linux-gnueabi-gcc \
110+
CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft"
111+
112+
ENV RUST_CONFIGURE_ARGS \
113+
--musl-root-armv5te=/musl-armv5te \
114+
--musl-root-arm=/musl-arm \
115+
--musl-root-armhf=/musl-armhf \
116+
--musl-root-armv7=/musl-armv7 \
117+
--musl-root-aarch64=/musl-aarch64 \
118+
--musl-root-mips=/musl-mips \
119+
--musl-root-mipsel=/musl-mipsel \
120+
--enable-emscripten \
121+
--disable-docs
122+
123+
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
124+
125+
# sccache
126+
COPY scripts/sccache.sh /scripts/
127+
RUN sh /scripts/sccache.sh

0 commit comments

Comments
 (0)