File tree Expand file tree Collapse file tree 6 files changed +872
-1
lines changed
docker/s390x-unknown-linux-musl
src/unix/linux_like/linux/musl Expand file tree Collapse file tree 6 files changed +872
-1
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ jobs:
136136 # FIXME: It seems some items in `src/unix/mod.rs`
137137 # aren't defined on redox actually.
138138 # x86_64-unknown-redox,
139+ # FIXME: Enable when CI is building a toolchain for this target
140+ # s390x-unknown-linux-musl,
139141 ]
140142 steps :
141143 - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
Original file line number Diff line number Diff line change 1+ FROM ubuntu:20.04
2+
3+ RUN apt-get update && apt-get install -y --no-install-recommends \
4+ curl ca-certificates \
5+ gcc \
6+ gcc-s390x-linux-gnu \
7+ qemu-user
8+
9+ COPY install-musl.sh /
10+ RUN sh /install-musl.sh s390x
11+
12+ # FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
13+ ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \
14+ CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER="qemu-s390x -L /musl-s390x" \
15+ CC_s390x_unknown_linux_gnu=musl-gcc \
16+ RUSTFLAGS='-Clink-args=-lgcc' \
17+ PATH=$PATH:/musl-s390x/bin:/rust/bin
Original file line number Diff line number Diff line change @@ -60,6 +60,13 @@ case ${1} in
6060 ./configure --prefix=" /musl-${musl_arch} " --enable-wrapper=yes
6161 make install -j4
6262 ;;
63+ s390x)
64+ musl_arch=s390x
65+ kernel_arch=s390
66+ CC=s390x-linux-gnu-gcc \
67+ ./configure --prefix=" /musl-${musl_arch} " --enable-wrapper=yes
68+ make install -j4
69+ ;;
6370 * )
6471 echo " Unknown target arch: \" ${1} \" "
6572 exit 1
Original file line number Diff line number Diff line change @@ -161,6 +161,9 @@ cfg_if! {
161161 } else if #[ cfg( any( target_arch = "powerpc64" ) ) ] {
162162 mod powerpc64;
163163 pub use self :: powerpc64:: * ;
164+ } else if #[ cfg( any( target_arch = "s390x" ) ) ] {
165+ mod s390x;
166+ pub use self :: s390x:: * ;
164167 } else if #[ cfg( any( target_arch = "x86_64" ) ) ] {
165168 mod x86_64;
166169 pub use self :: x86_64:: * ;
You can’t perform that action at this time.
0 commit comments