Skip to content

Commit

Permalink
Try #67: amd64 --target s390x-unknown-linux-musl
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Sep 20, 2022
2 parents af0c832 + 3565a9e commit e06f9d3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@ RUN update-ca-certificates

ARG TARGET=x86_64-unknown-linux-musl
ENV RUST_MUSL_CROSS_TARGET=$TARGET
ARG RUST_MUSL_MAKE_VER=0.9.9
ARG RUST_MUSL_MAKE_CONFIG=config.mak

COPY $RUST_MUSL_MAKE_CONFIG /tmp/config.mak
RUN cd /tmp && curl -Lsq -o musl-cross-make.zip https://github.com/richfelker/musl-cross-make/archive/v$RUST_MUSL_MAKE_VER.zip && \
unzip -q musl-cross-make.zip && \
rm musl-cross-make.zip && \
mv musl-cross-make-$RUST_MUSL_MAKE_VER musl-cross-make && \
RUN cd /tmp && \
git clone --depth 1 https://github.com/richfelker/musl-cross-make.git && \
cp /tmp/config.mak /tmp/musl-cross-make/config.mak && \
cd /tmp/musl-cross-make && \
export TARGET=$TARGET && \
Expand Down
4 changes: 2 additions & 2 deletions build-std.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ then
cd custom-std
cp /tmp/Xargo.toml .
rustc -Z unstable-options --print target-spec-json --target "$TARGET" | tee "$TARGET.json"
RUSTFLAGS="-L/usr/local/musl/$TARGET/lib -L/usr/local/musl/lib/gcc/$TARGET/9.2.0/" xargo build --target "$TARGET"
RUSTFLAGS="-L/usr/local/musl/$TARGET/lib -L/usr/local/musl/lib/gcc/$TARGET/11.2.0/" xargo build --target "$TARGET"
cp -r "/root/.xargo/lib/rustlib/$TARGET" "/root/.rustup/toolchains/$TOOLCHAIN-$HOST/lib/rustlib/"
mkdir "/root/.rustup/toolchains/$TOOLCHAIN-$HOST/lib/rustlib/$TARGET/lib/self-contained"
cp /usr/local/musl/"$TARGET"/lib/*.o "/root/.rustup/toolchains/$TOOLCHAIN-$HOST/lib/rustlib/$TARGET/lib/self-contained/"
cp /usr/local/musl/lib/gcc/"$TARGET"/9.2.0/c*.o "/root/.rustup/toolchains/$TOOLCHAIN-$HOST/lib/rustlib/$TARGET/lib/self-contained/"
cp /usr/local/musl/lib/gcc/"$TARGET"/11.2.0/c*.o "/root/.rustup/toolchains/$TOOLCHAIN-$HOST/lib/rustlib/$TARGET/lib/self-contained/"
cd ..
rm -rf /root/.xargo /root/.cargo/registry /root/.cargo/git custom-std

Expand Down
9 changes: 7 additions & 2 deletions config.mak
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ OUTPUT = /usr/local/musl
# headers, which are not needed unless compiling programs that use them.

# BINUTILS_VER =
# GCC_VER =
# MUSL_VER =
GCC_VER = 11.2.0

# https://github.com/rust-embedded/cross/issues/478
# https://github.com/rust-lang/libc/issues/1848

MUSL_VER = 1.1.24

# GMP_VER =
# MPC_VER =
# MPFR_VER =
Expand Down
2 changes: 1 addition & 1 deletion config.mak.32
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ OUTPUT = /usr/local/musl
# headers, which are not needed unless compiling programs that use them.

# BINUTILS_VER =
# GCC_VER =
GCC_VER = 11.2.0

# https://github.com/rust-embedded/cross/issues/478
# https://github.com/rust-lang/libc/issues/1848
Expand Down

0 comments on commit e06f9d3

Please sign in to comment.