Skip to content

Commit

Permalink
Add mipsel-unknown-linux-musl target.
Browse files Browse the repository at this point in the history
  • Loading branch information
malbarbo committed Oct 13, 2018
1 parent 724ea00 commit 22f44e6
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -38,6 +38,7 @@ matrix:
# The other targets fails with: undefined reference to `__dso_handle'
# See https://github.com/rust-lang/rust/issues/36710
- env: TARGET=mips-unknown-linux-musl CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=mipsel-unknown-linux-musl CPP=1 STD=1 OPENSSL=0.5.5 RUN=1
- env: TARGET=x86_64-unknown-linux-musl STD=1 OPENSSL=0.5.5 RUN=1 DEPLOY=1

# Android
Expand Down
39 changes: 39 additions & 0 deletions docker/mipsel-unknown-linux-musl/Dockerfile
@@ -0,0 +1,39 @@
FROM ubuntu:18.04

RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
gcc \
libc6-dev \
make \
pkg-config

COPY xargo.sh /
RUN bash /xargo.sh

COPY qemu.sh /
RUN bash /qemu.sh mipsel

COPY musl.sh /
RUN bash /musl.sh \
TARGET=mipsel-linux-muslsf \
"COMMON_CONFIG += -with-arch=mips32"

COPY openssl.sh /
RUN bash /openssl.sh linux-mips32 mipsel-linux-muslsf-

# This allows qemu run dynamic linked binaries
RUN ln -sf \
/usr/local/mipsel-linux-muslsf/lib/libc.so \
/usr/local/mipsel-linux-muslsf/lib/ld-musl-mipsel-sf.so.1
ENV QEMU_LD_PREFIX=/usr/local/mipsel-linux-muslsf

ENV CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-linux-muslsf-gcc \
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_RUNNER=qemu-mipsel \
CC_mipsel_unknown_linux_musl=mipsel-linux-muslsf-gcc \
CXX_mipsel_unknown_linux_musl=mipsel-linux-muslsf-g++ \
OPENSSL_DIR=/openssl \
OPENSSL_INCLUDE_DIR=/openssl/include \
OPENSSL_LIB_DIR=/openssl/lib \
RUST_TEST_THREADS=1

0 comments on commit 22f44e6

Please sign in to comment.