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 + dc1160d commit 3e4e0f2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,12 @@ jobs:
TOOLCHAIN=${{ github.event.inputs.toolchain || matrix.env.TOOLCHAIN }}
tags: ghcr.io/${{ github.repository_owner }}/rust-musl-cross:${{ matrix.env.IMAGE_TAG }}-${{ matrix.os.arch }}
no-cache: ${{ github.event.inputs.no_cache == 'yes' }}
context: .
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test Docker cargo build
if: ${{ matrix.os.arch == 'amd64' && !startsWith(matrix.env.TARGET, 'armv5te') && !startsWith(matrix.env.TARGET, 's390x') }}
if: ${{ matrix.os.arch == 'amd64' && !startsWith(matrix.env.TARGET, 'armv5te') }}
run: |
docker run --rm \
-v "$(pwd)/tests":/home/rust/src \
Expand Down
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 3e4e0f2

Please sign in to comment.