-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add support for loongarch64-unknown-linux-musl
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM ubuntu:24.04 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ca-certificates curl gcc git libc6-dev make qemu-user xz-utils | ||
|
||
COPY install-musl-cross.sh / | ||
RUN sh /install-musl-cross.sh loongarch64-unknown-linux-musl | ||
|
||
ENV CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_MUSL_LINKER=loongarch64-unknown-linux-musl-gcc \ | ||
CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_MUSL_RUNNER="qemu-loongarch64" \ | ||
CC_loongarch64_unknown_linux_musl=loongarch64-unknown-linux-musl-gcc \ | ||
CFLAGS_loongarch64_unknown_linux_musl="-mabi=lp64d -fPIC" \ | ||
QEMU_LD_PREFIX=/loongarch64-unknown-linux-musl/loongarch64-unknown-linux-musl/sysroot \ | ||
PATH=$PATH:/loongarch64-unknown-linux-musl/bin:/rust/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
# | ||
# Install musl cross toolchain | ||
|
||
set -ex | ||
|
||
MUSL_CROSS_VER=20241103 | ||
MUSL_CROSS_URL=https://github.com/musl-cross/musl-cross/releases/download/$MUSL_CROSS_VER/$1.tar.xz | ||
|
||
curl -L --retry 5 "$MUSL_CROSS_URL" | tar -xJf - -C / |