summaryrefslogtreecommitdiffstats
path: root/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:11:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:12:43 +0000
commitcf94bdc0742c13e2a0cac864c478b8626b266e1b (patch)
tree044670aa50cc5e2b4229aa0b6b3df6676730c0a6 /src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
parentAdding debian version 1.65.0+dfsg1-2. (diff)
downloadrustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.tar.xz
rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.zip
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile')
-rw-r--r--src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile35
1 files changed, 29 insertions, 6 deletions
diff --git a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
index b0d65428e..26eb69f2e 100644
--- a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
@@ -1,5 +1,6 @@
-FROM ubuntu:16.04
+FROM ubuntu:22.04
+ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
g++-multilib \
make \
@@ -17,6 +18,25 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config
+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-i586-gnu-i586-i686-musl/i586-linux-gnu.config \
+ host-x86_64/dist-i586-gnu-i586-i686-musl/build-i586-gnu-toolchain.sh \
+ /tmp/
+RUN su rustbuild -c ./build-i586-gnu-toolchain.sh
+ENV PATH=$PATH:/x-tools/i586-unknown-linux-gnu/bin
+ENV \
+ CC_i586_unknown_linux_gnu=i586-unknown-linux-gnu-gcc \
+ AR_i586_unknown_linux_gnu=i586-unknown-linux-gnu-ar
+
WORKDIR /build/
COPY scripts/musl.sh /build/
RUN CC=gcc CFLAGS="-m32 -Wa,-mrelax-relocations=no" \
@@ -27,17 +47,20 @@ RUN CC=gcc CFLAGS="-m32 -Wa,-mrelax-relocations=no" \
bash musl.sh i586 --target=i586 && \
rm -rf /build
+# FIXME: musl really shouldn't be linking libgcc_s.so, as it's linked to glibc,
+# but it's required by src/test/ui/proc-macro/crt-static.rs. Ubuntu:16.04 gcc-5
+# had libgcc_s.so as a symlink to the absolute libgcc_s.so.1, but now it's an
+# ld-script that expects to find libgcc_s.so.1 in the library search path.
+# See also https://github.com/rust-lang/rust/issues/82521
+RUN ln -s /usr/lib32/libgcc_s.so.1 /musl-i686/lib/
+
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
-COPY scripts/cmake.sh /scripts/
-RUN /scripts/cmake.sh
-
ENV RUST_CONFIGURE_ARGS \
--musl-root-i586=/musl-i586 \
--musl-root-i686=/musl-i686 \
- --disable-docs \
- --set llvm.allow-old-toolchain
+ --disable-docs
# Newer binutils broke things on some vms/distros (i.e., linking against
# unknown relocs disabled by the following flag), so we need to go out of our