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:
136
136
# FIXME: It seems some items in `src/unix/mod.rs`
137
137
# aren't defined on redox actually.
138
138
# x86_64-unknown-redox,
139
+ # FIXME: Enable when CI is building a toolchain for this target
140
+ # s390x-unknown-linux-musl,
139
141
]
140
142
steps :
141
143
- 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
60
60
./configure --prefix=" /musl-${musl_arch} " --enable-wrapper=yes
61
61
make install -j4
62
62
;;
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
+ ;;
63
70
* )
64
71
echo " Unknown target arch: \" ${1} \" "
65
72
exit 1
Original file line number Diff line number Diff line change @@ -161,6 +161,9 @@ cfg_if! {
161
161
} else if #[ cfg( any( target_arch = "powerpc64" ) ) ] {
162
162
mod powerpc64;
163
163
pub use self :: powerpc64:: * ;
164
+ } else if #[ cfg( any( target_arch = "s390x" ) ) ] {
165
+ mod s390x;
166
+ pub use self :: s390x:: * ;
164
167
} else if #[ cfg( any( target_arch = "x86_64" ) ) ] {
165
168
mod x86_64;
166
169
pub use self :: x86_64:: * ;
You can’t perform that action at this time.
0 commit comments