Skip to content

Commit 7aa3613

Browse files
committed
Auto merge of rust-lang#103062 - cuviper:dist-mips, r=Mark-Simulacrum
Upgrade dist-mips*-linux to ubuntu:22.04 + crosstool-ng These have no change in compatibility, still Linux 4.4 and glibc 2.23. The main motivation for upgrading is that LLVM 16 will require at least GCC 7.1. Using crosstool-ng lets us choose our own toolchain versions, and then the Ubuntu version doesn't matter so much, just for the host compilation while we cross-compile.
2 parents 7fcf850 + 6c49e9e commit 7aa3613

15 files changed

+3345
-88
lines changed

src/ci/docker/README.md

+86
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,92 @@ For targets: `i586-unknown-linux-gnu`
250250
(\*) Compressed debug is enabled by default for gas (assembly) on Linux/x86 targets,
251251
but that makes our `compiler_builtins` incompatible with binutils < 2.32.
252252
253+
### `mips-linux-gnu.config`
254+
255+
For targets: `mips-unknown-linux-gnu`
256+
257+
- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
258+
- Path and misc options > Use a mirror = ENABLE
259+
- Path and misc options > Base URL = https://ci-mirrors.rust-lang.org/rustc
260+
- Path and misc options > Patches origin = Bundled, then local
261+
- Path and misc options > Local patch directory = /tmp/patches
262+
- Target options > Target Architecture = mips
263+
- Target options > ABI = o32
264+
- Target options > Endianness = Big endian
265+
- Target options > Bitness = 32-bit
266+
- Target options > Architecture level = mips32r2
267+
- Operating System > Target OS = linux
268+
- Operating System > Linux kernel version = 4.4.174
269+
- Binary utilities > Version of binutils = 2.32
270+
- C-library > glibc version = 2.23
271+
- C compiler > gcc version = 8.3.0
272+
- C compiler > gcc extra config = --with-fp-32=xx --with-odd-spreg-32=no
273+
- C compiler > C++ = ENABLE -- to cross compile LLVM
274+
275+
### `mipsel-linux-gnu.config`
276+
277+
For targets: `mipsel-unknown-linux-gnu`
278+
279+
- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
280+
- Path and misc options > Use a mirror = ENABLE
281+
- Path and misc options > Base URL = https://ci-mirrors.rust-lang.org/rustc
282+
- Path and misc options > Patches origin = Bundled, then local
283+
- Path and misc options > Local patch directory = /tmp/patches
284+
- Target options > Target Architecture = mips
285+
- Target options > ABI = o32
286+
- Target options > Endianness = Little endian
287+
- Target options > Bitness = 32-bit
288+
- Target options > Architecture level = mips32r2
289+
- Operating System > Target OS = linux
290+
- Operating System > Linux kernel version = 4.4.174
291+
- Binary utilities > Version of binutils = 2.32
292+
- C-library > glibc version = 2.23
293+
- C compiler > gcc version = 8.3.0
294+
- C compiler > gcc extra config = --with-fp-32=xx --with-odd-spreg-32=no
295+
- C compiler > C++ = ENABLE -- to cross compile LLVM
296+
297+
### `mips64-linux-gnu.config`
298+
299+
For targets: `mips64-unknown-linux-gnuabi64`
300+
301+
- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
302+
- Path and misc options > Use a mirror = ENABLE
303+
- Path and misc options > Base URL = https://ci-mirrors.rust-lang.org/rustc
304+
- Path and misc options > Patches origin = Bundled, then local
305+
- Path and misc options > Local patch directory = /tmp/patches
306+
- Target options > Target Architecture = mips
307+
- Target options > ABI = n64
308+
- Target options > Endianness = Big endian
309+
- Target options > Bitness = 64-bit
310+
- Target options > Architecture level = mips64r2
311+
- Operating System > Target OS = linux
312+
- Operating System > Linux kernel version = 4.4.174
313+
- Binary utilities > Version of binutils = 2.32
314+
- C-library > glibc version = 2.23
315+
- C compiler > gcc version = 8.3.0
316+
- C compiler > C++ = ENABLE -- to cross compile LLVM
317+
318+
### `mips64el-linux-gnu.config`
319+
320+
For targets: `mips64el-unknown-linux-gnuabi64`
321+
322+
- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
323+
- Path and misc options > Use a mirror = ENABLE
324+
- Path and misc options > Base URL = https://ci-mirrors.rust-lang.org/rustc
325+
- Path and misc options > Patches origin = Bundled, then local
326+
- Path and misc options > Local patch directory = /tmp/patches
327+
- Target options > Target Architecture = mips
328+
- Target options > ABI = n64
329+
- Target options > Endianness = Little endian
330+
- Target options > Bitness = 64-bit
331+
- Target options > Architecture level = mips64r2
332+
- Operating System > Target OS = linux
333+
- Operating System > Linux kernel version = 4.4.174
334+
- Binary utilities > Version of binutils = 2.32
335+
- C-library > glibc version = 2.23
336+
- C compiler > gcc version = 8.3.0
337+
- C compiler > C++ = ENABLE -- to cross compile LLVM
338+
253339
### `powerpc-linux-gnu.config`
254340
255341
For targets: `powerpc-unknown-linux-gnu`
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
1-
FROM ubuntu:16.04
2-
3-
RUN apt-get update && apt-get install -y --no-install-recommends \
4-
g++ \
5-
make \
6-
ninja-build \
7-
file \
8-
curl \
9-
ca-certificates \
10-
python3 \
11-
git \
12-
cmake \
13-
sudo \
14-
gdb \
15-
xz-utils \
16-
g++-mips-linux-gnu \
17-
libssl-dev \
18-
pkg-config
1+
FROM ubuntu:22.04
192

