Skip to content

ci: Use distro toolchain for loongarch64-unknown-linux-gnu #1665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2024
Merged
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
25 changes: 10 additions & 15 deletions ci/docker/loongarch64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
FROM ubuntu:24.04
RUN \
apt-get update && \
apt-get install -y --no-install-recommends gcc libc6-dev ca-certificates wget xz-utils && \
wget "https://github.com/loongson/build-tools/releases/download/2024.08.08/x86_64-cross-tools-loongarch64-binutils_2.43-gcc_14.2.0.tar.xz" && \
tar -xvf x86_64-cross-tools-loongarch64-binutils_2.43-gcc_14.2.0.tar.xz -C / && \
rm x86_64-cross-tools-loongarch64-binutils_2.43-gcc_14.2.0.tar.xz && \
wget "https://github.com/loongson/build-tools/releases/download/2024.08.08/x86_64-cross-tools-loongarch64-binutils_2.43-gcc_14.2.0-glibc_2.40.tar.xz" && \
tar -xvf x86_64-cross-tools-loongarch64-binutils_2.43-gcc_14.2.0-glibc_2.40.tar.xz -C / && \
rm x86_64-cross-tools-loongarch64-binutils_2.43-gcc_14.2.0-glibc_2.40.tar.xz && \
wget "https://github.com/loongson/build-tools/releases/download/2023.08.08/qemu-loongarch64" && \
install -m 755 qemu-loongarch64 /cross-tools/bin/qemu-loongarch64 && \
rm qemu-loongarch64
ENV \
CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_LINKER="/cross-tools/bin/loongarch64-unknown-linux-gnu-gcc" \
CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_RUNNER="/cross-tools/bin/qemu-loongarch64 -L /cross-tools/target -E LD_LIBRARY_PATH=/cross-tools/loongarch64-unknown-linux-gnu/lib"

RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user-static ca-certificates \
gcc-14-loongarch64-linux-gnu libc6-dev-loong64-cross


ENV CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_LINKER=loongarch64-linux-gnu-gcc-14 \
CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-loongarch64-static -L /usr/loongarch64-linux-gnu" \
OBJDUMP=loongarch64-linux-gnu-objdump