Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
FROM ubuntu:25.04 # gcc-mips64-linux-gnuabi64 not available in 25.10
FROM ubuntu:25.10

# gcc-mips64-linux-gnuabi64 not available by default in 25.10
RUN echo "deb http://archive.ubuntu.com/ubuntu noble main universe" >> /etc/apt/sources.list.d/noble-copies.list

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

# Use Loongson-3A4000, a CPU with MSA support. Qemu does not define a max CPU for MIPS.
ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-linux-gnuabi64-gcc \
CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64 -L /usr/mips64-linux-gnuabi64" \
OBJDUMP=mips64-linux-gnuabi64-objdump
CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64 -cpu Loongson-3A4000 -L /usr/mips64-linux-gnuabi64" \

@tgross35 tgross35 Oct 29, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment about why the cpu is needed?

View changes since the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this is because there doesn't seem to be a "max" cpu for qemu-mips64?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, from what I understand the CPUs covered by MIPS are quite a broad set, with various breaking changes, so it's not really possible to pick a single max CPU. I just picked one with MSA.

OBJDUMP=mips64-linux-gnuabi64-objdump
10 changes: 7 additions & 3 deletions ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
FROM ubuntu:25.04 # gcc-mips64el-linux-gnuabi64 not available in 25.10
FROM ubuntu:25.10

# gcc-mips64el-linux-gnuabi64 not available by default in 25.10
RUN echo "deb http://archive.ubuntu.com/ubuntu noble main universe" >> /etc/apt/sources.list.d/noble-copies.list

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

# Use Loongson-3A4000, a CPU with MSA support. Qemu does not define a max CPU for MIPS.
ENV CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_LINKER=mips64el-linux-gnuabi64-gcc \
CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64el -L /usr/mips64el-linux-gnuabi64" \
OBJDUMP=mips64el-linux-gnuabi64-objdump
CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64el -cpu Loongson-3A4000 -L /usr/mips64el-linux-gnuabi64" \
OBJDUMP=mips64el-linux-gnuabi64-objdump
2 changes: 1 addition & 1 deletion ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ case ${TARGET} in
# cargo_test
# ;;
mips64*)
export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+msa"
export RUSTFLAGS="${RUSTFLAGS} -C target-cpu=mips64r5 -C target-feature=+msa"
cargo_test
;;
s390x*)
Expand Down
Loading
Loading