diff options
author | Ariadne Conill <ariadne@dereferenced.org> | 2021-02-28 00:37:56 +0000 |
---|---|---|
committer | Ariadne Conill <ariadne@dereferenced.org> | 2021-02-28 00:38:58 +0000 |
commit | 344b409989f62aef80fdf9b05671672a8bd27f9d (patch) | |
tree | 292f9298a886f10fe71575dcd37655b76105b2a5 /ci | |
parent | dbb0e6cce9db439d4da5ed5091eab079a1cf7663 (diff) | |
download | rust-libc-344b409989f62aef80fdf9b05671672a8bd27f9d.tar.gz |
ci: add support for s390x-unknown-linux-musl
Diffstat (limited to 'ci')
-rw-r--r-- | ci/docker/s390x-unknown-linux-musl/Dockerfile | 17 | ||||
-rw-r--r-- | ci/install-musl.sh | 6 | ||||
-rw-r--r-- | ci/s390x-linux-musl.json | 30 |
3 files changed, 53 insertions, 0 deletions
diff --git a/ci/docker/s390x-unknown-linux-musl/Dockerfile b/ci/docker/s390x-unknown-linux-musl/Dockerfile new file mode 100644 index 0000000000..f83ee8c9c8 --- /dev/null +++ b/ci/docker/s390x-unknown-linux-musl/Dockerfile @@ -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 diff --git a/ci/install-musl.sh b/ci/install-musl.sh index 88cb4f0b11..4b2de5e697 100644 --- a/ci/install-musl.sh +++ b/ci/install-musl.sh @@ -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 diff --git a/ci/s390x-linux-musl.json b/ci/s390x-linux-musl.json new file mode 100644 index 0000000000..d7110a71ff --- /dev/null +++ b/ci/s390x-linux-musl.json @@ -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" +} |