Skip to content

Commit 1266e8d

Browse files
committed
promote i586-unknown-linux-gnu to Tier2+hosttools
mcp: rust-lang/compiler-team#543
1 parent 13471d3 commit 1266e8d

File tree

6 files changed

+62
-20
lines changed

6 files changed

+62
-20
lines changed

src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile renamed to src/ci/docker/host-x86_64/dist-i586-i686-musl/Dockerfile

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2121
COPY scripts/cross-apt-packages.sh /scripts/
2222
RUN sh /scripts/cross-apt-packages.sh
2323

24-
COPY scripts/crosstool-ng-1.24.sh /scripts/
25-
RUN sh /scripts/crosstool-ng-1.24.sh
26-
27-
COPY scripts/rustbuild-setup.sh /scripts/
28-
RUN sh /scripts/rustbuild-setup.sh
29-
WORKDIR /tmp
30-
31-
COPY host-x86_64/dist-i586-gnu-i586-i686-musl/i586-linux-gnu.config \
32-
host-x86_64/dist-i586-gnu-i586-i686-musl/build-i586-gnu-toolchain.sh \
33-
/tmp/
34-
RUN su rustbuild -c ./build-i586-gnu-toolchain.sh
35-
ENV PATH=$PATH:/x-tools/i586-unknown-linux-gnu/bin
36-
ENV \
37-
CC_i586_unknown_linux_gnu=i586-unknown-linux-gnu-gcc \
38-
AR_i586_unknown_linux_gnu=i586-unknown-linux-gnu-ar
39-
4024
WORKDIR /build/
4125
COPY scripts/musl.sh /build/
4226
RUN CC=gcc CFLAGS="-m32 -Wa,-mrelax-relocations=no" \
@@ -68,10 +52,9 @@ ENV RUST_CONFIGURE_ARGS \
6852
#
6953
# See: https://github.com/rust-lang/rust/issues/34978
7054
ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
71-
ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
7255
ENV CFLAGS_i586_unknown_linux_musl=-Wa,-mrelax-relocations=no
7356

74-
ENV TARGETS=i586-unknown-linux-gnu,i686-unknown-linux-musl
57+
ENV TARGETS=i686-unknown-linux-musl
7558

7659
ENV SCRIPT \
7760
python3 ../x.py --stage 2 test --host='' --target $TARGETS && \
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
FROM ubuntu:22.04
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
g++-multilib \
6+
make \
7+
ninja-build \
8+
file \
9+
curl \
10+
ca-certificates \
11+
python3 \
12+
git \
13+
cmake \
14+
xz-utils \
15+
sudo \
16+
gdb \
17+
patch \
18+
libssl-dev \
19+
pkg-config
20+
21+
COPY scripts/cross-apt-packages.sh /scripts/
22+
RUN sh /scripts/cross-apt-packages.sh
23+
24+
COPY scripts/crosstool-ng-1.24.sh /scripts/
25+
RUN sh /scripts/crosstool-ng-1.24.sh
26+
27+
COPY scripts/rustbuild-setup.sh /scripts/
28+
RUN sh /scripts/rustbuild-setup.sh
29+
WORKDIR /tmp
30+
31+
COPY host-x86_64/dist-i586-linux/i586-linux-gnu.config \
32+
host-x86_64/dist-i586-linux/build-i586-gnu-toolchain.sh \
33+
/tmp/
34+
RUN su rustbuild -c ./build-i586-gnu-toolchain.sh
35+
ENV PATH=$PATH:/x-tools/i586-unknown-linux-gnu/bin
36+
ENV \
37+
CC_i586_unknown_linux_gnu=i586-unknown-linux-gnu-gcc \
38+
AR_i586_unknown_linux_gnu=i586-unknown-linux-gnu-ar
39+
40+
COPY scripts/sccache.sh /scripts/
41+
RUN sh /scripts/sccache.sh
42+
43+
ENV RUST_CONFIGURE_ARGS \
44+
--enable-full-tools \
45+
--disable-docs
46+
47+
# Newer binutils broke things on some vms/distros (i.e., linking against
48+
# unknown relocs disabled by the following flag), so we need to go out of our
49+
# way to produce "super compatible" binaries.
50+
#
51+
# See: https://github.com/rust-lang/rust/issues/34978
52+
ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
53+
54+
ENV HOSTS=i586-unknown-linux-gnu
55+
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
56+

src/ci/github-actions/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,10 @@ jobs:
347347
- name: dist-armv7-linux
348348
<<: *job-linux-xl
349349

350-
- name: dist-i586-gnu-i586-i686-musl
350+
- name: dist-i586-i686-musl
351+
<<: *job-linux-xl
352+
353+
- name: dist-i586-linux
351354
<<: *job-linux-xl
352355

353356
- name: dist-i686-linux

src/doc/rustc/src/platform-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ target | notes
8686
`arm-unknown-linux-gnueabi` | ARMv6 Linux (kernel 3.2, glibc 2.17)
8787
`arm-unknown-linux-gnueabihf` | ARMv6 Linux, hardfloat (kernel 3.2, glibc 2.17)
8888
`armv7-unknown-linux-gnueabihf` | ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17)
89+
`i586-unknown-linux-gnu` | 32-bit Linux w/o SSE (kernel 3.2, glibc 2.17)
8990
`mips-unknown-linux-gnu` | MIPS Linux (kernel 4.4, glibc 2.23)
9091
`mips64-unknown-linux-gnuabi64` | MIPS64 Linux, n64 ABI (kernel 4.4, glibc 2.23)
9192
`mips64el-unknown-linux-gnuabi64` | MIPS64 (LE) Linux, n64 ABI (kernel 4.4, glibc 2.23)
@@ -146,7 +147,6 @@ target | std | notes
146147
`armv7r-none-eabihf` | * | Bare ARMv7-R, hardfloat
147148
`asmjs-unknown-emscripten` | ✓ | asm.js via Emscripten
148149
`i586-pc-windows-msvc` | * | 32-bit Windows w/o SSE
149-
`i586-unknown-linux-gnu` | ✓ | 32-bit Linux w/o SSE (kernel 3.2, glibc 2.17)
150150
`i586-unknown-linux-musl` | ✓ | 32-bit Linux w/o SSE, MUSL
151151
[`i686-linux-android`](platform-support/android.md) | ✓ | 32-bit x86 Android
152152
`i686-unknown-freebsd` | ✓ | 32-bit FreeBSD

0 commit comments

Comments
 (0)