Skip to content

Add aarch64-unknown-linux-musl target

kpcyrd requested to merge aarch64 into main

This is useful for cross-compiling static binaries.

The necessary preconditions have been met last July: musl@ca0c6871


I currently use the following repro-env config:

[container]
image = "docker.io/library/archlinux"

[packages]
system = "archlinux"
dependencies = [
    "aarch64-linux-gnu-gcc",
    "cargo-auditable",
    "cargo-deb",
    "gcc",
    "musl",
    "musl-aarch64",
    "rustup",
]

but I need to manually pin a specific rustc version in my build instructions for the build to be reproducible:

# select a specific Rust release so it's documented which one has been used
rustup default 1.83.0
rustup target add aarch64-unknown-linux-musl
rustup target add x86_64-unknown-linux-musl

with this patched PKGBUILD, I could instead use:

[container]
image = "docker.io/library/archlinux"

[packages]
system = "archlinux"
dependencies = [
    "cargo-auditable",
    "cargo-deb",
    "musl",
    "rust-musl",
    "rust-musl-aarch64",
]

I could then resolve this to the latest Rust compiler (and binutils etc) with repro-env update, which generates a repro-env.lock based on the current state of Arch Linux.

Edited by kpcyrd

Merge request reports

Loading