From 8cb0c179d24db834499b2591c86ad29784df0161 Mon Sep 17 00:00:00 2001 From: sksat Date: Tue, 19 Nov 2024 15:10:47 +0900 Subject: [PATCH 1/3] config linker for aarch64-unknown-linux-musl --- .cargo/config.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 0d9cc47..4bb0509 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,7 @@ # for local testing [patch.crates-io] kble-socket = { path = "./kble-socket" } + +# cross compile +[target.aarch64-unknown-linux-musl] +linker = "aarch64-linux-gnu-gcc" From 3e0be8aba58ab8dd33c9a131bd22978e95986b72 Mon Sep 17 00:00:00 2001 From: sksat Date: Tue, 19 Nov 2024 15:18:07 +0900 Subject: [PATCH 2/3] build aarch64-unknown-linux-musl release binaries --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4704b43..7d3ab18 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,7 @@ jobs: matrix: target: - x86_64-unknown-linux-musl + - aarch64-unknown-linux-musl steps: - uses: actions/checkout@v4.2.2 From 6632d98e49e77e362b8d37b562c193bffb904112 Mon Sep 17 00:00:00 2001 From: sksat Date: Tue, 19 Nov 2024 15:23:27 +0900 Subject: [PATCH 3/3] install gcc-aarch64-linux-gnu as linker --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d3ab18..1c0a3d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,11 @@ jobs: sudo apt-get update sudo apt-get install -y musl-tools + - name: install aarch64 linker + if: matrix.target == 'aarch64-unknown-linux-musl' + run: | + sudo apt-get install -y gcc-aarch64-linux-gnu + - name: Get Rust toolchain id: toolchain working-directory: .