ci: add support for s390x-unknown-linux-musl

This commit is contained in:
Ariadne Conill 2021-02-28 00:37:56 +00:00
parent dbb0e6cce9
commit 344b409989
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,17 @@
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y --no-install-recommends \
curl ca-certificates \
gcc \
gcc-s390x-linux-gnu \
qemu-user
COPY install-musl.sh /
RUN sh /install-musl.sh s390x
# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \
CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER="qemu-s390x -L /musl-s390x" \
CC_s390x_unknown_linux_gnu=musl-gcc \
RUSTFLAGS='-Clink-args=-lgcc' \
PATH=$PATH:/musl-s390x/bin:/rust/bin

View File

@ -60,6 +60,12 @@ case ${1} in
./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
make install -j4
;;
s390x)
musl_arch=s390x
kernel_arch=s390
CC=s390x-linux-gnu-gcc \
./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
make install -j4
*)
echo "Unknown target arch: \"${1}\""
exit 1

30
ci/s390x-linux-musl.json Normal file
View File

@ -0,0 +1,30 @@
{
"arch": "s390x",
"cpu": "z10",
"crt-static-respected": true,
"data-layout": "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64",
"dynamic-linking": true,
"env": "musl",
"executables": true,
"features": "-vector",
"has-elf-tls": true,
"has-rpath": true,
"is-builtin": true,
"linker-is-gnu": true,
"llvm-target": "s390x-unknown-linux-musl",
"max-atomic-width": 64,
"min-global-align": 16,
"os": "linux",
"position-independent-executables": true,
"pre-link-args": {
"gcc": [
"-Wl,--as-needed",
"-Wl,-z,noexecstack"
]
},
"relro-level": "full",
"static-position-independent-executables": true,
"target-endian": "big",
"target-family": "unix",
"target-pointer-width": "64"
}