Skip to content

Commit

Permalink
Add CI for mips64(el)-unknown-linux-musl
Browse files Browse the repository at this point in the history
  • Loading branch information
xen0n committed Aug 2, 2019
1 parent 0135728 commit c6a8efd
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,12 @@ matrix:
stage: tier2
- env: TARGET=mips64-unknown-linux-gnuabi64
stage: tier2
- env: TARGET=mips64-unknown-linux-musl
stage: tier2
- env: TARGET=mips64el-unknown-linux-gnuabi64
stage: tier2
- env: TARGET=mips64el-unknown-linux-musl
stage: tier2
- env: TARGET=mipsel-unknown-linux-musl
stage: tier2
- env: TARGET=powerpc-unknown-linux-gnu
Expand Down Expand Up @@ -237,6 +241,9 @@ matrix:
- env: TARGET=wasm32-wasi
- env: TARGET=powerpc-unknown-linux-gnu
- env: TARGET=s390x-unknown-linux-gnu
# FIXME(#1449): remove this once the corresponding rust-lang/rust PR lands
- env: TARGET=mips64-unknown-linux-musl
- env: TARGET=mips64el-unknown-linux-musl

install: travis_retry rustup target add $TARGET

Expand Down
15 changes: 15 additions & 0 deletions ci/docker/mips64-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:19.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates \
gcc-mips64-linux-gnuabi64 qemu-user

COPY install-musl.sh /
RUN sh /install-musl.sh mips64

# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
ENV PATH=$PATH:/musl-mips64/bin:/rust/bin \
CC_mips64_unknown_linux_musl=musl-gcc \
RUSTFLAGS='-Clink-args=-lgcc' \
CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc \
CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mips64 -L /musl-mips64"
15 changes: 15 additions & 0 deletions ci/docker/mips64el-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:19.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates \
gcc-mips64el-linux-gnuabi64 qemu-user

COPY install-musl.sh /
RUN sh /install-musl.sh mips64el

# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
ENV PATH=$PATH:/musl-mips64el/bin:/rust/bin \
CC_mips64el_unknown_linux_musl=musl-gcc \
RUSTFLAGS='-Clink-args=-lgcc' \
CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc \
CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mips64el -L /musl-mips64el"
14 changes: 14 additions & 0 deletions ci/install-musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ case ${1} in
./configure --prefix="/musl-${musl_arch}"
make install -j4
;;
mips64)
musl_arch=mips64
kernel_arch=mips
CC=mips64-linux-gnuabi64-gcc CFLAGS="-march=mips64r2 -mabi=64" \
./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
make install -j4
;;
mips64el)
musl_arch=mips64el
kernel_arch=mips
CC=mips64el-linux-gnuabi64-gcc CFLAGS="-march=mips64r2 -mabi=64" \
./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
make install -j4
;;
*)
echo "Unknown target arch: \"${1}\""
exit 1
Expand Down

0 comments on commit c6a8efd

Please sign in to comment.