-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #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.
- Loading branch information
Showing
15 changed files
with
3,345 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
g++ \ | ||
make \ | ||
ninja-build \ | ||
file \ | ||
curl \ | ||
ca-certificates \ | ||
python3 \ | ||
git \ | ||
cmake \ | ||
sudo \ | ||
gdb \ | ||
xz-utils \ | ||
g++-mips-linux-gnu \ | ||
libssl-dev \ | ||
pkg-config | ||
FROM ubuntu:22.04 | ||
|
||
COPY scripts/cross-apt-packages.sh /scripts/ | ||
RUN sh /scripts/cross-apt-packages.sh | ||
|
||
COPY scripts/crosstool-ng-1.24.sh /scripts/ | ||
RUN sh /scripts/crosstool-ng-1.24.sh | ||
|
||
COPY scripts/rustbuild-setup.sh /scripts/ | ||
RUN sh /scripts/rustbuild-setup.sh | ||
WORKDIR /tmp | ||
|
||
COPY host-x86_64/dist-mips-linux/patches/ /tmp/patches/ | ||
COPY host-x86_64/dist-mips-linux/mips-linux-gnu.config host-x86_64/dist-mips-linux/build-mips-toolchain.sh /tmp/ | ||
RUN su rustbuild -c ./build-mips-toolchain.sh | ||
|
||
COPY scripts/sccache.sh /scripts/ | ||
RUN sh /scripts/sccache.sh | ||
|
||
COPY scripts/cmake.sh /scripts/ | ||
RUN /scripts/cmake.sh | ||
ENV PATH=$PATH:/x-tools/mips-unknown-linux-gnu/bin | ||
|
||
ENV \ | ||
CC_mips_unknown_linux_gnu=mips-unknown-linux-gnu-gcc \ | ||
AR_mips_unknown_linux_gnu=mips-unknown-linux-gnu-ar \ | ||
CXX_mips_unknown_linux_gnu=mips-unknown-linux-gnu-g++ | ||
|
||
ENV HOSTS=mips-unknown-linux-gnu | ||
|
||
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs \ | ||
--set llvm.allow-old-toolchain | ||
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs | ||
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS |
26 changes: 26 additions & 0 deletions
26
src/ci/docker/host-x86_64/dist-mips-linux/build-mips-toolchain.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
hide_output() { | ||
set +x | ||
on_err=" | ||
echo ERROR: An error was encountered with the build. | ||
cat /tmp/build.log | ||
exit 1 | ||
" | ||
trap "$on_err" ERR | ||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & | ||
PING_LOOP_PID=$! | ||
"$@" &> /tmp/build.log | ||
rm /tmp/build.log | ||
trap - ERR | ||
kill $PING_LOOP_PID | ||
set -x | ||
} | ||
|
||
mkdir build | ||
cd build | ||
cp ../mips-linux-gnu.config .config | ||
hide_output ct-ng build | ||
cd .. | ||
rm -rf build |
Oops, something went wrong.