3+
COPY scripts/cross-apt-packages.sh /scripts/
4+
RUN sh /scripts/cross-apt-packages.sh
5+
6+
COPY scripts/crosstool-ng-1.24.sh /scripts/
7+
RUN sh /scripts/crosstool-ng-1.24.sh
8+
9+
COPY scripts/rustbuild-setup.sh /scripts/
10+
RUN sh /scripts/rustbuild-setup.sh
11+
WORKDIR /tmp
12+
13+
COPY host-x86_64/dist-mips-linux/patches/ /tmp/patches/
14+
COPY host-x86_64/dist-mips-linux/mips-linux-gnu.config host-x86_64/dist-mips-linux/build-mips-toolchain.sh /tmp/
15+
RUN su rustbuild -c ./build-mips-toolchain.sh
2016

2117
COPY scripts/sccache.sh /scripts/
2218
RUN sh /scripts/sccache.sh
2319

24-
COPY scripts/cmake.sh /scripts/
25-
RUN /scripts/cmake.sh
20+
ENV PATH=$PATH:/x-tools/mips-unknown-linux-gnu/bin
21+
22+
ENV \
23+
CC_mips_unknown_linux_gnu=mips-unknown-linux-gnu-gcc \
24+
AR_mips_unknown_linux_gnu=mips-unknown-linux-gnu-ar \
25+
CXX_mips_unknown_linux_gnu=mips-unknown-linux-gnu-g++
2626

2727
ENV HOSTS=mips-unknown-linux-gnu
2828

29-
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs \
30-
--set llvm.allow-old-toolchain
29+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3130
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
4+
hide_output() {
5+
set +x
6+
on_err="
7+
echo ERROR: An error was encountered with the build.
8+
cat /tmp/build.log
9+
exit 1
10+
"
11+
trap "$on_err" ERR
12+
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
13+
PING_LOOP_PID=$!
14+
"$@" &> /tmp/build.log
15+
rm /tmp/build.log
16+
trap - ERR
17+
kill $PING_LOOP_PID
18+
set -x
19+
}
20+
21+
mkdir build
22+
cd build
23+
cp ../mips-linux-gnu.config .config
24+
hide_output ct-ng build
25+
cd ..
26+
rm -rf build

0 commit comments

Comments
 (0)